Bug 1209273 - Part 2: Force printing background if color-adjust: exact. r=dbaron
authorTobias Schneider <tschneider@mozilla.com>
Tue, 08 Mar 2016 09:44:00 -0500
changeset 291494 99cfe49eaf6445402e595355a5edcb48257a6d65
parent 291493 d20c3ae26cad071cd8bd798e8d6bc5a9c8972733
child 291495 1c7548ca0a5cdf41ba19239cb4665bf93218c1ae
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 =