diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 55c364bcd054..c9b2b13bd239 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -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); diff --git a/layout/reftests/box-shadow/1212823-1-ref.html b/layout/reftests/box-shadow/1212823-1-ref.html new file mode 100644 index 000000000000..91cf26d3ccce --- /dev/null +++ b/layout/reftests/box-shadow/1212823-1-ref.html @@ -0,0 +1,7 @@ + + +
+ + + + diff --git a/layout/reftests/box-shadow/1212823-1.html b/layout/reftests/box-shadow/1212823-1.html new file mode 100644 index 000000000000..2337ddf75f1b --- /dev/null +++ b/layout/reftests/box-shadow/1212823-1.html @@ -0,0 +1,6 @@ + + + + + + diff --git a/layout/reftests/box-shadow/reftest.list b/layout/reftests/box-shadow/reftest.list index e6dabf777566..a5a57d1c32aa 100644 --- a/layout/reftests/box-shadow/reftest.list +++ b/layout/reftests/box-shadow/reftest.list @@ -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