mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1165536. Don't include resolution compensation when adjusting the cliprect of ancestors of scrollbars. r=botond
We are trying to adjust for the async transform that gets applied to the scrollable container layer by applying a transform to the scrollbar layer. That means we also need to adjust our clip rect. The resolution compensation is not done for this reason (compensating for a transform on an ancestor layer), hence we don't need to adjust the clip rect for the resolution compensation.
This commit is contained in:
parent
a9e0fdae17
commit
16445fc64d
@ -831,17 +831,18 @@ ApplyAsyncTransformToScrollbarForContent(Layer* aScrollbar,
|
||||
Matrix4x4 contentTransform = aContent.GetTransform();
|
||||
Matrix4x4 contentUntransform = contentTransform.Inverse();
|
||||
|
||||
compensation = compensation
|
||||
* contentTransform
|
||||
* asyncUntransform
|
||||
* contentUntransform;
|
||||
Matrix4x4 asyncCompensation = contentTransform
|
||||
* asyncUntransform
|
||||
* contentUntransform;
|
||||
|
||||
compensation = compensation * asyncCompensation;
|
||||
|
||||
// We also need to make a corresponding change on the clip rect of all the
|
||||
// layers on the ancestor chain from the scrollbar layer up to but not
|
||||
// including the layer with the async transform. Otherwise the scrollbar
|
||||
// shifts but gets clipped and so appears to flicker.
|
||||
for (Layer* ancestor = aScrollbar; ancestor != aContent.GetLayer(); ancestor = ancestor->GetParent()) {
|
||||
TransformClipRect(ancestor, compensation);
|
||||
TransformClipRect(ancestor, asyncCompensation);
|
||||
}
|
||||
}
|
||||
transform = transform * compensation;
|
||||
|
Loading…
Reference in New Issue
Block a user