diff --git a/layout/generic/nsCanvasFrame.cpp b/layout/generic/nsCanvasFrame.cpp index c60ed389f17f..e99c8c3251d5 100644 --- a/layout/generic/nsCanvasFrame.cpp +++ b/layout/generic/nsCanvasFrame.cpp @@ -24,7 +24,6 @@ #include "nsPrintfCString.h" #include "mozilla/AccessibleCaretEventHub.h" #include "mozilla/ComputedStyle.h" -#include "mozilla/StaticPrefs_browser.h" #include "mozilla/dom/AnonymousContent.h" #include "mozilla/layers/StackingContextHelper.h" #include "mozilla/layers/RenderRootStateManager.h" @@ -517,19 +516,10 @@ void nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, bool needBlendContainer = false; nsDisplayListBuilder::AutoContainerASRTracker contASRTracker(aBuilder); - // In high-contrast-mode, we suppress background-image on the canvas frame - // (even when backplating), because users expect site backgrounds to conform - // to their HCM background color when a solid color is rendered, and some - // websites use solid-color images instead of an overwritable background - // color. - const bool suppressBackgroundImage = - !PresContext()->PrefSheetPrefs().mUseDocumentColors && - StaticPrefs::browser_display_suppress_canvas_background_image_on_forced_colors(); - // Create separate items for each background layer. const nsStyleImageLayers& layers = bg->StyleBackground()->mImage; NS_FOR_VISIBLE_IMAGE_LAYERS_BACK_TO_FRONT(i, layers) { - if (layers.mLayers[i].mImage.IsNone() || suppressBackgroundImage) { + if (layers.mLayers[i].mImage.IsNone()) { continue; } if (layers.mLayers[i].mBlendMode != NS_STYLE_BLEND_NORMAL) { diff --git a/layout/reftests/high-contrast/backplate-bg-image-001-ref.html b/layout/reftests/high-contrast/backplate-bg-image-001-ref.html index 529b5e5ff894..d47cef8940bf 100644 --- a/layout/reftests/high-contrast/backplate-bg-image-001-ref.html +++ b/layout/reftests/high-contrast/backplate-bg-image-001-ref.html @@ -4,7 +4,7 @@