Bug 1556556 - Remove many uses of IgnoreRootScrollFrame. r=mstange,geckoview-reviewers,agi

Differential Revision: https://phabricator.services.mozilla.com/D68913
This commit is contained in:
Botond Ballo
2020-05-05 19:23:35 +00:00
parent 4a85ea8d31
commit ba5c0d6ae5
10 changed files with 7 additions and 69 deletions

View File

@@ -394,7 +394,6 @@ void nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
nsRect visible;
nsRect dirty;
bool ignoreViewportScrolling = false;
nsIFrame* savedIgnoreScrollFrame = nullptr;
if (subdocRootFrame) {
// get the dirty rect relative to the root frame of the subdoc
visible = aBuilder->GetVisibleRect() + GetOffsetToCrossDoc(subdocRootFrame);
@@ -403,10 +402,8 @@ void nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
visible = visible.ScaleToOtherAppUnitsRoundOut(parentAPD, subdocAPD);
dirty = dirty.ScaleToOtherAppUnitsRoundOut(parentAPD, subdocAPD);
if (nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame()) {
nsIScrollableFrame* rootScrollableFrame =
presShell->GetRootScrollFrameAsScrollable();
MOZ_ASSERT(rootScrollableFrame);
if (nsIScrollableFrame* rootScrollableFrame =
presShell->GetRootScrollFrameAsScrollable()) {
// Use a copy, so the rects don't get modified.
nsRect copyOfDirty = dirty;
nsRect copyOfVisible = visible;
@@ -416,10 +413,6 @@ void nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
/* aSetBase = */ true);
ignoreViewportScrolling = presShell->IgnoringViewportScrolling();
if (ignoreViewportScrolling) {
savedIgnoreScrollFrame = aBuilder->GetIgnoreScrollFrame();
aBuilder->SetIgnoreScrollFrame(rootScrollFrame);
}
}
aBuilder->EnterPresShell(subdocRootFrame, pointerEventsNone);
@@ -514,10 +507,6 @@ void nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (subdocRootFrame) {
aBuilder->LeavePresShell(subdocRootFrame, &childItems);
if (ignoreViewportScrolling) {
aBuilder->SetIgnoreScrollFrame(savedIgnoreScrollFrame);
}
}
// Generate a resolution and/or zoom item if needed. If one or both of those