<!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>[161530] trunk/Source</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/161530">161530</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2014-01-08 17:38:13 -0800 (Wed, 08 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>TileController can fail to receive exposedRect from the drawing area if set at the wrong time
https://bugs.webkit.org/show_bug.cgi?id=126536

Reviewed by Simon Fraser.

* Configurations/WebKit2.xcconfig:
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateViewExposedRect]):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::setExposedRect):
(WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::exposedRect):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
* UIProcess/WebPageProxy.h:
Move exposedRect stuff from WebPageProxy to DrawingAreaProxy.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
Push the exposedRect down into WebCore.

* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
(WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
Get rid of &quot;clipsToExposedRect&quot;, we just use infinite-ness of the rect
to indicate that now.
Don't scroll an infinite rect; it won't work.

* WebCore.exp.in:
Export some things.

* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
(WebCore::FrameView::setExposedRect):
Store the exposed rect on FrameView. When it changes, if the main frame
has a TiledBacking, inform it of the change.

* page/FrameView.h:
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::tilesWouldChangeForVisibleRect):
(WebCore::TileController::computeTileCoverageRect):
(WebCore::TileController::revalidateTiles):
(WebCore::TileController::updateTileCoverageMap):
Make use of the fact that we can test if a rect is infinite
instead of having a separate boolean property for that.

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::RenderLayerBacking):
(WebCore::computeTileCoverage):
Push the FrameView's cached exposed rect down into the TiledBacking when it is created.
We only support clipping for the main frame TileController for now.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</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="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDrawingAreaProxycpp">trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreamessagesin">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebCore/ChangeLog        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2014-01-08  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        TileController can fail to receive exposedRect from the drawing area if set at the wrong time
+        https://bugs.webkit.org/show_bug.cgi?id=126536
+
+        Reviewed by Simon Fraser.
+
+        * WebCore.exp.in:
+        Export some things.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::FrameView):
+        (WebCore::FrameView::setExposedRect):
+        Store the exposed rect on FrameView. When it changes, if the main frame
+        has a TiledBacking, inform it of the change.
+
+        * page/FrameView.h:
+        * platform/graphics/TiledBacking.h:
+        * platform/graphics/ca/mac/TileController.h:
+        * platform/graphics/ca/mac/TileController.mm:
+        (WebCore::TileController::TileController):
+        (WebCore::TileController::tilesWouldChangeForVisibleRect):
+        (WebCore::TileController::computeTileCoverageRect):
+        (WebCore::TileController::revalidateTiles):
+        (WebCore::TileController::updateTileCoverageMap):
+        Make use of the fact that we can test if a rect is infinite
+        instead of having a separate boolean property for that.
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::RenderLayerBacking):
+        (WebCore::computeTileCoverage):
+        Push the FrameView's cached exposed rect down into the TiledBacking when it is created.
+        We only support clipping for the main frame TileController for now.
+
</ins><span class="cx"> 2014-01-07  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         a fractional value of the css letter-spacing property is not rendered as expected
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -1268,6 +1268,7 @@
</span><span class="cx"> __ZN7WebCore9FrameView13setNodeToDrawEPNS_4NodeE
</span><span class="cx"> __ZN7WebCore9FrameView14adjustViewSizeEv
</span><span class="cx"> __ZN7WebCore9FrameView14invalidateRectERKNS_7IntRectE
</span><ins>+__ZN7WebCore9FrameView14setExposedRectENS_9FloatRectE
</ins><span class="cx"> __ZN7WebCore9FrameView14setNeedsLayoutEv
</span><span class="cx"> __ZN7WebCore9FrameView14setTransparentEb
</span><span class="cx"> __ZN7WebCore9FrameView15setFooterHeightEi
</span><span class="lines">@@ -1859,6 +1860,7 @@
</span><span class="cx"> __ZThn???_NK7WebCore15GraphicsLayerCA32platformCALayerDeviceScaleFactorEv
</span><span class="cx"> __ZThn???_NK7WebCore15GraphicsLayerCA33platformCALayerShowRepaintCounterEPNS_15PlatformCALayerE
</span><span class="cx"> __ZThn???_NK7WebCore15GraphicsLayerCA49platformCALayerContentsScaleMultiplierForNewTilesEPNS_15PlatformCALayerE
</span><ins>+__ZThn???_NK7WebCore15GraphicsLayerCA26platformCALayerExposedRectEv
</ins><span class="cx"> _filenameByFixingIllegalCharacters
</span><span class="cx"> _hasCaseInsensitivePrefix
</span><span class="cx"> _hasCaseInsensitiveSubstring
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -201,6 +201,7 @@
</span><span class="cx">     , m_deferredRepaintTimer(this, &amp;FrameView::deferredRepaintTimerFired)
</span><span class="cx">     , m_isTrackingRepaints(false)
</span><span class="cx">     , m_shouldUpdateWhileOffscreen(true)
</span><ins>+    , m_exposedRect(FloatRect::infiniteRect())
</ins><span class="cx">     , m_deferSetNeedsLayouts(0)
</span><span class="cx">     , m_setNeedsLayoutWasDeferred(false)
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -4371,4 +4372,20 @@
</span><span class="cx">         protectedWidgets[i]-&gt;notifyWidget(notification);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void FrameView::setExposedRect(FloatRect exposedRect)
+{
+    if (m_exposedRect == exposedRect)
+        return;
+
+    m_exposedRect = exposedRect;
+
+#if USE(ACCELERATED_COMPOSITING)
+    // FIXME: We should support clipping to the exposed rect for subframes as well.
+    if (m_frame-&gt;isMainFrame()) {
+        if (TiledBacking* tiledBacking = this-&gt;tiledBacking())
+            tiledBacking-&gt;setExposedRect(exposedRect);
+    }
+#endif
+}
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebCore/page/FrameView.h        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -445,6 +445,13 @@
</span><span class="cx"> 
</span><span class="cx">     void addTrackedRepaintRect(const IntRect&amp;);
</span><span class="cx"> 
</span><ins>+    // exposedRect represents WebKit's understanding of what part
+    // of the view is actually exposed on screen (taking into account
+    // clipping by other UI elements), whereas visibleContentRect is
+    // internal to WebCore and doesn't respect those things.
+    void setExposedRect(FloatRect);
+    FloatRect exposedRect() const { return m_exposedRect; }
+
</ins><span class="cx"> protected:
</span><span class="cx">     virtual bool scrollContentsFastPath(const IntSize&amp; scrollDelta, const IntRect&amp; rectToScroll, const IntRect&amp; clipRect) OVERRIDE;
</span><span class="cx">     virtual void scrollContentsSlowPath(const IntRect&amp; updateRect) OVERRIDE;
</span><span class="lines">@@ -630,6 +637,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool m_shouldUpdateWhileOffscreen;
</span><span class="cx"> 
</span><ins>+    FloatRect m_exposedRect;
+
</ins><span class="cx">     unsigned m_deferSetNeedsLayouts;
</span><span class="cx">     bool m_setNeedsLayoutWasDeferred;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTiledBackingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TiledBacking.h (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TiledBacking.h        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebCore/platform/graphics/TiledBacking.h        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -48,8 +48,6 @@
</span><span class="cx">     virtual bool tilesWouldChangeForVisibleRect(const FloatRect&amp;) const = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual void setExposedRect(const FloatRect&amp;) = 0;
</span><del>-    virtual void setClipsToExposedRect(bool) = 0;
-    virtual bool clipsToExposedRect() = 0;
</del><span class="cx"> 
</span><span class="cx">     virtual void prepopulateRect(const FloatRect&amp;) = 0;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacTileControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -103,8 +103,6 @@
</span><span class="cx">     virtual void setVisibleRect(const FloatRect&amp;) OVERRIDE;
</span><span class="cx">     virtual bool tilesWouldChangeForVisibleRect(const FloatRect&amp;) const OVERRIDE;
</span><span class="cx">     virtual void setExposedRect(const FloatRect&amp;) OVERRIDE;
</span><del>-    virtual bool clipsToExposedRect() OVERRIDE { return m_clipsToExposedRect; }
-    virtual void setClipsToExposedRect(bool) OVERRIDE;
</del><span class="cx">     virtual void prepopulateRect(const FloatRect&amp;) OVERRIDE;
</span><span class="cx">     virtual void setIsInWindow(bool) OVERRIDE;
</span><span class="cx">     virtual void setTileCoverage(TileCoverage) OVERRIDE;
</span><span class="lines">@@ -245,7 +243,6 @@
</span><span class="cx">     bool m_unparentsOffscreenTiles;
</span><span class="cx">     bool m_acceleratesDrawing;
</span><span class="cx">     bool m_tilesAreOpaque;
</span><del>-    bool m_clipsToExposedRect;
</del><span class="cx">     bool m_hasTilesWithTemporaryScaleFactor; // Used to make low-res tiles when zooming.
</span><span class="cx"> 
</span><span class="cx">     Color m_tileDebugBorderColor;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacTileControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> TileController::TileController(PlatformCALayer* rootPlatformLayer)
</span><span class="cx">     : m_tileCacheLayer(rootPlatformLayer)
</span><span class="cx">     , m_tileSize(defaultTileWidth, defaultTileHeight)
</span><ins>+    , m_exposedRect(FloatRect::infiniteRect())
</ins><span class="cx">     , m_tileRevalidationTimer(this, &amp;TileController::tileRevalidationTimerFired)
</span><span class="cx">     , m_cohortRemovalTimer(this, &amp;TileController::cohortRemovalTimerFired)
</span><span class="cx">     , m_scale(1)
</span><span class="lines">@@ -67,7 +68,6 @@
</span><span class="cx">     , m_unparentsOffscreenTiles(false)
</span><span class="cx">     , m_acceleratesDrawing(false)
</span><span class="cx">     , m_tilesAreOpaque(false)
</span><del>-    , m_clipsToExposedRect(false)
</del><span class="cx">     , m_hasTilesWithTemporaryScaleFactor(false)
</span><span class="cx">     , m_tileDebugBorderWidth(0)
</span><span class="cx">     , m_indicatorMode(AsyncScrollingIndication)
</span><span class="lines">@@ -277,10 +277,8 @@
</span><span class="cx"> bool TileController::tilesWouldChangeForVisibleRect(const FloatRect&amp; newVisibleRect) const
</span><span class="cx"> {
</span><span class="cx">     FloatRect visibleRect = newVisibleRect;
</span><ins>+    visibleRect.intersect(m_exposedRect);
</ins><span class="cx"> 
</span><del>-    if (m_clipsToExposedRect)
-        visibleRect.intersect(m_exposedRect);
-
</del><span class="cx">     if (visibleRect.isEmpty() || bounds().isEmpty())
</span><span class="cx">         return false;
</span><span class="cx">         
</span><span class="lines">@@ -312,18 +310,6 @@
</span><span class="cx">     setNeedsRevalidateTiles();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TileController::setClipsToExposedRect(bool clipsToExposedRect)
-{
-    if (m_clipsToExposedRect == clipsToExposedRect)
-        return;
-
-    m_clipsToExposedRect = clipsToExposedRect;
-
-    // Going from not clipping to clipping, we don't need to revalidate right away.
-    if (clipsToExposedRect)
-        setNeedsRevalidateTiles();
-}
-
</del><span class="cx"> void TileController::prepopulateRect(const FloatRect&amp; rect)
</span><span class="cx"> {
</span><span class="cx">     FloatRect scaledRect(rect);
</span><span class="lines">@@ -487,10 +473,8 @@
</span><span class="cx"> FloatRect TileController::computeTileCoverageRect(const FloatRect&amp; previousVisibleRect, const FloatRect&amp; currentVisibleRect) const
</span><span class="cx"> {
</span><span class="cx">     FloatRect visibleRect = currentVisibleRect;
</span><ins>+    visibleRect.intersect(m_exposedRect);
</ins><span class="cx"> 
</span><del>-    if (m_clipsToExposedRect)
-        visibleRect.intersect(m_exposedRect);
-
</del><span class="cx">     // If the page is not in a window (for example if it's in a background tab), we limit the tile coverage rect to the visible rect.
</span><span class="cx">     if (!m_isInWindow)
</span><span class="cx">         return visibleRect;
</span><span class="lines">@@ -688,8 +672,7 @@
</span><span class="cx">     FloatRect visibleRect = m_visibleRect;
</span><span class="cx">     IntRect bounds = this-&gt;bounds();
</span><span class="cx"> 
</span><del>-    if (m_clipsToExposedRect)
-        visibleRect.intersect(m_exposedRect);
</del><ins>+    visibleRect.intersect(m_exposedRect);
</ins><span class="cx"> 
</span><span class="cx">     if (visibleRect.isEmpty() || bounds.isEmpty())
</span><span class="cx">         return;
</span><span class="lines">@@ -932,9 +915,7 @@
</span><span class="cx">     FloatRect containerBounds = bounds();
</span><span class="cx">     FloatRect visibleRect = this-&gt;visibleRect();
</span><span class="cx"> 
</span><del>-    if (m_clipsToExposedRect)
-        visibleRect.intersect(m_exposedRect);
-
</del><ins>+    visibleRect.intersect(m_exposedRect);
</ins><span class="cx">     visibleRect.contract(4, 4); // Layer is positioned 2px from top and left edges.
</span><span class="cx"> 
</span><span class="cx">     float widthScale = 1;
</span><span class="lines">@@ -948,7 +929,7 @@
</span><span class="cx">     FloatRect mapBounds = containerBounds;
</span><span class="cx">     mapBounds.scale(indicatorScale, indicatorScale);
</span><span class="cx"> 
</span><del>-    if (m_clipsToExposedRect)
</del><ins>+    if (!m_exposedRect.isInfinite())
</ins><span class="cx">         m_tiledScrollingIndicatorLayer-&gt;setPosition(m_exposedRect.location() + FloatPoint(2, 2));
</span><span class="cx">     else
</span><span class="cx">         m_tiledScrollingIndicatorLayer-&gt;setPosition(FloatPoint(2, 2));
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -142,6 +142,7 @@
</span><span class="cx">         tiledBacking-&gt;setIsInWindow(page-&gt;isInWindow());
</span><span class="cx"> 
</span><span class="cx">         if (m_isMainFrameRenderViewLayer) {
</span><ins>+            tiledBacking-&gt;setExposedRect(renderer().frame().view()-&gt;exposedRect());
</ins><span class="cx">             tiledBacking-&gt;setUnparentsOffscreenTiles(true);
</span><span class="cx">             if (page-&gt;settings().backgroundShouldExtendBeyondPage())
</span><span class="cx">                 tiledBacking-&gt;setTileMargins(512, 512, 512, 512);
</span><span class="lines">@@ -228,7 +229,7 @@
</span><span class="cx">             backing-&gt;setDidSwitchToFullTileCoverageDuringLoading();
</span><span class="cx">     }
</span><span class="cx">     if (!(useMinimalTilesDuringLoading || useMinimalTilesDuringLiveResize)) {
</span><del>-        bool clipsToExposedRect = backing-&gt;tiledBacking()-&gt;clipsToExposedRect();
</del><ins>+        bool clipsToExposedRect = !frameView.exposedRect().isInfinite();
</ins><span class="cx">         if (frameView.horizontalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect)
</span><span class="cx">             tileCoverage |= TiledBacking::CoverageForHorizontalScrolling;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2014-01-08  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        TileController can fail to receive exposedRect from the drawing area if set at the wrong time
+        https://bugs.webkit.org/show_bug.cgi?id=126536
+
+        Reviewed by Simon Fraser.
+
+        * Configurations/WebKit2.xcconfig:
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _updateViewExposedRect]):
+        * UIProcess/DrawingAreaProxy.cpp:
+        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
+        (WebKit::DrawingAreaProxy::setExposedRect):
+        (WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
+        * UIProcess/DrawingAreaProxy.h:
+        (WebKit::DrawingAreaProxy::exposedRect):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        (WebKit::WebPageProxy::close):
+        * UIProcess/WebPageProxy.h:
+        Move exposedRect stuff from WebPageProxy to DrawingAreaProxy.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
+        Push the exposedRect down into WebCore.
+
+        * WebProcess/WebPage/DrawingArea.h:
+        * WebProcess/WebPage/DrawingArea.messages.in:
+        * WebProcess/WebPage/WebPage.cpp:
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
+        (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
+        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+        (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
+        (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
+        (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
+        (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
+        Get rid of &quot;clipsToExposedRect&quot;, we just use infinite-ness of the rect
+        to indicate that now.
+        Don't scroll an infinite rect; it won't work.
+
</ins><span class="cx"> 2014-01-08  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add ENABLE(ASYNC_SCROLLING) guards around WK2 scrolling files
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -390,7 +390,7 @@
</span><span class="cx">     if (_data-&gt;_useContentPreparationRectForVisibleRect)
</span><span class="cx">         exposedRect = NSUnionRect(_data-&gt;_contentPreparationRect, exposedRect);
</span><span class="cx"> 
</span><del>-    _data-&gt;_page-&gt;viewExposedRectChanged(exposedRect, _data-&gt;_clipsToVisibleRect ? WebPageProxy::ClipsToExposedRect::Clip : WebPageProxy::ClipsToExposedRect::DoNotClip);
</del><ins>+    _data-&gt;_page-&gt;drawingArea()-&gt;setExposedRect(_data-&gt;_clipsToVisibleRect ? FloatRect(exposedRect) : FloatRect::infiniteRect());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)setFrameSize:(NSSize)size
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;DrawingAreaProxy.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;DrawingAreaMessages.h&quot;
</ins><span class="cx"> #include &quot;DrawingAreaProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="cx"> #include &quot;WebProcessProxy.h&quot;
</span><span class="lines">@@ -38,6 +39,9 @@
</span><span class="cx">     : m_type(type)
</span><span class="cx">     , m_webPageProxy(webPageProxy)
</span><span class="cx">     , m_size(webPageProxy-&gt;viewSize())
</span><ins>+#if PLATFORM(MAC)
+    , m_exposedRectChangedTimer(this, &amp;DrawingAreaProxy::exposedRectChangedTimerFired)
+#endif
</ins><span class="cx"> {
</span><span class="cx">     m_webPageProxy-&gt;process().addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), webPageProxy-&gt;pageID(), *this);
</span><span class="cx"> }
</span><span class="lines">@@ -58,4 +62,29 @@
</span><span class="cx">     sizeDidChange();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+void DrawingAreaProxy::setExposedRect(const FloatRect&amp; exposedRect)
+{
+    if (!m_webPageProxy-&gt;isValid())
+        return;
+
+    m_exposedRect = exposedRect;
+
+    if (!m_exposedRectChangedTimer.isActive())
+        m_exposedRectChangedTimer.startOneShot(0);
+}
+
+void DrawingAreaProxy::exposedRectChangedTimerFired(Timer&lt;DrawingAreaProxy&gt;*)
+{
+    if (!m_webPageProxy-&gt;isValid())
+        return;
+
+    if (m_exposedRect == m_lastSentExposedRect)
+        return;
+
+    m_webPageProxy-&gt;process().send(Messages::DrawingArea::SetExposedRect(m_exposedRect), m_webPageProxy-&gt;pageID());
+    m_lastSentExposedRect = m_exposedRect;
+}
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -29,9 +29,10 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DrawingAreaInfo.h&quot;
</span><span class="cx"> #include &quot;MessageReceiver.h&quot;
</span><del>-#include &lt;WebCore/FloatPoint.h&gt;
</del><ins>+#include &lt;WebCore/FloatRect.h&gt;
</ins><span class="cx"> #include &lt;WebCore/IntRect.h&gt;
</span><span class="cx"> #include &lt;WebCore/IntSize.h&gt;
</span><ins>+#include &lt;WebCore/Timer.h&gt;
</ins><span class="cx"> #include &lt;chrono&gt;
</span><span class="cx"> #include &lt;stdint.h&gt;
</span><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="lines">@@ -72,6 +73,12 @@
</span><span class="cx">     virtual void adjustTransientZoom(double, WebCore::FloatPoint) { }
</span><span class="cx">     virtual void commitTransientZoom(double, WebCore::FloatPoint) { }
</span><span class="cx"> 
</span><ins>+#if PLATFORM(MAC)
+    void setExposedRect(const WebCore::FloatRect&amp;);
+    WebCore::FloatRect exposedRect() const { return m_exposedRect; }
+    void exposedRectChangedTimerFired(WebCore::Timer&lt;DrawingAreaProxy&gt;*);
+#endif
+
</ins><span class="cx"> protected:
</span><span class="cx">     explicit DrawingAreaProxy(DrawingAreaType, WebPageProxy*);
</span><span class="cx"> 
</span><span class="lines">@@ -100,6 +107,10 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     virtual void didUpdateGeometry() { }
</span><span class="cx">     virtual void intrinsicContentSizeDidChange(const WebCore::IntSize&amp; newIntrinsicContentSize) { }
</span><ins>+
+    WebCore::Timer&lt;DrawingAreaProxy&gt; m_exposedRectChangedTimer;
+    WebCore::FloatRect m_exposedRect;
+    WebCore::FloatRect m_lastSentExposedRect;
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -308,11 +308,6 @@
</span><span class="cx">     , m_mediaVolume(1)
</span><span class="cx">     , m_mayStartMediaWhenInWindow(true)
</span><span class="cx">     , m_waitingForDidUpdateViewState(false)
</span><del>-#if PLATFORM(MAC)
-    , m_exposedRectChangedTimer(this, &amp;WebPageProxy::exposedRectChangedTimerFired)
-    , m_clipsToExposedRect(ClipsToExposedRect::DoNotClip)
-    , m_lastSentClipsToExposedRect(ClipsToExposedRect::DoNotClip)
-#endif
</del><span class="cx">     , m_scrollPinningBehavior(DoNotPin)
</span><span class="cx"> {
</span><span class="cx">     updateViewState();
</span><span class="lines">@@ -562,10 +557,6 @@
</span><span class="cx">     m_contextMenuClient.initialize(0);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) &amp;&amp; !PLATFORM(IOS)
-    m_exposedRectChangedTimer.stop();
-#endif
-
</del><span class="cx">     m_process-&gt;send(Messages::WebPage::Close(), m_pageID);
</span><span class="cx">     m_process-&gt;removeWebPage(m_pageID);
</span><span class="cx">     m_process-&gt;removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID);
</span><span class="lines">@@ -4420,31 +4411,4 @@
</span><span class="cx">         m_process-&gt;send(Messages::WebPage::SetScrollPinningBehavior(pinning), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#if PLATFORM(MAC) || PLATFORM(IOS)
-void WebPageProxy::viewExposedRectChanged(const FloatRect&amp; exposedRect, ClipsToExposedRect clipsToExposedRect)
-{
-    if (!isValid())
-        return;
-
-    m_exposedRect = exposedRect;
-    m_clipsToExposedRect = clipsToExposedRect;
-
-    if (!m_exposedRectChangedTimer.isActive())
-        m_exposedRectChangedTimer.startOneShot(0);
-}
-
-void WebPageProxy::exposedRectChangedTimerFired(Timer&lt;WebPageProxy&gt;*)
-{
-    if (!isValid())
-        return;
-
-    if (m_exposedRect == m_lastSentExposedRect &amp;&amp; m_clipsToExposedRect == m_lastSentClipsToExposedRect)
-        return;
-
-    process().send(Messages::WebPage::ViewExposedRectChanged(m_exposedRect, m_clipsToExposedRect == ClipsToExposedRect::Clip), m_pageID);
-    m_lastSentExposedRect = m_exposedRect;
-    m_lastSentClipsToExposedRect = m_clipsToExposedRect;
-}
-#endif
-
</del><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -472,10 +472,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     void windowAndViewFramesChanged(const WebCore::FloatRect&amp; viewFrameInWindowCoordinates, const WebCore::FloatPoint&amp; accessibilityViewCoordinates);
</span><del>-    enum class ClipsToExposedRect { DoNotClip, Clip };
-    void viewExposedRectChanged(const WebCore::FloatRect&amp; exposedRect, ClipsToExposedRect);
-    WebCore::FloatRect viewExposedRect() const { return m_exposedRect; }
-    void exposedRectChangedTimerFired(WebCore::Timer&lt;WebPageProxy&gt;*);
</del><span class="cx">     void setMainFrameIsScrollable(bool);
</span><span class="cx"> 
</span><span class="cx">     void setComposition(const String&amp; text, Vector&lt;WebCore::CompositionUnderline&gt; underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
</span><span class="lines">@@ -1374,14 +1370,6 @@
</span><span class="cx">     bool m_waitingForDidUpdateViewState;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    WebCore::Timer&lt;WebPageProxy&gt; m_exposedRectChangedTimer;
-    WebCore::FloatRect m_exposedRect;
-    WebCore::FloatRect m_lastSentExposedRect;
-    ClipsToExposedRect m_clipsToExposedRect;
-    ClipsToExposedRect m_lastSentClipsToExposedRect;
-#endif
-
-#if PLATFORM(MAC)
</del><span class="cx">     HashMap&lt;String, String&gt; m_temporaryPDFFiles;
</span><span class="cx"> #endif
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -1238,6 +1238,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_frame-&gt;coreFrame()-&gt;view()-&gt;setProhibitsScrolling(shouldDisableScrolling);
</span><span class="cx">     m_frame-&gt;coreFrame()-&gt;view()-&gt;setVisualUpdatesAllowedByClient(!webPage-&gt;shouldExtendIncrementalRenderingSuppression());
</span><ins>+    m_frame-&gt;coreFrame()-&gt;view()-&gt;setExposedRect(webPage-&gt;drawingArea()-&gt;exposedRect());
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     m_frame-&gt;coreFrame()-&gt;view()-&gt;setDelegatesScrolling(true);
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DrawingAreaInfo.h&quot;
</span><span class="cx"> #include &quot;LayerTreeContext.h&quot;
</span><del>-#include &lt;WebCore/FloatPoint.h&gt;
</del><ins>+#include &lt;WebCore/FloatRect.h&gt;
</ins><span class="cx"> #include &lt;WebCore/IntRect.h&gt;
</span><span class="cx"> #include &lt;WebCore/ViewState.h&gt;
</span><span class="cx"> #include &lt;wtf/Forward.h&gt;
</span><span class="lines">@@ -86,8 +86,8 @@
</span><span class="cx">     virtual void updatePreferences(const WebPreferencesStore&amp;) { }
</span><span class="cx">     virtual void mainFrameContentSizeChanged(const WebCore::IntSize&amp;) { }
</span><span class="cx"> 
</span><del>-    virtual void setExposedRect(const WebCore::FloatRect&amp;) { }
-    virtual void setClipsToExposedRect(bool) { }
</del><ins>+    virtual void setExposedRect(const WebCore::FloatRect&amp;) = 0;
+    virtual WebCore::FloatRect exposedRect() const = 0;
</ins><span class="cx">     virtual void mainFrameScrollabilityChanged(bool) { }
</span><span class="cx"> 
</span><span class="cx">     virtual bool supportsAsyncScrolling() { return false; }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreamessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -29,7 +29,8 @@
</span><span class="cx">     UpdateGeometry(WebCore::IntSize viewSize, WebCore::IntSize layerPosition)
</span><span class="cx">     SetDeviceScaleFactor(float deviceScaleFactor)
</span><span class="cx">     SetColorSpace(WebKit::ColorSpaceData colorSpace)
</span><del>-    
</del><ins>+    SetExposedRect(WebCore::FloatRect exposedRect)
+
</ins><span class="cx">     AdjustTransientZoom(double scale, WebCore::FloatPoint origin)
</span><span class="cx">     CommitTransientZoom(double scale, WebCore::FloatPoint origin)
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -3075,12 +3075,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WebPage::viewExposedRectChanged(const FloatRect&amp; exposedRect, bool clipsToExposedRect)
-{
-    m_drawingArea-&gt;setExposedRect(exposedRect);
-    m_drawingArea-&gt;setClipsToExposedRect(clipsToExposedRect);
-}
-
</del><span class="cx"> void WebPage::setMainFrameIsScrollable(bool isScrollable)
</span><span class="cx"> {
</span><span class="cx">     m_mainFrameIsScrollable = isScrollable;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -802,7 +802,6 @@
</span><span class="cx">     void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&amp;, uint32_t first, uint32_t count);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void viewExposedRectChanged(const WebCore::FloatRect&amp; exposedRect, bool clipsToExposedRect);
</del><span class="cx">     void setMainFrameIsScrollable(bool);
</span><span class="cx"> 
</span><span class="cx">     void unapplyEditCommand(uint64_t commandID);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -268,7 +268,6 @@
</span><span class="cx">     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
</span><span class="cx"> 
</span><span class="cx">     WindowAndViewFramesChanged(WebCore::FloatRect windowFrameInScreenCoordinates, WebCore::FloatRect windowFrameInUnflippedScreenCoordinates, WebCore::FloatRect viewFrameInWindowCoordinates, WebCore::FloatPoint accessibilityViewCoordinates)
</span><del>-    ViewExposedRectChanged(WebCore::FloatRect exposedRect, bool clipsToExposedRect)
</del><span class="cx">     SetMainFrameIsScrollable(bool isScrollable)
</span><span class="cx">     RegisterUIProcessAccessibilityTokens(IPC::DataReference elemenToken, IPC::DataReference windowToken)
</span><span class="cx">     GetStringSelectionForPasteboard() -&gt; (String stringValue)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     virtual bool forceRepaintAsync(uint64_t) OVERRIDE { return false; }
</span><span class="cx"> 
</span><span class="cx">     virtual void setExposedRect(const WebCore::FloatRect&amp;) OVERRIDE;
</span><del>-    virtual void setClipsToExposedRect(bool) OVERRIDE;
</del><ins>+    virtual WebCore::FloatRect exposedRect() const OVERRIDE { return m_scrolledExposedRect; }
</ins><span class="cx"> 
</span><span class="cx">     // WebCore::GraphicsLayerClient
</span><span class="cx">     virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) OVERRIDE { }
</span><span class="lines">@@ -85,7 +85,6 @@
</span><span class="cx">     virtual bool allowCompositingLayerVisualDegradation() const OVERRIDE { return false; }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    void updateMainFrameClipsToExposedRect();
</del><span class="cx">     void updateScrolledExposedRect();
</span><span class="cx"> 
</span><span class="cx">     void layerFlushTimerFired(WebCore::Timer&lt;RemoteLayerTreeDrawingArea&gt;*);
</span><span class="lines">@@ -102,7 +101,6 @@
</span><span class="cx"> 
</span><span class="cx">     WebCore::FloatRect m_exposedRect;
</span><span class="cx">     WebCore::FloatRect m_scrolledExposedRect;
</span><del>-    bool m_clipsToExposedRect;
</del><span class="cx"> 
</span><span class="cx">     WebCore::Timer&lt;RemoteLayerTreeDrawingArea&gt; m_layerFlushTimer;
</span><span class="cx">     bool m_isFlushingSuspended;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -46,7 +46,8 @@
</span><span class="cx"> RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea(WebPage* webPage, const WebPageCreationParameters&amp;)
</span><span class="cx">     : DrawingArea(DrawingAreaTypeRemoteLayerTree, webPage)
</span><span class="cx">     , m_remoteLayerTreeContext(std::make_unique&lt;RemoteLayerTreeContext&gt;(webPage))
</span><del>-    , m_clipsToExposedRect(false)
</del><ins>+    , m_exposedRect(FloatRect::infiniteRect())
+    , m_scrolledExposedRect(FloatRect::infiniteRect())
</ins><span class="cx">     , m_layerFlushTimer(this, &amp;RemoteLayerTreeDrawingArea::layerFlushTimerFired)
</span><span class="cx">     , m_isFlushingSuspended(false)
</span><span class="cx">     , m_hasDeferredFlush(false)
</span><span class="lines">@@ -54,7 +55,6 @@
</span><span class="cx">     webPage-&gt;corePage()-&gt;settings().setForceCompositingMode(true);
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     webPage-&gt;corePage()-&gt;settings().setDelegatesPageScaling(true);
</span><del>-    setClipsToExposedRect(true);
</del><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -234,18 +234,8 @@
</span><span class="cx">     updateScrolledExposedRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeDrawingArea::setClipsToExposedRect(bool clipsToExposedRect)
-{
-    m_clipsToExposedRect = clipsToExposedRect;
-    updateScrolledExposedRect();
-    updateMainFrameClipsToExposedRect();
-}
-
</del><span class="cx"> void RemoteLayerTreeDrawingArea::updateScrolledExposedRect()
</span><span class="cx"> {
</span><del>-    if (!m_clipsToExposedRect)
-        return;
-
</del><span class="cx">     FrameView* frameView = m_webPage-&gt;corePage()-&gt;mainFrame().view();
</span><span class="cx">     if (!frameView)
</span><span class="cx">         return;
</span><span class="lines">@@ -253,30 +243,18 @@
</span><span class="cx">     m_scrolledExposedRect = m_exposedRect;
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>-    IntPoint scrollPositionWithOrigin = frameView-&gt;scrollPosition() + toIntSize(frameView-&gt;scrollOrigin());
-    m_scrolledExposedRect.moveBy(scrollPositionWithOrigin);
</del><ins>+    if (!m_exposedRect.isInfinite()) {
+        IntPoint scrollPositionWithOrigin = frameView-&gt;scrollPosition() + toIntSize(frameView-&gt;scrollOrigin());
+        m_scrolledExposedRect.moveBy(scrollPositionWithOrigin);
+    }
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    mainFrameTiledBacking()-&gt;setExposedRect(m_scrolledExposedRect);
</del><ins>+    frameView-&gt;setExposedRect(m_scrolledExposedRect);
</ins><span class="cx"> 
</span><del>-    for (auto it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it) {
-        if (TiledBacking* tiledBacking = it-&gt;value-&gt;tiledBacking())
</del><ins>+    for (const auto&amp; layer : m_pageOverlayLayers.values()) {
+        if (TiledBacking* tiledBacking = layer-&gt;tiledBacking())
</ins><span class="cx">             tiledBacking-&gt;setExposedRect(m_scrolledExposedRect);
</span><span class="cx">     }
</span><del>-}
-
-void RemoteLayerTreeDrawingArea::updateMainFrameClipsToExposedRect()
-{
-    if (TiledBacking* tiledBacking = mainFrameTiledBacking())
-        tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
-
-    for (auto it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it)
-        if (TiledBacking* tiledBacking = it-&gt;value-&gt;tiledBacking())
-            tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
-
-    FrameView* frameView = m_webPage-&gt;corePage()-&gt;mainFrame().view();
-    if (!frameView)
-        return;
</del><span class="cx">     
</span><span class="cx">     frameView-&gt;adjustTiledBackingCoverage();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -78,7 +78,8 @@
</span><span class="cx">     virtual void mainFrameContentSizeChanged(const WebCore::IntSize&amp;) OVERRIDE;
</span><span class="cx"> 
</span><span class="cx">     virtual void setExposedRect(const WebCore::FloatRect&amp;) OVERRIDE;
</span><del>-    virtual void setClipsToExposedRect(bool) OVERRIDE;
</del><ins>+    virtual WebCore::FloatRect exposedRect() const OVERRIDE { return m_scrolledExposedRect; }
+
</ins><span class="cx">     virtual bool supportsAsyncScrolling() OVERRIDE { return true; }
</span><span class="cx"> 
</span><span class="cx">     virtual void didChangeScrollOffsetForAnyFrame() OVERRIDE;
</span><span class="lines">@@ -119,7 +120,6 @@
</span><span class="cx">     void updateDebugInfoLayer(bool showLayer);
</span><span class="cx"> 
</span><span class="cx">     void updateIntrinsicContentSizeTimerFired(WebCore::Timer&lt;TiledCoreAnimationDrawingArea&gt;*);
</span><del>-    void updateMainFrameClipsToExposedRect();
</del><span class="cx">     void updateScrolledExposedRect();
</span><span class="cx">     
</span><span class="cx">     void invalidateAllPageOverlays();
</span><span class="lines">@@ -143,7 +143,6 @@
</span><span class="cx"> 
</span><span class="cx">     WebCore::FloatRect m_exposedRect;
</span><span class="cx">     WebCore::FloatRect m_scrolledExposedRect;
</span><del>-    bool m_clipsToExposedRect;
</del><span class="cx"> 
</span><span class="cx">     WebCore::IntSize m_lastSentIntrinsicContentSize;
</span><span class="cx">     WebCore::Timer&lt;TiledCoreAnimationDrawingArea&gt; m_updateIntrinsicContentSizeTimer;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (161529 => 161530)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-01-09 01:25:52 UTC (rev 161529)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-01-09 01:38:13 UTC (rev 161530)
</span><span class="lines">@@ -71,7 +71,8 @@
</span><span class="cx">     , m_layerTreeStateIsFrozen(false)
</span><span class="cx">     , m_layerFlushScheduler(this)
</span><span class="cx">     , m_isPaintingSuspended(!(parameters.viewState &amp; ViewState::IsVisible))
</span><del>-    , m_clipsToExposedRect(false)
</del><ins>+    , m_exposedRect(FloatRect::infiniteRect())
+    , m_scrolledExposedRect(FloatRect::infiniteRect())
</ins><span class="cx">     , m_updateIntrinsicContentSizeTimer(this, &amp;TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired)
</span><span class="cx">     , m_transientZoomScale(1)
</span><span class="cx"> {
</span><span class="lines">@@ -374,9 +375,8 @@
</span><span class="cx">         m_pendingRootCompositingLayer = nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    IntRect visibleRect = enclosingIntRect(m_rootLayer.get().frame);
-    if (m_clipsToExposedRect)
-        visibleRect.intersect(enclosingIntRect(m_scrolledExposedRect));
</del><ins>+    FloatRect visibleRect = [m_rootLayer frame];
+    visibleRect.intersect(m_scrolledExposedRect);
</ins><span class="cx"> 
</span><span class="cx">     for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it) {
</span><span class="cx">         GraphicsLayer* layer = it-&gt;value.get();
</span><span class="lines">@@ -427,33 +427,29 @@
</span><span class="cx">     updateScrolledExposedRect();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TiledCoreAnimationDrawingArea::setClipsToExposedRect(bool clipsToExposedRect)
-{
-    m_clipsToExposedRect = clipsToExposedRect;
-    updateScrolledExposedRect();
-    updateMainFrameClipsToExposedRect();
-}
-
</del><span class="cx"> void TiledCoreAnimationDrawingArea::updateScrolledExposedRect()
</span><span class="cx"> {
</span><del>-    if (!m_clipsToExposedRect)
-        return;
-
</del><span class="cx">     FrameView* frameView = m_webPage-&gt;corePage()-&gt;mainFrame().view();
</span><span class="cx">     if (!frameView)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    IntPoint scrollPositionWithOrigin = frameView-&gt;scrollPosition() + toIntSize(frameView-&gt;scrollOrigin());
-
</del><span class="cx">     m_scrolledExposedRect = m_exposedRect;
</span><del>-    m_scrolledExposedRect.moveBy(scrollPositionWithOrigin);
</del><span class="cx"> 
</span><del>-    mainFrameTiledBacking()-&gt;setExposedRect(m_scrolledExposedRect);
</del><ins>+#if !PLATFORM(IOS)
+    if (!m_exposedRect.isInfinite()) {
+        IntPoint scrollPositionWithOrigin = frameView-&gt;scrollPosition() + toIntSize(frameView-&gt;scrollOrigin());
+        m_scrolledExposedRect.moveBy(scrollPositionWithOrigin);
+    }
+#endif
</ins><span class="cx"> 
</span><del>-    for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it) {
-        if (TiledBacking* tiledBacking = it-&gt;value-&gt;tiledBacking())
</del><ins>+    frameView-&gt;setExposedRect(m_scrolledExposedRect);
+
+    for (const auto&amp; layer : m_pageOverlayLayers.values()) {
+        if (TiledBacking* tiledBacking = layer-&gt;tiledBacking())
</ins><span class="cx">             tiledBacking-&gt;setExposedRect(m_scrolledExposedRect);
</span><span class="cx">     }
</span><ins>+
+    frameView-&gt;adjustTiledBackingCoverage();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updateGeometry(const IntSize&amp; viewSize, const IntSize&amp; layerPosition)
</span><span class="lines">@@ -560,22 +556,6 @@
</span><span class="cx">         m_layerHostingContext-&gt;setColorSpace(colorSpace.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect()
-{
-    if (TiledBacking* tiledBacking = mainFrameTiledBacking())
-        tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
-
-    for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it)
-        if (TiledBacking* tiledBacking = it-&gt;value-&gt;tiledBacking())
-            tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
-
-    FrameView* frameView = m_webPage-&gt;corePage()-&gt;mainFrame().view();
-    if (!frameView)
-        return;
-
-    frameView-&gt;adjustTiledBackingCoverage();
-}
-
</del><span class="cx"> void TiledCoreAnimationDrawingArea::setRootCompositingLayer(CALayer *layer)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!m_layerTreeStateIsFrozen);
</span><span class="lines">@@ -594,13 +574,9 @@
</span><span class="cx">     for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it)
</span><span class="cx">         [m_rootLayer.get() addSublayer:it-&gt;value-&gt;platformLayer()];
</span><span class="cx"> 
</span><del>-    if (TiledBacking* tiledBacking = mainFrameTiledBacking()) {
</del><ins>+    if (TiledBacking* tiledBacking = mainFrameTiledBacking())
</ins><span class="cx">         tiledBacking-&gt;setAggressivelyRetainsTiles(m_webPage-&gt;corePage()-&gt;settings().aggressiveTileRetentionEnabled());
</span><del>-        tiledBacking-&gt;setExposedRect(m_scrolledExposedRect);
-    }
</del><span class="cx"> 
</span><del>-    updateMainFrameClipsToExposedRect();
-
</del><span class="cx">     updateDebugInfoLayer(m_webPage-&gt;corePage()-&gt;settings().showTiledScrollingIndicator());
</span><span class="cx"> 
</span><span class="cx">     [CATransaction commit];
</span><span class="lines">@@ -619,11 +595,6 @@
</span><span class="cx"> 
</span><span class="cx">     m_pageOverlayPlatformLayers.set(layer.get(), layer-&gt;platformLayer());
</span><span class="cx"> 
</span><del>-    if (TiledBacking* tiledBacking = layer-&gt;tiledBacking()) {
-        tiledBacking-&gt;setExposedRect(m_scrolledExposedRect);
-        tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
-    }
-
</del><span class="cx">     [CATransaction begin];
</span><span class="cx">     [CATransaction setDisableActions:YES];
</span><span class="cx"> 
</span><span class="lines">@@ -667,11 +638,6 @@
</span><span class="cx"> 
</span><span class="cx">     [CATransaction commit];
</span><span class="cx"> 
</span><del>-    if (TiledBacking* tiledBacking = layer-&gt;tiledBacking()) {
-        tiledBacking-&gt;setExposedRect(m_scrolledExposedRect);
-        tiledBacking-&gt;setClipsToExposedRect(m_clipsToExposedRect);
-    }
-
</del><span class="cx">     m_pageOverlayPlatformLayers.set(layer, layer-&gt;platformLayer());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>