mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 828249 - Fix fixed layer positioning when zoomed out beyond page bounds. r=kats
width/height parameters in CompositorParent got mixed up at some point.
This commit is contained in:
parent
d0161b544c
commit
3c6477ca95
@ -1003,22 +1003,22 @@ CompositorParent::TransformShadowTree(TimeStamp aCurrentFrame)
|
||||
// within the page boundaries.
|
||||
if (mContentRect.width * tempScaleDiffX < metrics.mCompositionBounds.width) {
|
||||
offset.x = -metricsScrollOffset.x;
|
||||
scaleDiff.height = NS_MIN(1.0f, metrics.mCompositionBounds.width / (float)mContentRect.width);
|
||||
scaleDiff.width = NS_MIN(1.0f, metrics.mCompositionBounds.width / (float)mContentRect.width);
|
||||
} else {
|
||||
offset.x = clamped(mScrollOffset.x / tempScaleDiffX, (float)mContentRect.x,
|
||||
mContentRect.XMost() - metrics.mCompositionBounds.width / tempScaleDiffX) -
|
||||
metricsScrollOffset.x;
|
||||
scaleDiff.height = tempScaleDiffX;
|
||||
scaleDiff.width = tempScaleDiffX;
|
||||
}
|
||||
|
||||
if (mContentRect.height * tempScaleDiffY < metrics.mCompositionBounds.height) {
|
||||
offset.y = -metricsScrollOffset.y;
|
||||
scaleDiff.width = NS_MIN(1.0f, metrics.mCompositionBounds.height / (float)mContentRect.height);
|
||||
scaleDiff.height = NS_MIN(1.0f, metrics.mCompositionBounds.height / (float)mContentRect.height);
|
||||
} else {
|
||||
offset.y = clamped(mScrollOffset.y / tempScaleDiffY, (float)mContentRect.y,
|
||||
mContentRect.YMost() - metrics.mCompositionBounds.height / tempScaleDiffY) -
|
||||
metricsScrollOffset.y;
|
||||
scaleDiff.width = tempScaleDiffY;
|
||||
scaleDiff.height = tempScaleDiffY;
|
||||
}
|
||||
|
||||
// The transform already takes the resolution scale into account. Since we
|
||||
|
Loading…
Reference in New Issue
Block a user