зеркало из https://github.com/mozilla/gecko-dev.git
Bug 959847. Part 2. Don't ignore "ignore viewport scrolling" on subdocuments. r=roc
This means that the layer we create in nsSubDocumentFrame::BuildDisplayList becomes the scrollable layer for the document and we early early from ScrollFrameHelper::BuildDisplayList before it gets to the nsDisplayScrollLayer creation.
This commit is contained in:
Родитель
8c37717882
Коммит
502b511f5a
|
@ -373,6 +373,8 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
nsRect dirty;
|
||||
bool haveDisplayPort = false;
|
||||
bool ignoreViewportScrolling = false;
|
||||
nsIFrame* savedIgnoreScrollFrame = nullptr;
|
||||
if (subdocRootFrame) {
|
||||
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
|
||||
nsIContent* content = rootScrollFrame ? rootScrollFrame->GetContent() : nullptr;
|
||||
|
@ -387,6 +389,13 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
dirty = dirty.ConvertAppUnitsRoundOut(parentAPD, subdocAPD);
|
||||
}
|
||||
|
||||
ignoreViewportScrolling =
|
||||
rootScrollFrame && presShell->IgnoringViewportScrolling();
|
||||
if (ignoreViewportScrolling) {
|
||||
savedIgnoreScrollFrame = aBuilder->GetIgnoreScrollFrame();
|
||||
aBuilder->SetIgnoreScrollFrame(rootScrollFrame);
|
||||
}
|
||||
|
||||
aBuilder->EnterPresShell(subdocRootFrame, dirty);
|
||||
}
|
||||
|
||||
|
@ -479,6 +488,10 @@ nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
|||
|
||||
if (subdocRootFrame) {
|
||||
aBuilder->LeavePresShell(subdocRootFrame, dirty);
|
||||
|
||||
if (ignoreViewportScrolling) {
|
||||
aBuilder->SetIgnoreScrollFrame(savedIgnoreScrollFrame);
|
||||
}
|
||||
}
|
||||
|
||||
if (aBuilder->IsForImageVisibility()) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче