Backed out changeset 8179a07a4181 (bug 1009306) for m6 and m7 android test failures on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2014-06-30 12:31:07 +02:00
Родитель f14e1b61e4
Коммит 2711b03876
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -1449,7 +1449,9 @@ ContainerState::CreateOrRecycleThebesLayer(const nsIFrame* aAnimatedGeometryRoot
nsRefPtr<ThebesLayer> layer;
ThebesDisplayItemLayerUserData* data;
bool layerRecycled = false;
#ifndef MOZ_ANDROID_OMTC
bool didResetScrollPositionForLayerPixelAlignment = false;
#endif
// Check whether the layer will be scrollable. This is used as a hint to
// influence whether tiled layers are used or not.
@ -1495,7 +1497,9 @@ ContainerState::CreateOrRecycleThebesLayer(const nsIFrame* aAnimatedGeometryRoot
}
#endif
InvalidateEntireThebesLayer(layer, aAnimatedGeometryRoot);
#ifndef MOZ_ANDROID_OMTC
didResetScrollPositionForLayerPixelAlignment = true;
#endif
}
if (!data->mRegionToInvalidate.IsEmpty()) {
#ifdef MOZ_DUMP_PAINTING
@ -1529,7 +1533,9 @@ ContainerState::CreateOrRecycleThebesLayer(const nsIFrame* aAnimatedGeometryRoot
data = new ThebesDisplayItemLayerUserData();
layer->SetUserData(&gThebesDisplayItemLayerUserData, data);
ResetScrollPositionForLayerPixelAlignment(aAnimatedGeometryRoot);
#ifndef MOZ_ANDROID_OMTC
didResetScrollPositionForLayerPixelAlignment = true;
#endif
}
data->mXScale = mParameters.mXScale;
data->mYScale = mParameters.mYScale;
@ -1557,6 +1563,8 @@ ContainerState::CreateOrRecycleThebesLayer(const nsIFrame* aAnimatedGeometryRoot
matrix.Translate(pixOffset.x, pixOffset.y);
layer->SetBaseTransform(Matrix4x4::From2D(matrix));
// FIXME: Temporary workaround for bug 681192 and bug 724786.
#ifndef MOZ_ANDROID_OMTC
// Calculate exact position of the top-left of the active scrolled root.
// This might not be 0,0 due to the snapping in ScaleToNearestPixels.
gfxPoint animatedGeometryRootTopLeft = scaledOffset - ThebesPoint(matrix.GetTranslation()) + mParameters.mOffset;
@ -1569,6 +1577,7 @@ ContainerState::CreateOrRecycleThebesLayer(const nsIFrame* aAnimatedGeometryRoot
} else if (didResetScrollPositionForLayerPixelAlignment) {
data->mAnimatedGeometryRootPosition = animatedGeometryRootTopLeft;
}
#endif
return layer.forget();
}