mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Backout d1a44d2ec5c3 due to missing r=
This commit is contained in:
parent
62d6014cc8
commit
f027a641a8
@ -72,10 +72,10 @@ static void Scale(gfx3DMatrix& aTransform, double aXScale, double aYScale)
|
||||
aTransform._22 *= aYScale;
|
||||
}
|
||||
|
||||
static void ReverseTranslate(gfx3DMatrix& aTransform, const gfxPoint& aOffset)
|
||||
static void ReverseTranslate(gfx3DMatrix& aTransform, ViewTransform& aViewTransform)
|
||||
{
|
||||
aTransform._41 -= aOffset.x;
|
||||
aTransform._42 -= aOffset.y;
|
||||
aTransform._41 -= aViewTransform.mTranslation.x / aViewTransform.mXScale;
|
||||
aTransform._42 -= aViewTransform.mTranslation.y / aViewTransform.mYScale;
|
||||
}
|
||||
|
||||
|
||||
@ -278,16 +278,11 @@ TransformShadowTree(nsDisplayListBuilder* aBuilder, nsFrameLoader* aFrameLoader,
|
||||
|
||||
if (aLayer->GetIsFixedPosition() &&
|
||||
!aLayer->GetParent()->GetIsFixedPosition()) {
|
||||
// Alter the shadow transform of fixed position layers in the situation
|
||||
// that the view transform's scroll position doesn't match the actual
|
||||
// scroll position, due to asynchronous layer scrolling.
|
||||
float offsetX = layerTransform.mTranslation.x / layerTransform.mXScale;
|
||||
float offsetY = layerTransform.mTranslation.y / layerTransform.mYScale;
|
||||
ReverseTranslate(shadowTransform, gfxPoint(offsetX, offsetY));
|
||||
ReverseTranslate(shadowTransform, layerTransform);
|
||||
const nsIntRect* clipRect = shadow->GetShadowClipRect();
|
||||
if (clipRect) {
|
||||
nsIntRect transformedClipRect(*clipRect);
|
||||
transformedClipRect.MoveBy(-offsetX, -offsetY);
|
||||
transformedClipRect.MoveBy(shadowTransform._41, shadowTransform._42);
|
||||
shadow->SetShadowClipRect(&transformedClipRect);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user