bugLibreJS - Bugs: bug #54459, Back/forth navigation does not...

 
 

bug #54459: Back/forth navigation does not change tab status information

Submitter:  Ruben Rodriguez <rubenquidam>
Submitted:  Tue 07 Aug 2018 04:41:24 PM UTC
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Ready For Test
Privacy:  Public Assigned to:  gioma1
Open/Closed:  Open
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Mon 13 Aug 2018 11:11:37 PM UTC, comment #2: 

Fixed in this PR.

As a side benefit, on extension updates and session restore we don't lose context, as we use the per-tab cached one if available.

Giorgio Maone <gioma1>
Project Member
Mon 13 Aug 2018 07:52:01 PM UTC, comment #1: 

It's actually a deeper and older issue, caused by the original design choice of storing each script analysis report (AKA "unused_data") in a map keys by tabId.
Since the data doesn't get refreshed until the webRequest event handlers are called, which happens only on actual network navigation (even cached), but NOT on BF Cache (history) navigation.

I'm working around by caching a copy of the data in a per-tab map keyed by URL and stored using the browser.session API: as soon as any kind of navigation occurs, if there's a mismatch between the tab's new URL and the unused_data[tabId].url property, we're gonna replace it with the cached object (if it exists), otherwise we default to empty data waiting for an user-driven refresh (like it happens when we first install the extension).

As a side benefit of this approach, the use of the browser.session API will provide us with cached data surviving browser restarts / session restores, as long as the tabs are still open.

I'll likely push the fix tomorrow at most.

Giorgio Maone <gioma1>
Project Member
Tue 07 Aug 2018 04:41:24 PM UTC, original submission:  

Tested on v7.15.0

Go to a page and see the badge be set to either red or green, then right click on an image and "view image" so it opens that image in that tab, correctly cleaning the badge as there are no scripts. Clicking back returns to the page with the badge having no color flag. All scripts remain correctly blocked/accepted and correctly listed in the panel, but the badge flag is missing.

This doesn't happen when following links, only with the view media action, so it is of lesser importance.

Ruben Rodriguez <rubenquidam>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gioma1 (Posted a comment)
  • -email is unavailable- added by rubenquidam (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-13 gioma1 StatusNone Ready For Test
    2018-08-13 gioma1 Severity2 - Minor 3 - Normal
    2018-08-13 gioma1 SummaryClicking back on history forgets previous badge status Back/forth navigation does not change tab status information

    Back to the top


    Powered by Savane 3.9