Bug 1209273 - Part 2: Force printing background if color-adjust: exact. r=dbaron
☠☠ backed out by 58dc7aaefa9c ☠ ☠
authorTobias Schneider <tschneider@mozilla.com>
Tue, 08 Mar 2016 09:44:00 -0500
changeset 289416 fb8b3ab41c828cef62e979a3ec1c2974cbb1277b
parent 289415 6e2e6b0c7d8ec0be12634eb0e8c90d1e0441d922
child 289417 9c6650c7e237b5f8473963565f7b6250cfe96a7a
push id30102
push userryanvm@gmail.com
push dateSat, 19 Mar 2016 15:23:17 +0000
treeherdermozilla-central@720fb3d55e28 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1209273
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1209273 - Part 2: Force printing background if color-adjust: exact. r=dbaron
layout/base/nsCSSRendering.cpp
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -1980,17 +1980,20 @@ nsCSSRendering::DetermineBackgroundColor
                                          nsStyleContext* aStyleContext,
                                          nsIFrame* aFrame,
                                          bool& aDrawBackgroundImage,
                                          bool& aDrawBackgroundColor)
 {
   aDrawBackgroundImage = true;
   aDrawBackgroundColor = true;
 
-  if (aFrame->HonorPrintBackgroundSettings()) {
+  const nsStyleVisibility* visibility = aStyleContext->StyleVisibility();
+
+  if (visibility->mColorAdjust != NS_STYLE_COLOR_ADJUST_EXACT &&
+      aFrame->HonorPrintBackgroundSettings()) {
     aDrawBackgroundImage = aPresContext->GetBackgroundImageDraw();
     aDrawBackgroundColor = aPresContext->GetBackgroundColorDraw();
   }
 
   const nsStyleBackground *bg = aStyleContext->StyleBackground();
   nscolor bgColor;
   if (aDrawBackgroundColor) {
     bgColor =