<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[80761] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/80761">80761</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2011-03-10 14:13:25 -0800 (Thu, 10 Mar 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>https://bugs.webkit.org/show_bug.cgi?id=47147
        
Reviewed by Simon Fraser.

Fix for repaint issues when the root element is a table and needs to paint a background that
covers the entire canvas.  Remove paintRootBoxDecorations and replace with paintRootBoxFillLayers,
so that it can be called only for fill layer painting.  Make tables and normal boxes both
call this new method.  Fix the dirty check at the start of RenderTable paint to not happen if
the table is the root of the document (this same check exists in RenderBlock painting already).

Source/WebCore: 

* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintRootBoxFillLayers):
(WebCore::RenderBox::paintBoxDecorations):
(WebCore::RenderBox::paintBoxDecorationsWithSize):
* rendering/RenderBox.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::calculateCompositedBounds):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paint):
(WebCore::RenderTable::paintBoxDecorations):

LayoutTests: 

* fast/backgrounds/positioned-root.html: Added.
* fast/backgrounds/table-root.html: Added.
* platform/mac/fast/backgrounds/positioned-root-expected.checksum: Added.
* platform/mac/fast/backgrounds/positioned-root-expected.png: Added.
* platform/mac/fast/backgrounds/positioned-root-expected.txt: Added.
* platform/mac/fast/backgrounds/table-root-expected.checksum: Added.
* platform/mac/fast/backgrounds/table-root-expected.png: Added.
* platform/mac/fast/backgrounds/table-root-expected.txt: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxh">trunk/Source/WebCore/rendering/RenderBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTablecpp">trunk/Source/WebCore/rendering/RenderTable.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastbackgroundspositionedroothtml">trunk/LayoutTests/fast/backgrounds/positioned-root.html</a></li>
<li><a href="#trunkLayoutTestsfastbackgroundstableroothtml">trunk/LayoutTests/fast/backgrounds/table-root.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastbackgroundspositionedrootexpectedchecksum">trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.checksum</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastbackgroundspositionedrootexpectedpng">trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastbackgroundspositionedrootexpectedtxt">trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastbackgroundstablerootexpectedchecksum">trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.checksum</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastbackgroundstablerootexpectedpng">trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.png</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastbackgroundstablerootexpectedtxt">trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (80760 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2011-03-10 22:06:09 UTC (rev 80760)
+++ trunk/LayoutTests/ChangeLog 2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2011-03-10  David Hyatt  <hyatt@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        https://bugs.webkit.org/show_bug.cgi?id=47147
+        
+        Fix for repaint issues when the root element is a table and needs to paint a background that
+        covers the entire canvas.  Remove paintRootBoxDecorations and replace with paintRootBoxFillLayers,
+        so that it can be called only for fill layer painting.  Make tables and normal boxes both
+        call this new method.  Fix the dirty check at the start of RenderTable paint to not happen if
+        the table is the root of the document (this same check exists in RenderBlock painting already).
+
+        * fast/backgrounds/positioned-root.html: Added.
+        * fast/backgrounds/table-root.html: Added.
+        * platform/mac/fast/backgrounds/positioned-root-expected.checksum: Added.
+        * platform/mac/fast/backgrounds/positioned-root-expected.png: Added.
+        * platform/mac/fast/backgrounds/positioned-root-expected.txt: Added.
+        * platform/mac/fast/backgrounds/table-root-expected.checksum: Added.
+        * platform/mac/fast/backgrounds/table-root-expected.png: Added.
+        * platform/mac/fast/backgrounds/table-root-expected.txt: Added.
+
</ins><span class="cx"> 2011-03-10  Mihai Parparita  <mihaip@chromium.org>
</span><span class="cx"> 
</span><span class="cx">         Update chromium Snow Leopard expectations.
</span></span></pre></div>
<a id="trunkLayoutTestsfastbackgroundspositionedroothtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/backgrounds/positioned-root.html (0 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/backgrounds/positioned-root.html                          (rev 0)
+++ trunk/LayoutTests/fast/backgrounds/positioned-root.html     2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html style="position:absolute; left:100px; top:100px; width:100px; height:100px;              background:yellow; border:10px solid black;"><head><link rel="reference" href="abspos-containing-block-initial-004-ref.xht"><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org">
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block.">
+<meta name="flags" content="">
+</head><body>
+
+
+</body></html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsfastbackgroundstableroothtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/backgrounds/table-root.html (0 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/backgrounds/table-root.html                               (rev 0)
+++ trunk/LayoutTests/fast/backgrounds/table-root.html  2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html style="position:fixed; left:100px; top:100px; width:100px; height:100px;              background:yellow; border:10px solid black; display:table"><head><link rel="reference" href="abspos-containing-block-initial-004-ref.xht"><title>CSS Test: Test for containing block for absolutely positioned elements being initial containing block</title>
+<link rel="author" title="Robert O'Callahan" href="mailto:robert@ocallahan.org">
+<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
+<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#containing-block-details">
+<meta name="assert" content="If there is no such ancestor, the containing block is the initial containing block.">
+<meta name="flags" content="">
+</head><body>
+
+
+</body></html>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastbackgroundspositionedrootexpectedchecksum"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.checksum (0 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.checksum                                (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.checksum   2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+8dcc3ef729ece769a816ada350bab4b4
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastbackgroundspositionedrootexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacfastbackgroundspositionedrootexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.txt (0 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.txt                             (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/backgrounds/positioned-root-expected.txt        2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (100,100) size 120x120
+  RenderBlock (positioned) {HTML} at (100,100) size 120x120 [bgcolor=#FFFF00] [border: (10px solid #000000)]
+    RenderBody {BODY} at (18,18) size 84x0
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastbackgroundstablerootexpectedchecksum"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.checksum (0 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.checksum                             (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.checksum        2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+973ed5a939d59d87f8f23a87111bf440
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastbackgroundstablerootexpectedpng"></a>
<div class="binary"><h4>Added: trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.png</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<span class="cx">Property changes on: trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.png
</span><span class="cx">___________________________________________________________________
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="trunkLayoutTestsplatformmacfastbackgroundstablerootexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.txt (0 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.txt                          (rev 0)
+++ trunk/LayoutTests/platform/mac/fast/backgrounds/table-root-expected.txt     2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (100,100) size 100x100
+  RenderTable {HTML} at (100,100) size 100x100 [bgcolor=#FFFF00] [border: (10px solid #000000)]
+    RenderTableSection (anonymous) at (10,10) size 80x80
+      RenderTableRow (anonymous) at (0,0) size 80x80
+        RenderTableCell (anonymous) at (0,0) size 80x8 [r=0 c=0 rs=1 cs=1]
+          RenderBody {BODY} at (8,8) size 64x0
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (80760 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2011-03-10 22:06:09 UTC (rev 80760)
+++ trunk/Source/WebCore/ChangeLog      2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2011-03-10  David Hyatt  <hyatt@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        https://bugs.webkit.org/show_bug.cgi?id=47147
+        
+        Fix for repaint issues when the root element is a table and needs to paint a background that
+        covers the entire canvas.  Remove paintRootBoxDecorations and replace with paintRootBoxFillLayers,
+        so that it can be called only for fill layer painting.  Make tables and normal boxes both
+        call this new method.  Fix the dirty check at the start of RenderTable paint to not happen if
+        the table is the root of the document (this same check exists in RenderBlock painting already).
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paintRootBoxFillLayers):
+        (WebCore::RenderBox::paintBoxDecorations):
+        (WebCore::RenderBox::paintBoxDecorationsWithSize):
+        * rendering/RenderBox.h:
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::calculateCompositedBounds):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::paint):
+        (WebCore::RenderTable::paintBoxDecorations):
+
</ins><span class="cx"> 2011-03-10  Sheriff Bot  <webkit.review.bot@gmail.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r80749.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (80760 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp     2011-03-10 22:06:09 UTC (rev 80760)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -771,7 +771,7 @@
</span><span class="cx">         child->paint(childInfo, tx, ty);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RenderBox::paintRootBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
</del><ins>+void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo)
</ins><span class="cx"> {
</span><span class="cx">     const FillLayer* bgLayer = style()->backgroundLayers();
</span><span class="cx">     Color bgColor = style()->visitedDependentColor(CSSPropertyBackgroundColor);
</span><span class="lines">@@ -792,21 +792,12 @@
</span><span class="cx">     // The background of the box generated by the root element covers the entire canvas, so just use
</span><span class="cx">     // the RenderView's docTop/Left/Width/Height accessors.
</span><span class="cx">     paintFillLayers(paintInfo, bgColor, bgLayer, view()->docLeft(), view()->docTop(), view()->docWidth(), view()->docHeight(), CompositeSourceOver, bodyObject);
</span><del>-
-    if (style()->hasBorder() && style()->display() != INLINE)
-        paintBorder(paintInfo.context, tx, ty, width(), height(), style());
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RenderBox::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
</span><span class="cx"> {
</span><span class="cx">     if (!paintInfo.shouldPaintWithinRoot(this))
</span><span class="cx">         return;
</span><del>-
-    if (isRoot()) {
-        paintRootBoxDecorations(paintInfo, tx, ty);
-        return;
-    }
-
</del><span class="cx">     return paintBoxDecorationsWithSize(paintInfo, tx, ty, width(), height());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -824,11 +815,13 @@
</span><span class="cx">     // The theme will tell us whether or not we should also paint the CSS background.
</span><span class="cx">     bool themePainted = style()->hasAppearance() && !theme()->paint(this, paintInfo, IntRect(tx, ty, width, height));
</span><span class="cx">     if (!themePainted) {
</span><del>-        // The <body> only paints its background if the root element has defined a background
-        // independent of the body.  Go through the DOM to get to the root element's render object,
-        // since the root could be inline and wrapped in an anonymous block.
-        if (!isBody() || document()->documentElement()->renderer()->hasBackground())
</del><ins>+        if (isRoot())
+            paintRootBoxFillLayers(paintInfo);
+        else if (!isBody() || document()->documentElement()->renderer()->hasBackground()) {
+            // The <body> only paints its background if the root element has defined a background
+            // independent of the body.
</ins><span class="cx">             paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), tx, ty, width, height);
</span><ins>+        }
</ins><span class="cx">         if (style()->hasAppearance())
</span><span class="cx">             theme()->paintDecorations(this, paintInfo, IntRect(tx, ty, width, height));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.h (80760 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.h       2011-03-10 22:06:09 UTC (rev 80760)
+++ trunk/Source/WebCore/rendering/RenderBox.h  2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -418,11 +418,12 @@
</span><span class="cx">     virtual void mapLocalToContainer(RenderBoxModelObject* repaintContainer, bool fixed, bool useTransforms, TransformState&) const;
</span><span class="cx">     virtual void mapAbsoluteToLocalPoint(bool fixed, bool useTransforms, TransformState&) const;
</span><span class="cx"> 
</span><ins>+    void paintRootBoxFillLayers(const PaintInfo&);
+
</ins><span class="cx"> private:
</span><span class="cx">     bool includeVerticalScrollbarSize() const;
</span><span class="cx">     bool includeHorizontalScrollbarSize() const;
</span><span class="cx"> 
</span><del>-    void paintRootBoxDecorations(PaintInfo&, int tx, int ty);
</del><span class="cx">     // Returns true if we did a full repaint
</span><span class="cx">     bool repaintLayerRectsForImage(WrappedImagePtr image, const FillLayer* layers, bool drawingBackground);
</span><span class="cx">    
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (80760 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2011-03-10 22:06:09 UTC (rev 80760)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp    2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -426,7 +426,7 @@
</span><span class="cx">     if (layer->renderer()->isRoot()) {
</span><span class="cx">         // If the root layer becomes composited (e.g. because some descendant with negative z-index is composited),
</span><span class="cx">         // then it has to be big enough to cover the viewport in order to display the background. This is akin
</span><del>-        // to the code in RenderBox::paintRootBoxDecorations().
</del><ins>+        // to the code in RenderBox::paintRootBoxFillLayers().
</ins><span class="cx">         if (m_renderView->frameView()) {
</span><span class="cx">             int rw = m_renderView->frameView()->contentsWidth();
</span><span class="cx">             int rh = m_renderView->frameView()->contentsHeight();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (80760 => 80761)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTable.cpp   2011-03-10 22:06:09 UTC (rev 80760)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp      2011-03-10 22:13:25 UTC (rev 80761)
</span><span class="lines">@@ -451,11 +451,13 @@
</span><span class="cx"> 
</span><span class="cx">     PaintPhase paintPhase = paintInfo.phase;
</span><span class="cx"> 
</span><del>-    int os = 2 * maximalOutlineSize(paintPhase);
-    if (ty + minYVisualOverflow() >= paintInfo.rect.maxY() + os || ty + maxYVisualOverflow() <= paintInfo.rect.y() - os)
-        return;
-    if (tx + minXVisualOverflow() >= paintInfo.rect.maxX() + os || tx + maxXVisualOverflow() <= paintInfo.rect.x() - os)
-        return;
</del><ins>+    if (!isRoot()) {
+        int os = 2 * maximalOutlineSize(paintPhase);
+        if (ty + minYVisualOverflow() >= paintInfo.rect.maxY() + os || ty + maxYVisualOverflow() <= paintInfo.rect.y() - os)
+            return;
+        if (tx + minXVisualOverflow() >= paintInfo.rect.maxX() + os || tx + maxXVisualOverflow() <= paintInfo.rect.x() - os)
+            return;
+    }
</ins><span class="cx"> 
</span><span class="cx">     bool pushedClip = pushContentsClip(paintInfo, tx, ty);    
</span><span class="cx">     paintObject(paintInfo, tx, ty);
</span><span class="lines">@@ -550,7 +552,13 @@
</span><span class="cx"> 
</span><span class="cx">     paintBoxShadow(paintInfo.context, rect.x(), rect.y(), rect.width(), rect.height(), style(), Normal);
</span><span class="cx">     
</span><del>-    paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), rect.x(), rect.y(), rect.width(), rect.height());
</del><ins>+    if (isRoot())
+        paintRootBoxFillLayers(paintInfo);
+    else if (!isBody() || document()->documentElement()->renderer()->hasBackground())
+        // The <body> only paints its background if the root element has defined a background
+        // independent of the body.
+        paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), rect.x(), rect.y(), rect.width(), rect.height());
+
</ins><span class="cx">     paintBoxShadow(paintInfo.context, rect.x(), rect.y(), rect.width(), rect.height(), style(), Inset);
</span><span class="cx"> 
</span><span class="cx">     if (style()->hasBorder() && !collapseBorders())
</span></span></pre>
</div>
</div>

</body>
</html>