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:
Timothy Nikkel 2015-05-17 02:00:10 -05:00
Родитель 9fa6778286
Коммит 93231ce78b
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -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;