Audit nsIDocShellTreeItem usage in ResetFocusState in layout/base/nsDocumentViewer.cpp
Categories
(Core :: Layout, task, P2)
Tracking
()
Fission Milestone | M6c |
People
(Reporter: djvj, Assigned: u608768)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rm-docshell-tree-item:hard][print2020_v81])
In file layout/base/nsDocumentViewer.cpp
Uses DocShellEnumerator to call ClearFocus on each inner document window.
Called from ExitPrintPreview only.
Change to using some BrowsingContextEnumerator (new data structure).
Use IPC to handle out-of-process children.
Rare situation, not too perf sensitive, to IPC is ok.
Comment 1•5 years ago
|
||
Kannan says replacing nsIDocShellTreeItem calls should block enabling Fission in Nightly (M6).
Updated•5 years ago
|
Comment 2•5 years ago
|
||
:smaug, the comment here suggests that this code may not be necessary at all anymore. Do you think it would be possible to remove it entirely? https://searchfox.org/mozilla-central/rev/96f1457323cc598a36f5701f8e67aedaf97acfcf/layout/base/nsDocumentViewer.cpp#3762-3764
Comment 3•5 years ago
|
||
Moving to Layout.
Please 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 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
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Auditing whether this use of nsIDocShellTreeItem breaks when Fission is enabled blocks Fission Nightly.
Comment 5•5 years ago
|
||
I believe it could be removed, but jwatt could confirm too. He wrote the comment.
Comment 6•4 years ago
|
||
If I'd convinced myself it was true I would have just removed it. ;) It seemed likely to me, hence the comment, but it needs to be investigated to make sure we don't need it to, say, break reference loops. I left the needinfo to see if I could make time to look into this but so far I haven't been able to, so I guess I should at least comment here.
Comment 7•4 years ago
|
||
Putting the print whiteboard tag on this since it seems to be solely print related.
Comment 8•4 years ago
|
||
Looks like kashav has started replacing the usage in ResetFocusState in bug 1655521, so regardless whether the function call of ResetFocusState is necessary or not, we can close this bug once after bug 1655521. (I mean we can defer the decision of the necessity in a later bug).
Comment 9•4 years ago
|
||
Now the function was dropped in bug 1655521.
Updated•4 years ago
|
Description
•