Bug 889085 - Don’t draw CSS background color for themes root frames. r=roc.
authorMarkus Stange <mstange@themasta.com>
Sat, 18 Jan 2014 12:51:03 +0100
changeset 164135 dddfd63f1414f6f5742ed90d7ded0968a45b38e4
parent 164134 15b13a7c66a55238b7ca02f6e5e35e044896bd79
child 164136 f8c14bd80676f6f845f739782fb273b739e0e266
push id26026
push userphilringnalda@gmail.com
push dateSat, 18 Jan 2014 23:17:27 +0000
treeherdermozilla-central@61fd0f987cf2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs889085
milestone29.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 889085 - Don’t draw CSS background color for themes root frames. r=roc.
layout/base/nsCSSRendering.cpp
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -1730,16 +1730,22 @@ DrawBackgroundColor(BackgroundClipState&
 
 nscolor
 nsCSSRendering::DetermineBackgroundColor(nsPresContext* aPresContext,
                                          nsStyleContext* aStyleContext,
                                          nsIFrame* aFrame,
                                          bool& aDrawBackgroundImage,
                                          bool& aDrawBackgroundColor)
 {
+  if (aFrame->IsThemed()) {
+    aDrawBackgroundColor = false;
+    aDrawBackgroundImage = false;
+    return NS_RGBA(0,0,0,0);
+  }
+
   aDrawBackgroundImage = true;
   aDrawBackgroundColor = true;
 
   if (aFrame->HonorPrintBackgroundSettings()) {
     aDrawBackgroundImage = aPresContext->GetBackgroundImageDraw();
     aDrawBackgroundColor = aPresContext->GetBackgroundColorDraw();
   }