Audit usage of nsIDocShellTreeItem in PresShell::GetParentPresShellForEventHandling
Categories
(Core :: DOM: Events, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: djvj, Assigned: edgar)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rm-docshell-tree-item:hard])
Attachments
(1 file)
In file layout/base/PresShell.cpp
Users are PresShell::GetRootWindow, and PresShell::EventHandler::HandleEvent
Used mainly to for event retargeting to parent PresShell.
Change to use BrowsingContext.
If parent is out-of-process DocShell, then forward event handling via IPC.
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
|
||
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
Comment 3•5 years ago
|
||
The priority flag is not set for this bug.
:jwatt, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 4•5 years ago
|
||
Auditing whether this use of nsIDocShellTreeItem breaks when Fission is enabled blocks Fission Nightly.
Comment 5•4 years ago
|
||
Emilio, is this something you will be able to look into?
Comment 6•4 years ago
|
||
This looks like relatively self-contained code a DOM::Events person should probably look at.
My understanding of this is that this is mostly trying to handle a rare error condition, and if there's no parent document we just don't fire the event (which seems fine if my understanding of how we dispatch events across processes works).
Masayuki, is that right? If so we could close this, or we could try to remove the error-handling case so that fission becomes more similar to non-fission... But not 100% sure how can we hit that other than maybe clicking on an iframe that removes itself or something...
Comment 7•4 years ago
|
||
It was introduced by bug 573689. It was important pre-e10s world for making sure that any key events can be handled by UI in chrome. It seems that in e10s world, it's not required because if not dispatching keyboard events won't block the event propagation in the main process. I guess that keyboard input in OOP iframe shouldn't be propagated in parent of the iframe because of privacy reason. So, I guess that this handling is not required in release build (but perhaps, need to keep it for debugging with --disable-e10s
).
Updated•4 years ago
|
Comment 8•4 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #7)
It was introduced by bug 573689. It was important pre-e10s world for making sure that any key events can be handled by UI in chrome. It seems that in e10s world, it's not required because if not dispatching keyboard events won't block the event propagation in the main process. I guess that keyboard input in OOP iframe shouldn't be propagated in parent of the iframe because of privacy reason.
Confirmed with Edgar that it's discussed and reviewed when he fixed mouse enter/leave events dispatching in OOP iframe. The conclusion and current implementation is that key event in OOP iframes won't be propagated to parent.
So, I guess that this handling is not required in release build (but perhaps, need to keep it for debugging with
--disable-e10s
).
With the confirmation above, sounds we can close this bug?
Assignee | ||
Comment 9•4 years ago
|
||
(In reply to Hsin-Yi Tsai [:hsinyi] from comment #8)
With the confirmation above, sounds we can close this bug?
If my understanding is correct, we should keep this behavior but replace the usage of nsIDocShellTreeItem with BrowsingContext. Take this bug.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
Assignee | ||
Comment 11•4 years ago
•
|
||
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 12•4 years ago
|
||
Assignee | ||
Comment 13•4 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #2)
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.
Given that this code works as-is with Fission, maybe we could move Fission Milestone to future?
Comment 14•4 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #13)
Given that this code works as-is with Fission, maybe we could move Fission Milestone to future?
Sure. In that case, this bug doesn't need to block shipping the Fission MVP. I'll move this bug to Fission Future as you suggest.
Updated•4 years ago
|
Comment 15•4 years ago
|
||
Comment 16•4 years ago
|
||
bugherder |
Description
•