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:
Timothy Nikkel 2014-02-27 16:01:52 -06:00
Родитель 8c37717882
Коммит 502b511f5a
1 изменённых файлов: 13 добавлений и 0 удалений

Просмотреть файл

@ -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()) {