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 @@ + + + +
+
+
+
+ + diff --git a/layout/reftests/backgrounds/background-clip-2.html b/layout/reftests/backgrounds/background-clip-2.html new file mode 100644 index 00000000000..2a10493d91e --- /dev/null +++ b/layout/reftests/backgrounds/background-clip-2.html @@ -0,0 +1,12 @@ + + + +
+
+ + diff --git a/layout/reftests/backgrounds/reftest.list b/layout/reftests/backgrounds/reftest.list index f60abb5c5e4..367014bc87b 100644 --- a/layout/reftests/backgrounds/reftest.list +++ b/layout/reftests/backgrounds/reftest.list @@ -27,6 +27,7 @@ == background-redraw-237766.html background-redraw-237766-ref.html == background-clip-1.html background-clip-1-ref.html +== background-clip-2.html background-clip-2-ref.html == background-size-auto-auto.html background-size-auto-ref.html == background-size-auto.html background-size-auto-ref.html