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:
Chris Lord 2012-05-26 11:43:41 +01:00
Родитель 0510bc7eb7
Коммит a2f153a4f3
1 изменённых файлов: 9 добавлений и 0 удалений

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

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