Fix nsIDocShellTreeItem usage in nsContentUtils::FindPresShellForDocument
Categories
(Core :: Layout, defect, P2)
Tracking
()
Fission Milestone | M6c |
People
(Reporter: djvj, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [rm-docshell-tree-item:hard])
The primary use is WidgetForDocument, which seems to be primarily used by layout code and rendering code.
This seems like a bit of a difficult fix. The logic walks up the docshell tree and returns the first PresShell that it finds, which may be out of process.
All layout code that uses this needs to be changed.
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•5 years ago
|
||
Kannan says replacing nsIDocShellTreeItem calls should block enabling Fission in Nightly (M6).
Updated•4 years ago
|
Comment 2•4 years ago
|
||
Auditing whether this use of nsIDocShellTreeItem breaks when Fission is enabled blocks Fission Nightly.
Comment 3•4 years ago
|
||
@ Emilio: how should we handle display:none for cross-origin iframes with Fission?
Comment 4•4 years ago
|
||
Can you clarify? A display: none iframe doesn't create a load, and thus shouldn't create a new process, as far as I can tell.
Updated•4 years ago
|
Comment 5•4 years ago
|
||
But I think it can basically be left as is, with s/DocShellTreeItem/BrowsingContext, or even just GetInProcessParentDocument
or such... I think it may need to cross the content / chrome boundary for non-e10s, but...
Comment 6•4 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)
A display: none iframe doesn't create a load, and thus shouldn't create a new process, as far as I can tell.
But I think it can basically be left as is, with s/DocShellTreeItem/BrowsingContext, or even just
GetInProcessParentDocument
or such... I think it may need to cross the content / chrome boundary for non-e10s, but...
Nika, does this answer your question about display:none? Can we postpone these FindPresShellForDocument changes to Fission Future?
Comment 7•4 years ago
|
||
I was trying to figure out what this code was doing, and it seemed, from some of the nearby comments, that this was intended to find the PresShell for a document in a display:none
iframe element. I was also under the impression that a display:none
iframe isn't loaded so we would never end up in this situation, but that made me uncertain as to what the code does.
If we never have an <iframe>
which has no PresShell
, could we perhaps get away with getting rid of this function entirely?
Comment 8•4 years ago
|
||
err, I don't know what was I thinking, an iframe without a presshell can totally happen. However for cross-process iframes apparently it can't, but that seems more like a bug than anything else. Probably we should figure out what to do with this code in bug 1639328.
Comment 11•4 years ago
|
||
Not really, but it's not clear what the right fix for this would look like. In fission iframes we'd find the PuppetWidget right away so we shouldn't need to walk past process boundaries, so the code I think works as expected right now.
Comment 12•4 years ago
|
||
Resolving WONTFIX based on comment 11
Description
•