<!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>[163675] 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/163675">163675</a></dd>
<dt>Author</dt> <dd>bdakin@apple.com</dd>
<dt>Date</dt> <dd>2014-02-07 18:12:43 -0800 (Fri, 07 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Should get rid of TileController's CoverageForSlowScrolling mode
https://bugs.webkit.org/show_bug.cgi?id=128339

Reviewed by Simon Fraser.

Source/WebCore: 

This patch gets rid of CoverageForSlowScrolling in the TileController. It also 
makes sure that margin tiles are properly invalidated on pages with slow repaint 
objects that cause slow scrolling. 

When we invalidate because of slow scrolling, don’t clip the update rect to the 
layer bounds.
* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsSlowPath):

Call new RenderObject paint function repaintSlowRepaintObject() instead of the 
more-generic repaint().
(WebCore::FrameView::repaintSlowRepaintObjects):

Remove CoverageForSlowScrolling.
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::tilesWouldChangeForVisibleRect):
(WebCore::TileController::computeTileCoverageRect):
(WebCore::TileController::revalidateTiles):
* rendering/RenderLayerBacking.cpp:
(WebCore::computeTileCoverage):

Handle repainting a slow repaint object. Don’t clip when we shouldn’t, use the 
RenderView’s backgroundRect as a repaintRect when this is the root background 
since that will take the extended background rect into consideration.
* rendering/RenderObject.cpp:
(WebCore::RenderObject::repaintSlowRepaintObject):
* rendering/RenderObject.h:

LayoutTests: 

Slow scrolling no longer creates tiles of a different size.

* platform/mac-wk2/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
* platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingfixedbackgroundfixednonpropagatedbodybackgroundexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingtilecoverageslowscrollingexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-slow-scrolling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacwk2tileddrawingtilesizeslowzoomedexpectedtxt">trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsTiledBackingh">trunk/Source/WebCore/platform/graphics/TiledBacking.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscamacTileControllerh">trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscamacTileControllermm">trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjectcpp">trunk/Source/WebCore/rendering/RenderObject.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderObjecth">trunk/Source/WebCore/rendering/RenderObject.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/LayoutTests/ChangeLog        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-02-07  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        Should get rid of TileController's CoverageForSlowScrolling mode
+        https://bugs.webkit.org/show_bug.cgi?id=128339
+
+        Reviewed by Simon Fraser.
+
+        Slow scrolling no longer creates tiles of a different size.
+
+        * platform/mac-wk2/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.txt:
+        * platform/mac-wk2/tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
+        * platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt:
+
</ins><span class="cx"> 2014-02-07  Brady Eidson  &lt;beidson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         IDB: Some Mozilla cursor mutation tests fail
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingfixedbackgroundfixednonpropagatedbodybackgroundexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.txt (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.txt        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/fixed-background/fixed-non-propagated-body-background-expected.txt        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -5,9 +5,9 @@
</span><span class="cx">       (bounds 785.00 1700.00)
</span><span class="cx">       (contentsOpaque 1)
</span><span class="cx">       (backgroundColor #C0C0C0)
</span><del>-      (tile cache coverage 0, 0 785 x 1200)
-      (tile size 785 x 600)
-      (top left tile 0, 0 tiles grid 1 x 2)
</del><ins>+      (tile cache coverage 0, 0 785 x 1024)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 2)
</ins><span class="cx">     )
</span><span class="cx">   )
</span><span class="cx"> )
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingtilecoverageslowscrollingexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-slow-scrolling-expected.txt (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-slow-scrolling-expected.txt        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-coverage-slow-scrolling-expected.txt        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -9,8 +9,8 @@
</span><span class="cx">       (visible rect 0.00, 0.00 800.00 x 600.00)
</span><span class="cx">       (contentsScale 1.00)
</span><span class="cx">       (tile cache coverage 0, 0 800 x 600)
</span><del>-      (tile size 800 x 600)
-      (top left tile 0, 0 tiles grid 1 x 1)
</del><ins>+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 2)
</ins><span class="cx">     )
</span><span class="cx">   )
</span><span class="cx"> )
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacwk2tileddrawingtilesizeslowzoomedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/LayoutTests/platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed-expected.txt        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -10,9 +10,9 @@
</span><span class="cx">       (transform [1.70 0.00 0.00 0.00] [0.00 1.70 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
</span><span class="cx">       (visible rect 0.00, 0.00 461.76 x 344.12)
</span><span class="cx">       (contentsScale 1.00)
</span><del>-      (tile cache coverage 0, 0 461 x 344)
-      (tile size 785 x 585)
-      (top left tile 0, 0 tiles grid 1 x 1)
</del><ins>+      (tile cache coverage 0, 0 602 x 585)
+      (tile size 512 x 512)
+      (top left tile 0, 0 tiles grid 2 x 2)
</ins><span class="cx">     )
</span><span class="cx">   )
</span><span class="cx"> )
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/Source/WebCore/ChangeLog        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-02-07  Beth Dakin  &lt;bdakin@apple.com&gt;
+
+        Should get rid of TileController's CoverageForSlowScrolling mode
+        https://bugs.webkit.org/show_bug.cgi?id=128339
+
+        Reviewed by Simon Fraser.
+
+        This patch gets rid of CoverageForSlowScrolling in the TileController. It also 
+        makes sure that margin tiles are properly invalidated on pages with slow repaint 
+        objects that cause slow scrolling. 
+
+        When we invalidate because of slow scrolling, don’t clip the update rect to the 
+        layer bounds.
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scrollContentsSlowPath):
+
+        Call new RenderObject paint function repaintSlowRepaintObject() instead of the 
+        more-generic repaint().
+        (WebCore::FrameView::repaintSlowRepaintObjects):
+
+        Remove CoverageForSlowScrolling.
+        * platform/graphics/TiledBacking.h:
+        * platform/graphics/ca/mac/TileController.h:
+        * platform/graphics/ca/mac/TileController.mm:
+        (WebCore::TileController::tilesWouldChangeForVisibleRect):
+        (WebCore::TileController::computeTileCoverageRect):
+        (WebCore::TileController::revalidateTiles):
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::computeTileCoverage):
+
+        Handle repainting a slow repaint object. Don’t clip when we shouldn’t, use the 
+        RenderView’s backgroundRect as a repaintRect when this is the root background 
+        since that will take the extended background rect into consideration.
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::repaintSlowRepaintObject):
+        * rendering/RenderObject.h:
+
</ins><span class="cx"> 2014-02-06  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         More FTL build scaffolding
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -1710,7 +1710,7 @@
</span><span class="cx">         updateRect.scale(1 / frame().frameScaleFactor());
</span><span class="cx"> 
</span><span class="cx">         ASSERT(renderView());
</span><del>-        renderView()-&gt;layer()-&gt;setBackingNeedsRepaintInRect(updateRect);
</del><ins>+        renderView()-&gt;layer()-&gt;setBackingNeedsRepaintInRect(updateRect, GraphicsLayer::DoNotClipToLayer);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     repaintSlowRepaintObjects();
</span><span class="lines">@@ -1736,7 +1736,7 @@
</span><span class="cx">     // Renderers with fixed backgrounds may be in compositing layers, so we need to explicitly
</span><span class="cx">     // repaint them after scrolling.
</span><span class="cx">     for (auto&amp; renderer : *m_slowRepaintObjects)
</span><del>-        renderer-&gt;repaint();
</del><ins>+        renderer-&gt;repaintSlowRepaintObject();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Note that this gets called at painting time.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTiledBackingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TiledBacking.h (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TiledBacking.h        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/Source/WebCore/platform/graphics/TiledBacking.h        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -60,7 +60,6 @@
</span><span class="cx">         CoverageForVisibleArea = 0,
</span><span class="cx">         CoverageForVerticalScrolling = 1 &lt;&lt; 0,
</span><span class="cx">         CoverageForHorizontalScrolling = 1 &lt;&lt; 1,
</span><del>-        CoverageForSlowScrolling = 1 &lt;&lt; 2, // Indicates that we expect to paint a lot on scrolling.
</del><span class="cx">         CoverageForScrolling = CoverageForVerticalScrolling | CoverageForHorizontalScrolling
</span><span class="cx">     };
</span><span class="cx">     typedef unsigned TileCoverage;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacTileControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -159,7 +159,6 @@
</span><span class="cx">     void getTileIndexRangeForRect(const IntRect&amp;, TileIndex&amp; topLeft, TileIndex&amp; bottomRight) const;
</span><span class="cx"> 
</span><span class="cx">     FloatRect computeTileCoverageRect(const FloatRect&amp; previousVisibleRect, const FloatRect&amp; currentVisibleRect) const;
</span><del>-    IntSize computeTileSize() const;
</del><span class="cx"> 
</span><span class="cx">     void scheduleTileRevalidation(double interval);
</span><span class="cx">     void tileRevalidationTimerFired(Timer&lt;TileController&gt;*);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacTileControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -299,11 +299,6 @@
</span><span class="cx">     scaledRect.scale(m_scale);
</span><span class="cx">     IntRect currentCoverageRectInTileCoords(enclosingIntRect(scaledRect));
</span><span class="cx"> 
</span><del>-    IntSize newTileSize = computeTileSize();
-    bool tileSizeChanged = newTileSize != m_tileSize;
-    if (tileSizeChanged)
-        return true;
-
</del><span class="cx">     TileIndex topLeft;
</span><span class="cx">     TileIndex bottomRight;
</span><span class="cx">     getTileIndexRangeForRect(currentCoverageRectInTileCoords, topLeft, bottomRight);
</span><span class="lines">@@ -499,38 +494,6 @@
</span><span class="cx">     if (!m_isInWindow)
</span><span class="cx">         return visibleRect;
</span><span class="cx"> 
</span><del>-    // If our tile coverage is just for slow-scrolling, then we want to limit the tile coverage to the visible rect, but
-    // we should include the margin tiles if we're close to an edge.
-    if (m_tileCoverage &amp; CoverageForSlowScrolling) {
-        FloatSize coverageSize = visibleRect.size();
-        FloatPoint coverageOrigin = visibleRect.location();
-        float tileWidth = visibleRect.width();
-        float tileHeight = visibleRect.height();
-
-        // We're within one tile from the top, so we should make sure we have a top-margin tile.
-        if (visibleRect.y() &lt; tileHeight) {
-            coverageSize.setHeight(coverageSize.height() + topMarginHeight());
-            coverageOrigin.setY(coverageOrigin.y() - topMarginHeight());
-        }
-
-        // We're within one tile from the left edge, so we should make sure we have a left-margin tile.
-        if (visibleRect.x() &lt; tileWidth) {
-            coverageSize.setWidth(coverageSize.width() + leftMarginWidth());
-            coverageOrigin.setX(coverageOrigin.x() - leftMarginWidth());
-        }
-
-        IntSize layerSize = expandedIntSize(m_tileCacheLayer-&gt;bounds().size());
-        // We're within one tile from the bottom edge, so we should make sure we have a bottom-margin tile.
-        if (visibleRect.y() + tileHeight &gt; layerSize.height() - tileHeight)
-            coverageSize.setHeight(coverageSize.height() + bottomMarginHeight());
-
-        // We're within one tile from the right edge, so we should make sure we have a right-margin tile.
-        if (visibleRect.x() + tileWidth &gt; layerSize.width() - tileWidth)
-            coverageSize.setWidth(coverageSize.width() + rightMarginWidth());
-
-        return FloatRect(coverageOrigin, coverageSize);
-    }
-
</del><span class="cx">     bool largeVisibleRectChange = !previousVisibleRect.isEmpty() &amp;&amp; !visibleRect.intersects(previousVisibleRect);
</span><span class="cx">     
</span><span class="cx">     // FIXME: look at how far the document can scroll in each dimension.
</span><span class="lines">@@ -561,17 +524,6 @@
</span><span class="cx">     return FloatRect(coverageLeft, coverageTop, coverageHorizontalSize, coverageVerticalSize);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-IntSize TileController::computeTileSize() const
-{
-    if (m_tileCoverage &amp; CoverageForSlowScrolling) {
-        FloatSize tileSize = m_visibleRect.size();
-        tileSize.scale(m_scale);
-        return expandedIntSize(tileSize);
-    }
-
-    return IntSize(defaultTileWidth, defaultTileHeight);
-}
-
</del><span class="cx"> void TileController::scheduleTileRevalidation(double interval)
</span><span class="cx"> {
</span><span class="cx">     if (m_tileRevalidationTimer.isActive() &amp;&amp; m_tileRevalidationTimer.nextFireInterval() &lt; interval)
</span><span class="lines">@@ -710,50 +662,41 @@
</span><span class="cx">     scaledRect.scale(m_scale);
</span><span class="cx">     IntRect coverageRectInTileCoords(enclosingIntRect(scaledRect));
</span><span class="cx"> 
</span><del>-    IntSize oldTileSize = m_tileSize;
-    m_tileSize = computeTileSize();
-    bool tileSizeChanged = m_tileSize != oldTileSize;
</del><ins>+    TileCohort currCohort = nextTileCohort();
+    unsigned tilesInCohort = 0;
</ins><span class="cx"> 
</span><del>-    if (tileSizeChanged) {
-        removeAllTiles();
-        m_cohortList.clear();
-    } else {
-        TileCohort currCohort = nextTileCohort();
-        unsigned tilesInCohort = 0;
-        
-        // Move tiles newly outside the coverage rect into the cohort map.
-        for (TileMap::iterator it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) {
-            TileInfo&amp; tileInfo = it-&gt;value;
-            TileIndex tileIndex = it-&gt;key;
</del><ins>+    // Move tiles newly outside the coverage rect into the cohort map.
+    for (TileMap::iterator it = m_tiles.begin(), end = m_tiles.end(); it != end; ++it) {
+        TileInfo&amp; tileInfo = it-&gt;value;
+        TileIndex tileIndex = it-&gt;key;
</ins><span class="cx"> 
</span><del>-            PlatformCALayer* tileLayer = tileInfo.layer.get();
-            IntRect tileRect = rectForTileIndex(tileIndex);
-            if (tileRect.intersects(coverageRectInTileCoords)) {
-                tileInfo.cohort = VisibleTileCohort;
-                if (tileInfo.hasStaleContent) {
-                    // FIXME: store a dirty region per layer?
-                    tileLayer-&gt;setNeedsDisplay();
-                    tileInfo.hasStaleContent = false;
-                }
-            } else {
-                // Add to the currentCohort if not already in one.
-                if (tileInfo.cohort == VisibleTileCohort) {
-                    tileInfo.cohort = currCohort;
-                    ++tilesInCohort;
-                    
-                    if (m_unparentsOffscreenTiles)
-                        tileLayer-&gt;removeFromSuperlayer();
-                }
</del><ins>+        PlatformCALayer* tileLayer = tileInfo.layer.get();
+        IntRect tileRect = rectForTileIndex(tileIndex);
+        if (tileRect.intersects(coverageRectInTileCoords)) {
+            tileInfo.cohort = VisibleTileCohort;
+            if (tileInfo.hasStaleContent) {
+                // FIXME: store a dirty region per layer?
+                tileLayer-&gt;setNeedsDisplay();
+                tileInfo.hasStaleContent = false;
</ins><span class="cx">             }
</span><del>-        }
-        
-        if (tilesInCohort)
-            startedNewCohort(currCohort);
</del><ins>+        } else {
+            // Add to the currentCohort if not already in one.
+            if (tileInfo.cohort == VisibleTileCohort) {
+                tileInfo.cohort = currCohort;
+                ++tilesInCohort;
</ins><span class="cx"> 
</span><del>-        if (!m_aggressivelyRetainsTiles)
-            scheduleCohortRemoval();
</del><ins>+                if (m_unparentsOffscreenTiles)
+                    tileLayer-&gt;removeFromSuperlayer();
+            }
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (tilesInCohort)
+        startedNewCohort(currCohort);
+
+    if (!m_aggressivelyRetainsTiles)
+        scheduleCohortRemoval();
+
</ins><span class="cx">     // Ensure primary tile coverage tiles.
</span><span class="cx">     m_primaryTileCoverageRect = ensureTilesForRect(tileCoverageRect, CoverageType::PrimaryTiles);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -216,12 +216,6 @@
</span><span class="cx">         if (frameView.verticalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect)
</span><span class="cx">             tileCoverage |= TiledBacking::CoverageForVerticalScrolling;
</span><span class="cx">     }
</span><del>-    if (ScrollingCoordinator* scrollingCoordinator = scrollingCoordinatorFromLayer(backing-&gt;owningLayer())) {
-        // Ask our TiledBacking for large tiles unless the only reason we're main-thread-scrolling
-        // is a page overlay (find-in-page, the Web Inspector highlight mechanism, etc.).
-        if (scrollingCoordinator-&gt;synchronousScrollingReasons() &amp; ~ScrollingCoordinator::ForcedOnMainThread)
-            tileCoverage |= TiledBacking::CoverageForSlowScrolling;
-    }
</del><span class="cx">     return tileCoverage;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.cpp        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -1304,6 +1304,35 @@
</span><span class="cx">     repaintUsingContainer(repaintContainer ? repaintContainer : view, pixelSnappedIntRect(dirtyRect), immediate, shouldClipToLayer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RenderObject::repaintSlowRepaintObject() const
+{
+    // Don't repaint if we're unrooted (note that view() still returns the view when unrooted)
+    RenderView* view;
+    if (!isRooted(&amp;view))
+        return;
+
+    // Don't repaint if we're printing.
+    if (view-&gt;printing())
+        return;
+
+    RenderLayerModelObject* repaintContainer = containerForRepaint();
+    if (!repaintContainer)
+        repaintContainer = view;
+
+    bool shouldClipToLayer = true;
+    IntRect repaintRect;
+
+    // If this is the root background, we need to check if there is an extended background rect. If
+    // there is, then we should not allow painting to clip to the layer size.
+    if (isRoot() || isBody()) {
+        shouldClipToLayer = !view-&gt;frameView().hasExtendedBackgroundRectForPainting();
+        repaintRect = pixelSnappedIntRect(view-&gt;backgroundRect(view));
+    } else
+        repaintRect = pixelSnappedIntRect(clippedOverflowRectForRepaint(repaintContainer));
+
+    repaintUsingContainer(repaintContainer, repaintRect, false, shouldClipToLayer);
+}
+
</ins><span class="cx"> IntRect RenderObject::pixelSnappedAbsoluteClippedOverflowRect() const
</span><span class="cx"> {
</span><span class="cx">     return pixelSnappedIntRect(absoluteClippedOverflowRect());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderObject.h (163674 => 163675)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderObject.h        2014-02-08 02:11:22 UTC (rev 163674)
+++ trunk/Source/WebCore/rendering/RenderObject.h        2014-02-08 02:12:43 UTC (rev 163675)
</span><span class="lines">@@ -733,6 +733,9 @@
</span><span class="cx">     // Repaint a specific subrectangle within a given object.  The rect |r| is in the object's coordinate space.
</span><span class="cx">     void repaintRectangle(const LayoutRect&amp;, bool immediate = false, bool shouldClipToLayer = true) const;
</span><span class="cx"> 
</span><ins>+    // Repaint a slow repaint object, which, at this time, means we are repainting an object with background-attachment:fixed.
+    void repaintSlowRepaintObject() const;
+
</ins><span class="cx">     bool checkForRepaintDuringLayout() const;
</span><span class="cx"> 
</span><span class="cx">     // Returns the rect that should be repainted whenever this object changes.  The rect is in the view's
</span></span></pre>
</div>
</div>

</body>
</html>