mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1924277. nsIFrame::IsScrolledOutOfView should intersect the rect with scroll frames that clip it. r=hiro,layout-reviewers,jwatt,emilio
Seems like we should be doing this as a frame that is clipped out fully but requires two scroll frames to fully clip it is just as visible as a frame where one scroll frame fully clips it. Differential Revision: https://phabricator.services.mozilla.com/D225442
This commit is contained in:
parent
b6e1f6ec3a
commit
15ff5d04a1
@ -11320,18 +11320,12 @@ static bool IsFrameRectScrolledOutOfView(const nsIFrame* aTarget,
|
||||
nsRect transformedRect = nsLayoutUtils::TransformFrameRectToAncestor(
|
||||
aTarget, aTargetRect, clipParent);
|
||||
|
||||
if (transformedRect.IsEmpty()) {
|
||||
// If the transformed rect is empty it represents a line or a point that we
|
||||
// should check is outside the the scrollable rect.
|
||||
if (transformedRect.x > clipRect.XMost() ||
|
||||
transformedRect.y > clipRect.YMost() ||
|
||||
clipRect.x > transformedRect.XMost() ||
|
||||
clipRect.y > transformedRect.YMost()) {
|
||||
return true;
|
||||
}
|
||||
} else if (!transformedRect.Intersects(clipRect)) {
|
||||
Maybe<nsRect> intersection =
|
||||
transformedRect.EdgeInclusiveIntersection(clipRect);
|
||||
if (intersection.isNothing()) {
|
||||
return true;
|
||||
}
|
||||
transformedRect = *intersection;
|
||||
|
||||
nsIFrame* parent = clipParent->GetParent();
|
||||
if (!parent) {
|
||||
|
Loading…
Reference in New Issue
Block a user