Bug 1337944 - Use PreTransformOverflowAreasProperty when checking frame is out of view. r?jwatt
MozReview-Commit-ID: LUTnnEJIUDD
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -10296,17 +10296,19 @@ IsFrameScrolledOutOfView(nsIFrame *aFram
nsLayoutUtils::GetNearestScrollableFrame(aFrame,
nsLayoutUtils::SCROLLABLE_SAME_DOC |
nsLayoutUtils::SCROLLABLE_INCLUDE_HIDDEN);
if (!scrollableFrame) {
return false;
}
nsIFrame *scrollableParent = do_QueryFrame(scrollableFrame);
- nsRect rect = aFrame->GetVisualOverflowRect();
+ nsOverflowAreas preTransformOverflows =
+ aFrame->GetOverflowAreasRelativeToSelf();
+ nsRect rect = preTransformOverflows.VisualOverflow();
nsRect transformedRect =
nsLayoutUtils::TransformFrameRectToAncestor(aFrame,
rect,
scrollableParent);
nsRect scrollableRect = scrollableParent->GetVisualOverflowRect();
if (!transformedRect.Intersects(scrollableRect)) {