Closed Bug 1709316 Opened 4 years ago Closed 4 years ago

Replace the frameloader after marking the BC as not being in BFCache anymore

Categories

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

defect

Tracking

()

RESOLVED FIXED
90 Branch
Fission Milestone M7a
Tracking Status
firefox90 --- fixed

People

(Reporter: peterv, Assigned: peterv)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

No description provided.
Severity: -- → S3
Fission Milestone: --- → M7a
Priority: -- → P2

The way we do it currently causes us to change focus (as a result of the nsFrameLoaderOwner::ReplaceFrameLoader call) before we marked the BC as not in BFCache. nsFocusManager::IsWindowVisible is false for windows that are in BFCache (they're frozen), and so we set the focus but don't fire any events. When we then mark the BC as 'not in BFCache' we never end up firing the focus event. Postponing the nsFrameLoaderOwner::ReplaceFrameLoader call until after we mark the BC as 'not in BFCache' seems to fix this.

nsFrameLoaderOwner::ReplaceFrameLoader calls nsFocusManager::ActivateRemoteFrameIfNeeded.
If the call to nsFrameLoaderOwner::ReplaceFrameLoader happens before the BC is marked as
not in BFCache, then the focus manager will not fire focus events because the window is
still frozen.

Pushed by pvanderbeken@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ee59915b77a Replace the frameloader after marking the BC as not being in BFCache anymore. r=nika
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Regressions: 1743353
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: