Closed Bug 1646212 Opened 5 years ago Closed 5 years ago

OOP iframe navigations that affect session history don't update the browser back/forward buttons

Categories

(Core :: DOM: Navigation, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
Fission Milestone M6b

People

(Reporter: mattwoodrow, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: waiting on session history)

Some iframe navigations are recorded in the top-level session history, and affect whether we can go back/forward.

This is normally handled by the nsIWebProgress::OnLocationMessage (for the iframe) bubbling up to the root docshell, where we send it to BrowserChild::OnLocationChange.

BrowserChild reads the latest can go back/forward values from the root docshell, and sends them along with the OnLocationChange message to BrowserParent.

BrowserParent writes the new can go back/forward values using UpdateWebNavigationForLocationChange, and then notifies OnLocationChange, which is what actually updates the button state.

This doesn't work for an OOP iframe, since we don't send remote web progress events in this case. The root docshell is in a different process, and I'm not sure we're updating the can go forward/back values correctly anyway.

We probably need to fix this to work fairly differently for session history in the parent, and hopefully not rely on the browser receiving OnLocationChange for a subframe in order to update the buttons (maybe a custom session history updated event?)

As far as I can tell, this is the only usage of subframe nsIWebProgress events in the frontend, so getting rid of this would be nice.

docshell/test/browser/browser_backforward_userinteraction.js tests this behaviour, but doesn't cover the fission case.

Severity: -- → S3
Priority: -- → P3
Fission Milestone: --- → M6c

This is nightly blocking for Fission.
Neil, can you discuss with peterv about how to handle this with history in parent?

Fission Milestone: M6c → M6b
Flags: needinfo?(enndeakin)

Olli, can you please look into this?

Flags: needinfo?(enndeakin) → needinfo?(bugs)
Assignee: nobody → peterv
Status: NEW → ASSIGNED
Flags: needinfo?(bugs)
Assignee: peterv → bugs

At least basic OOPIF tests seem to work here. Back button is updated and going back does what it should.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Assignee: bugs → nobody

Reopening this because session history in parent pref isn't yet enabled with Fission. Olli verified that this is fixed with that pref so we can close this once the pref is enabled for Fission.

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Whiteboard: waiting on session history

Cleaning up the M6b list, closing the bugs that have been confirmed to be fixed with sessionHistoryInParent pref with Fission, as that's definitely getting fixed in M6b in bug 1656208. Closing per Olli's confirmation in comment 3.

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → WORKSFORME

Hmm is this the same as bug 1670933? Then it's probably not fixed yet?

Flags: needinfo?(bugs)

The testcase I was using was working.
bug 1670933 is probably doing something else.

Flags: needinfo?(bugs)
You need to log in before you can comment on or make changes to this bug.