Backed out changeset 9e290d196600 (bug 574621) for causing test failures.
authorTimothy Nikkel <tnikkel@gmail.com>
Thu, 29 Jul 2010 15:16:40 -0500
changeset 48368 a24232050cb11eb86eb348962deea19a40407a33
parent 48360 9e290d196600332b1731df54ca9142df21127a30
child 48369 c402a67ba0db88ea7a059ac08040b98d60f31306
push idunknown
push userunknown
push dateunknown
bugs574621
milestone2.0b3pre
backs out9e290d196600332b1731df54ca9142df21127a30
Backed out changeset 9e290d196600 (bug 574621) for causing test failures.
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -5781,32 +5781,27 @@ nsresult PresShell::AddCanvasBackgroundC
       new (&aBuilder) nsDisplaySolidColor(aFrame, aBounds, bgcolor));
 }
 
 void PresShell::UpdateCanvasBackground()
 {
   // If we have a frame tree and it has style information that
   // specifies the background color of the canvas, update our local
   // cache of that color.
-  nsIFrame* rootStyleFrame = FrameConstructor()->GetRootElementStyleFrame();
-  if (rootStyleFrame) {
+  nsIFrame* rootFrame = FrameConstructor()->GetRootElementStyleFrame();
+  if (rootFrame) {
     nsStyleContext* bgStyle =
-      nsCSSRendering::FindRootFrameBackground(rootStyleFrame);
+      nsCSSRendering::FindRootFrameBackground(rootFrame);
     // XXX We should really be passing the canvasframe, not the root element
     // style frame but we don't have access to the canvasframe here. It isn't
     // a problem because only a few frames can return something other than true
     // and none of them would be a canvas frame or root element style frame.
     mCanvasBackgroundColor =
       nsCSSRendering::DetermineBackgroundColor(GetPresContext(), bgStyle,
-                                               rootStyleFrame);
-    if (nsLayoutUtils::GetCrossDocParentFrame(FrameManager()->GetRootFrame()) &&
-        !nsContentUtils::IsChildOfSameType(mDocument)) {
-      mCanvasBackgroundColor =
-        NS_ComposeColors(mPresContext->DefaultBackgroundColor(), mCanvasBackgroundColor);
-    }
+                                               rootFrame);
   }
 
   // If the root element of the document (ie html) has style 'display: none'
   // then the document's background color does not get drawn; cache the
   // color we actually draw.
   if (!FrameConstructor()->GetRootElementFrame()) {
     mCanvasBackgroundColor = mPresContext->DefaultBackgroundColor();
   }