Use nsLayoutUtils::IsAncestorFrameCrossDocInProcess instead of nsLayoutUtils::IsAncestorFrameCrossDoc
Categories
(Core :: Layout, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox92 | --- | fixed |
People
(Reporter: hiro, Assigned: hiro)
References
()
Details
Attachments
(8 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
nsLayoutUtils::IsAncestorFrameCrossDoc is using GetCrossDocParentFrame which doesn't work across process boundaries. In bug 1523500 I am going to introduce a new similar function named IsAncestorFrameCrossDocInProcess which is using GetCrossDocParentFrameInProcess instead.
All call sites of IsAncestorFrameCrossDoc seems to have been audited in bug 1523439, so hopefully they can be simply replaced by the new IsAncestorFrameCrossDocInProcess function.
Assignee | ||
Updated•4 years ago
|
Comment 1•3 years ago
|
||
hiro, hope you don't mind if I assign this to you, to get it out of the unassigned-fission-bugs queue.
(It sounds like this is just a simple string-replacement and there's no more auditing/investigation that really needs to be done here -- is that right? If so, I'm hoping it doesn't add too much to have this on your queue.)
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Our IntersectionObserver has been working in OOP iframe since bug 1599795.
Assignee | ||
Comment 3•3 years ago
|
||
As we audited in bug 1523500, the root scrollable frame in the OOP iframe is
always active, so using IsAncestorFrameCrossDocInProcess would be sufficient
for the assertions.
Depends on D117500
Assignee | ||
Comment 4•3 years ago
|
||
And add a note to clarify IsAncestorFrameCrossDocInProcess doesn't work
across different process documents.
Depends on D117501
Assignee | ||
Comment 5•3 years ago
|
||
I've replaced some of the call sites of IsAncestorFrameCrossDocInProcess, but I haven't some of them. Reasonings are below;
-
In DOMIntersectionObserver::Update handled in D117500
-
In GetClosest, deferred to bug 1715932, it's mobile specific.
-
In PresShell::ClearMouseCapture, this was audited in bug 1533499, but it's quite unclear to me why it's okay to replace with the in-process version of IsAncestorFrameCrossDoc (there is no reasoning description in the bug)
-
In nsLayoutUtils::IsProperAncestorFrameCrossDoc, there are two call sites of this functionl
- In GetClosest will be also handled in bug 1715932.
- In PruneDisplayListForExtraPage which was introduced in bug 792314, it was for display-list-
based-invalidation (DLBI) stuff on print preview, it looks okay to me since print preview basically isn't partially updated, it's fully refreshed when print settings are changed or some such, but I am not 100% sure
-
In nsLayoutUtils::TransformFrameRectToAncestor for an assertion which was introduced in bug 1668156, it's supposed to work in the same process, handled in D117502
-
Remaining call sites are for assertions in AGR related stuff(A search query of IsAncestorFrameCrossDoc calls in layout/paint as of 20210611) handled in D117501
Assignee | ||
Updated•3 years ago
|
Comment 7•3 years ago
|
||
bugherder |
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D119067
Assignee | ||
Comment 9•3 years ago
|
||
Since bug 1717726 we've disallowed having remote <browser> or remote <iframe>
inside nsDeckFrame which means captureingFrame
in ClearMouseCapture(nsIFrame*)
function will never be called in an out-of-process thus we can use
IsAncestorFrameCrossDocInProcess there.
Also add an assertions that the function gets called only with a child frame of
nsDeckFrame since this function is used only inside nsDeckFrame.
Depends on D119068
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
bugherder |
Assignee | ||
Comment 12•3 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #5)
- In PruneDisplayListForExtraPage which was introduced in bug 792314, it was for display-list-
based-invalidation (DLBI) stuff on print preview, it looks okay to me since print preview basically isn't partially updated, it's fully refreshed when print settings are changed or some such, but I am not 100% sure
This was wrong. PruneDisplayListForExtraPage was introduced in bug 411585.
Assignee | ||
Comment 13•3 years ago
|
||
The last remaining part of this bug is IsProperAncestorFrameCrossDoc call in PruneDisplayListForExtraPage. Now I am ~100% sure since our printing machinery for cross process iframes are totally different and it's been working (since bug 1662336 I presume).
PruneDisplayListForExtraPage
is for cases where placeholders for out-of-flow frames are inside a page frame but the real frame we need to paint is in a different page such as;
<div style="height:800px;"></div>
<div style="position:absolute; top:0; left:0;">This text should be visible in print preview</div>
This is actually a test case introduced along with PruneDisplayListForExtraPage
.
The PruneDisplayListForExtraPage
seems to try to eliminate unnecessary display items for the given page frame if there's any out-of-flow frames as a comment described. We don't need to be worried in OOP iframe cases since we will never have display items for OOP iframe's document elements. (Though I think PruneDisplayListForExtraPage
should work for cases where there's no out-of-flow contents, such as a tall div element is fragmented into two pages or some such).
Anyway, I am going to add a couple of test cases similar to 411585-1.html but oop iframe's version in this bug. To make the iframe's test work correctly we need bug 1695806.
Assignee | ||
Comment 14•3 years ago
|
||
These tests are variants of layout/reftests/bugs/411585-1.html but with
cross-origin iframes.
position-absolute-iframe-print-001.sub.html is a simple case like this;
<div style="height:200vh;"></div>
<iframe style="position:absolute; top: 0; left: 0;"></iframe>
position-absolute-iframe-print-002.sub.html is a nested version something like;
document A1 -> domain B -> domain A2, A1 and A2 is the same domain.
Assignee | ||
Comment 15•3 years ago
|
||
It's not used at all.
Depends on D120426
Assignee | ||
Comment 16•3 years ago
|
||
Depends on D120427
Assignee | ||
Updated•3 years ago
|
Comment 17•3 years ago
|
||
Comment 19•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bf8d248a505d
https://hg.mozilla.org/mozilla-central/rev/dd0f8b4683e6
https://hg.mozilla.org/mozilla-central/rev/089c3e31a467
Description
•