mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Bug 1698987: Use GetCrossDocParentFrameInProcess() in nsSubDocumentFrame. r=tnikkel
This patch doesn't change behavior; GetCrossDocParentFrameInProcess() is just a wrapper for GetCrossDocParentFrame(), which is what we were calling before. The "InProcess" version of this API (which we're migrating to in this patch) is used to annotate GetCrossDocParentFrame() callsites that have been vetted as being OK with the fact that this API returns null at the boundary of a cross-origin iframe, if fission is enabled. In this patch, the two calls that I'm migrating are inside of EndSwapDocShellsForViews, which gets called when a tab is dragged between windows. I'm annotating these two calls as OK, because: - the first call is about maintaining the NS_FRAME_IN_POPUP state, which is used for things like the menulist-dropdown popup. This bit doesn't need to be propagated across process boundaries. - the second call is about propagating a "needs-paint" notification up to ancestor documents. I think we already handle paint invalidation for cross-process iframes properly, independent of the explicit invalidation that we're doing here. Differential Revision: https://phabricator.services.mozilla.com/D108704
This commit is contained in:
parent
e1ff523623
commit
a945fcf496
@ -1068,7 +1068,7 @@ static void EndSwapDocShellsForViews(nsView* aSibling) {
|
||||
}
|
||||
nsIFrame* frame = aSibling->GetFrame();
|
||||
if (frame) {
|
||||
nsIFrame* parent = nsLayoutUtils::GetCrossDocParentFrame(frame);
|
||||
nsIFrame* parent = nsLayoutUtils::GetCrossDocParentFrameInProcess(frame);
|
||||
if (parent->HasAnyStateBits(NS_FRAME_IN_POPUP)) {
|
||||
nsIFrame::AddInPopupStateBitToDescendants(frame);
|
||||
} else {
|
||||
@ -1079,7 +1079,7 @@ static void EndSwapDocShellsForViews(nsView* aSibling) {
|
||||
!parent->HasAnyStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT |
|
||||
NS_FRAME_IS_NONDISPLAY)) {
|
||||
parent->AddStateBits(NS_FRAME_DESCENDANT_NEEDS_PAINT);
|
||||
parent = nsLayoutUtils::GetCrossDocParentFrame(parent);
|
||||
parent = nsLayoutUtils::GetCrossDocParentFrameInProcess(parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user