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

 
 

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

Submitted by:  Ruben Rodriguez <rubenquidam>
Submitted on:  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:  Giorgio Maone <gioma1>
Open/Closed:  Open

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 MemberIn charge of this item.
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 MemberIn charge of this item.
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)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    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.7