diff --git a/layout/generic/nsPageContentFrame.cpp b/layout/generic/nsPageContentFrame.cpp index 1c82ca152398..45fa56452c29 100644 --- a/layout/generic/nsPageContentFrame.cpp +++ b/layout/generic/nsPageContentFrame.cpp @@ -379,10 +379,13 @@ void nsPageContentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, // Add the canvas background color to the bottom of the list. This // happens after we've built the list so that AddCanvasBackgroundColorItem - // can monkey with the contents if necessary. + // can monkey with the contents if necessary. The opaque backstop should + // ideally not be needed, but it workarounds some windows-specific clipping + // issues, see bug 1928512 and bug 1930269. const nsRect backgroundRect(aBuilder->ToReferenceFrame(this), GetSize()); - PresShell()->AddCanvasBackgroundColorItem( - aBuilder, &content, this, backgroundRect, NS_RGBA(0, 0, 0, 0)); + constexpr nscolor kBackstop = NS_RGB(255, 255, 255); + PresShell()->AddCanvasBackgroundColorItem(aBuilder, &content, this, + backgroundRect, kBackstop); } content.AppendNewToTop( diff --git a/testing/web-platform/meta/css/css-page/pseudo-first-margin-004-print.html.ini b/testing/web-platform/meta/css/css-page/pseudo-first-margin-004-print.html.ini new file mode 100644 index 000000000000..efee70593e38 --- /dev/null +++ b/testing/web-platform/meta/css/css-page/pseudo-first-margin-004-print.html.ini @@ -0,0 +1,2 @@ +[pseudo-first-margin-004-print.html] + fuzzy: maxDifference=0-20;totalPixels=0-500