Bug 910529. Part 2. In nsLayoutUtils::PaintFrame, display port and ignoring viewport scrolling should only happen when we are drawing the root frame. r=matt.woodrow

This commit is contained in:
Timothy Nikkel 2013-08-28 22:38:15 -05:00
Родитель e5090e25a7
Коммит dc4eed8ded
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -1906,14 +1906,15 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
nsIFrame* rootScrollFrame = presShell->GetRootScrollFrame();
bool usingDisplayPort = false;
nsRect displayport;
if (rootScrollFrame) {
if (rootScrollFrame && !aFrame->GetParent()) {
nsIContent* content = rootScrollFrame->GetContent();
if (content) {
usingDisplayPort = nsLayoutUtils::GetDisplayPort(content, &displayport);
}
}
bool ignoreViewportScrolling = presShell->IgnoringViewportScrolling();
bool ignoreViewportScrolling =
aFrame->GetParent() ? false : presShell->IgnoringViewportScrolling();
nsRegion visibleRegion;
if (aFlags & PAINT_WIDGET_LAYERS) {
// This layer tree will be reused, so we'll need to calculate it
@ -1975,7 +1976,7 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
}
#endif
if (ignoreViewportScrolling && rootScrollFrame && !aFrame->GetParent()) {
if (ignoreViewportScrolling && rootScrollFrame) {
nsIScrollableFrame* rootScrollableFrame =
presShell->GetRootScrollFrameAsScrollable();
if (aFlags & PAINT_DOCUMENT_RELATIVE) {