diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index efd130be42d..5d32095e3a1 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -2288,7 +2288,7 @@ nsCSSRendering::PaintBackgroundWithSC(nsPresContext* aPresContext, currentBackgroundClip = bg->BottomLayer().mClip; isSolidBorder = (aFlags & PAINTBG_WILL_PAINT_BORDER) && IsOpaqueBorder(aBorder); - if (isSolidBorder) + if (isSolidBorder && currentBackgroundClip == NS_STYLE_BG_CLIP_BORDER) currentBackgroundClip = NS_STYLE_BG_CLIP_PADDING; SetupBackgroundClip(ctx, currentBackgroundClip, aForFrame, aBorderArea, aDirtyRect, haveRoundedCorners, diff --git a/layout/reftests/backgrounds/background-clip-2-ref.html b/layout/reftests/backgrounds/background-clip-2-ref.html new file mode 100644 index 00000000000..15b521ae0e6 --- /dev/null +++ b/layout/reftests/backgrounds/background-clip-2-ref.html @@ -0,0 +1,12 @@ + + +
+