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
|
||||
// the page area.
|
||||
int offsetX = NS_MAX(0, NS_MIN(mScrollOffset.x, mContentRect.width - mWidgetSize.width));
|
||||
int offsetY = NS_MAX(0, NS_MIN(mScrollOffset.y, mContentRect.height - mWidgetSize.height));
|
||||
gfxPoint reverseViewTranslation(offsetX / tempScaleDiffX - metricsScrollOffset.x,
|
||||
offsetY / tempScaleDiffY - metricsScrollOffset.y);
|
||||
float offsetX = mScrollOffset.x / tempScaleDiffX;
|
||||
float offsetY = mScrollOffset.y / tempScaleDiffY;
|
||||
offsetX = NS_MAX((float)mContentRect.x, NS_MIN(offsetX, (float)(mContentRect.XMost() - mWidgetSize.width)));
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user