зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
9fa6778286
Коммит
93231ce78b
|
@ -831,17 +831,18 @@ ApplyAsyncTransformToScrollbarForContent(Layer* aScrollbar,
|
||||||
Matrix4x4 contentTransform = aContent.GetTransform();
|
Matrix4x4 contentTransform = aContent.GetTransform();
|
||||||
Matrix4x4 contentUntransform = contentTransform.Inverse();
|
Matrix4x4 contentUntransform = contentTransform.Inverse();
|
||||||
|
|
||||||
compensation = compensation
|
Matrix4x4 asyncCompensation = contentTransform
|
||||||
* contentTransform
|
* asyncUntransform
|
||||||
* asyncUntransform
|
* contentUntransform;
|
||||||
* contentUntransform;
|
|
||||||
|
compensation = compensation * asyncCompensation;
|
||||||
|
|
||||||
// We also need to make a corresponding change on the clip rect of all the
|
// 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
|
// layers on the ancestor chain from the scrollbar layer up to but not
|
||||||
// including the layer with the async transform. Otherwise the scrollbar
|
// including the layer with the async transform. Otherwise the scrollbar
|
||||||
// shifts but gets clipped and so appears to flicker.
|
// shifts but gets clipped and so appears to flicker.
|
||||||
for (Layer* ancestor = aScrollbar; ancestor != aContent.GetLayer(); ancestor = ancestor->GetParent()) {
|
for (Layer* ancestor = aScrollbar; ancestor != aContent.GetLayer(); ancestor = ancestor->GetParent()) {
|
||||||
TransformClipRect(ancestor, compensation);
|
TransformClipRect(ancestor, asyncCompensation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
transform = transform * compensation;
|
transform = transform * compensation;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче