Bug 746120 - Transform the root layer even if not scrollable so it doesn't cause separation of layers. r=ajuma

This commit is contained in:
Kartikaya Gupta 2012-04-26 15:24:06 -04:00
parent 979e7b9d7e
commit d18af6cc2d

View File

@ -364,11 +364,13 @@ CompositorParent::TransformShadowTree()
// primary scrollable layer. We compare this to the desired zoom and scroll
// offset in the view transform we obtained from Java in order to compute the
// transformation we need to apply.
if (metrics && metrics->IsScrollable()) {
if (metrics) {
float tempScaleDiffX = rootScaleX * mXScale;
float tempScaleDiffY = rootScaleY * mYScale;
nsIntPoint metricsScrollOffset = metrics->mViewportScrollOffset;
nsIntPoint metricsScrollOffset(0, 0);
if (metrics->IsScrollable())
metricsScrollOffset = metrics->mViewportScrollOffset;
nsIntPoint scrollCompensation(
(mScrollOffset.x / tempScaleDiffX - metricsScrollOffset.x) * mXScale,