Bug 1209273 - Part 2 - Force printing background if color-adjust: exact. r=dbaron
☠☠ backed out by 238bfb42ed6b ☠ ☠
authorTobias Schneider <tschneider@mozilla.com>
Tue, 08 Mar 2016 09:44:00 +0100
changeset 291202 11f8ba2d1e859a6e47d5f07296ecbce56370efac
parent 291201 d5a9ff0ae110c5b5fda716b5aa70a21ed1bc1cf3
child 291203 90312ff603de2d28879dd7638fee0c6bab3556d8
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1209273
milestone48.0a1
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 =