Closed Bug 1585070 Opened 5 years ago Closed 4 years ago

Fix :-moz-window-inactive to work under Fission

Categories

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

defect

Tracking

()

RESOLVED FIXED
85 Branch
Fission Milestone M6c
Tracking Status
firefox85 --- fixed

People

(Reporter: djvj, Assigned: smacleod)

References

(Blocks 1 open bug)

Details

(Whiteboard: [rm-docshell-tree-item:sync-state])

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/153feabebc2d13bb4c29ef8adf104ec1ebd246ae/dom/base/Document.cpp#6753

This simply retrieves the IsActive flag of the root window and returns it (if the root docshell exists). The IsActive flag should be moved to the BrowsingContext and this code changed to use the BrowsingContext tree to retrieve it.

Fission Milestone: --- → M5
Priority: -- → P2
Whiteboard: [rm-docshell-tree-item:simple]
Fission Milestone: M5 → Future

Kannan says replacing nsIDocShellTreeItem calls should block enabling Fission in Nightly (M6).

Fission Milestone: Future → M6
Whiteboard: [rm-docshell-tree-item:simple] → [rm-docshell-tree-item:sync-state]

We need to audit this use of the nsIDocShellTreeItem interface. With Fission enabled, Documents and nsDocShells for related frames, such as subframes and parent documents, may not be available within the current process and the corresponding nsIDocShellTreeItem methods will return null.

If this code is broken with Fission, fixing it blocks enabling Fission is Nightly.

If this code works as-is with Fission, we don't need to remove this usage of nsIDocShellTreeItem until when we remove nsIDocShellTreeItem entirely (bug 1607591) after we ship Fission MVP.

Fission documentation about replacing nsIDocShellTree Item:
https://wiki.mozilla.org/Project_Fission/DocShell_Tree_Replace

:farre's presentation with examples of replacing nsIDocShellTreeItem with BrowsingContext, WindowContext, SyncedContexts, and BrowsingContextGroup:
https://docs.google.com/presentation/d/1K4j6ngty64TZjJNS5qH-MBoOm3TI2dJedVsbH8jUhKE/edit#slide=id.g6e35225e5d_1_264

Summary: Fix usage of nsIDocShellTreeItem in IsTopLevelWindowActive → Audit usage of nsIDocShellTreeItem in IsTopLevelWindowActive

Auditing whether this use of nsIDocShellTreeItem breaks when Fission is enabled blocks Fission Nightly.

Fission Milestone: M6 → M6b
Summary: Audit usage of nsIDocShellTreeItem in IsTopLevelWindowActive → Audit usage of nsIDocShellTreeItem in IsTopLevelWindowInactive
Flags: needinfo?(hsivonen)
Assignee: nobody → smacleod
Status: NEW → ASSIGNED
Fission Milestone: M6b → M6c
Flags: needinfo?(hsivonen)

A new BrowsingContext field, isActiveBrowserWindow, has been added
to track the active browser window for the :-moz-window-inactive
pseudoclass. This field takes the place of
nsPIDOMWindowOuter::mIsActive.

With this change :-moz-window-inactive is now fission compatible.

Pushed by smacleod@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/178fa7e29bb6
move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r=farre

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:smacleod, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(smacleod)

Was looking at M6b fission bugs before coming back to this. New patch is up which should fix things.

Flags: needinfo?(smacleod)
Attachment #9168894 - Attachment description: Bug 1585070 - move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r?farre → Bug 1585070 - move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r?kmag!
Summary: Audit usage of nsIDocShellTreeItem in IsTopLevelWindowInactive → Fix the usage of nsIDocShellTreeItem in IsTopLevelWindowInactive

Adjusting summary as the patch fixes the entire feature and other related/broken code.

Summary: Fix the usage of nsIDocShellTreeItem in IsTopLevelWindowInactive → Fix :-moz-window-inactive to work under Fission
Priority: P2 → P1
Pushed by smacleod@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/18448a7ebf82
move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r=kmag
Pushed by smacleod@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/35f3e90b3657
move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r=kmag

Updated patch should fix the test breakages.

Flags: needinfo?(smacleod)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: