mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 607417 - Clamp the transform of fixed-position layers to work with RTL pages (interaction with bug 748384). r=ajuma
This commit is contained in:
parent
893d53c11b
commit
ff7dbddcd6
@ -399,10 +399,12 @@ CompositorParent::TransformShadowTree()
|
|||||||
|
|
||||||
// Alter the scroll offset so that fixed position layers remain within
|
// Alter the scroll offset so that fixed position layers remain within
|
||||||
// the page area.
|
// the page area.
|
||||||
int offsetX = NS_MAX(0, NS_MIN(mScrollOffset.x, mContentRect.width - mWidgetSize.width));
|
float offsetX = mScrollOffset.x / tempScaleDiffX;
|
||||||
int offsetY = NS_MAX(0, NS_MIN(mScrollOffset.y, mContentRect.height - mWidgetSize.height));
|
float offsetY = mScrollOffset.y / tempScaleDiffY;
|
||||||
gfxPoint reverseViewTranslation(offsetX / tempScaleDiffX - metricsScrollOffset.x,
|
offsetX = NS_MAX((float)mContentRect.x, NS_MIN(offsetX, (float)(mContentRect.XMost() - mWidgetSize.width)));
|
||||||
offsetY / tempScaleDiffY - metricsScrollOffset.y);
|
offsetY = NS_MAX((float)mContentRect.y, NS_MIN(offsetY, (float)(mContentRect.YMost() - mWidgetSize.height)));
|
||||||
|
gfxPoint reverseViewTranslation(offsetX - metricsScrollOffset.x,
|
||||||
|
offsetY - metricsScrollOffset.y);
|
||||||
|
|
||||||
TranslateFixedLayers(layer, reverseViewTranslation);
|
TranslateFixedLayers(layer, reverseViewTranslation);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user