зеркало из https://github.com/mozilla/gecko-dev.git
Bug 607417 - Reconcile async scrolling for fixed position layers (part 2). r=ajuma
Part of this patch got lost in a rebase, this completes it. Untranslate fixed position layers when doing async scrolling so that they don't jump about as content re-renders them in the correct place.
This commit is contained in:
Родитель
0510bc7eb7
Коммит
a2f153a4f3
|
@ -396,6 +396,15 @@ CompositorParent::TransformShadowTree()
|
|||
(mScrollOffset.y / tempScaleDiffY - metricsScrollOffset.y) * mYScale);
|
||||
ViewTransform treeTransform(-scrollCompensation, mXScale, mYScale);
|
||||
shadow->SetShadowTransform(gfx3DMatrix(treeTransform) * currentTransform);
|
||||
|
||||
// Alter the scroll offset so that fixed position layers remain within
|
||||
// the page area.
|
||||
int offsetX = NS_MAX(0, NS_MIN(mScrollOffset.x, mContentSize.width - mWidgetSize.width));
|
||||
int offsetY = NS_MAX(0, NS_MIN(mScrollOffset.y, mContentSize.height - mWidgetSize.height));
|
||||
gfxPoint reverseViewTranslation(offsetX / tempScaleDiffX - metricsScrollOffset.x,
|
||||
offsetY / tempScaleDiffY - metricsScrollOffset.y);
|
||||
|
||||
TranslateFixedLayers(layer, reverseViewTranslation);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче