Bug 1212823 - Use correct coordinate space for box-shadow native rect when doing themed drawing. r=roc

This commit is contained in:
Matt Woodrow 2015-11-12 15:23:11 +13:00
parent caa70d1713
commit 7606ee64ed
4 changed files with 17 additions and 2 deletions

View File

@ -1382,8 +1382,9 @@ nsCSSRendering::PaintBoxShadowOuter(nsPresContext* aPresContext,
shadowContext->SetMatrix(
shadowContext->CurrentMatrix().Translate(devPixelOffset));
nsRect nativeRect;
nativeRect.IntersectRect(frameRect, aDirtyRect);
nsRect nativeRect = aDirtyRect;
nativeRect.MoveBy(-nsPoint(shadowItem->mXOffset, shadowItem->mYOffset));
nativeRect.IntersectRect(frameRect, nativeRect);
nsRenderingContext wrapperCtx(shadowContext);
aPresContext->GetTheme()->DrawWidgetBackground(&wrapperCtx, aForFrame,
styleDisplay->mAppearance, aFrameArea, nativeRect);

View File

@ -0,0 +1,7 @@
<!DOCTYPE HTML>
<html>
<body>
<div style="width:314px; height:16px; top:10px; position:absolute; left:200px; background-color:red; z-index:-1"></div>
<input style="width:300px; height:10px;"></input>
</body>
</html>

View File

@ -0,0 +1,6 @@
<!DOCTYPE HTML>
<html>
<body>
<input style="width:300px; height:10px; box-shadow: 200px 0px 0px 0px red;"></input>
</body>
</html>

View File

@ -36,3 +36,4 @@ fuzzy-if(winWidget,5,30) == fieldset.html fieldset-ref.html # minor anti-aliasin
fuzzy-if(winWidget,5,30) == fieldset-inset.html fieldset-inset-ref.html # minor anti-aliasing problem on Windows
== 1178575.html 1178575-ref.html
== 1178575-2.html 1178575-2-ref.html
fuzzy(159,2) fails-if(!d2d) == 1212823-1.html 1212823-1-ref.html