Backed out changeset 006445ffcddd (bug 1351412) for reftest failing in async-scrolling

--HG--
extra : rebase_source : 5366c018c781ab67779065a13c92def70fcefb2b
This commit is contained in:
Iris Hsiao 2017-04-10 14:42:31 +08:00
Родитель eefdcc1259
Коммит 9be4542d32
1 изменённых файлов: 7 добавлений и 8 удалений

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

@ -3785,25 +3785,24 @@ ContainerState::GetDisplayPortForAnimatedGeometryRoot(AnimatedGeometryRoot* aAni
return mLastDisplayPortRect;
}
mLastDisplayPortAGR = aAnimatedGeometryRoot;
nsIScrollableFrame* sf = nsLayoutUtils::GetScrollableFrameFor(*aAnimatedGeometryRoot);
if (sf == nullptr || nsLayoutUtils::UsesAsyncScrolling(*aAnimatedGeometryRoot)) {
mLastDisplayPortRect = nsRect();
return mLastDisplayPortRect;
return nsRect();
}
mLastDisplayPortAGR = aAnimatedGeometryRoot;
nsRect& displayport = mLastDisplayPortRect;;
bool usingDisplayport =
nsLayoutUtils::GetDisplayPort((*aAnimatedGeometryRoot)->GetContent(), &mLastDisplayPortRect,
nsLayoutUtils::GetDisplayPort((*aAnimatedGeometryRoot)->GetContent(), &displayport,
RelativeTo::ScrollFrame);
if (!usingDisplayport) {
// No async scrolling, so all that matters is that the layer contents
// cover the scrollport.
mLastDisplayPortRect = sf->GetScrollPortRect();
displayport = sf->GetScrollPortRect();
}
nsIFrame* scrollFrame = do_QueryFrame(sf);
mLastDisplayPortRect += scrollFrame->GetOffsetToCrossDoc(mContainerReferenceFrame);
return mLastDisplayPortRect;
displayport += scrollFrame->GetOffsetToCrossDoc(mContainerReferenceFrame);
return displayport;
}
nsIntRegion