<!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>[161452] 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/161452">161452</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-01-07 13:27:10 -0800 (Tue, 07 Jan 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/161447">r161447</a>.
http://trac.webkit.org/changeset/161447
https://bugs.webkit.org/show_bug.cgi?id=126592
needs some more work (Requested by thorton on #webkit).
Source/WebCore:
* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::FrameView):
* page/FrameView.h:
* platform/graphics/GraphicsLayerClient.h:
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayerClient.h:
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::tilesWouldChangeForVisibleRect):
(WebCore::TileController::setExposedRect):
(WebCore::TileController::setClipsToExposedRect):
(WebCore::TileController::computeTileCoverageRect):
(WebCore::TileController::revalidateTiles):
(WebCore::TileController::updateTileCoverageMap):
* rendering/RenderLayerBacking.cpp:
(WebCore::computeTileCoverage):
* rendering/RenderLayerBacking.h:
Source/WebKit2:
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateViewExposedRect]):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::viewExposedRectChanged):
(WebKit::WebPageProxy::exposedRectChangedTimerFired):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::viewExposedRect):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setExposedRect):
(WebKit::DrawingArea::setClipsToExposedRect):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::viewExposedRectChanged):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::setClipsToExposedRect):
(WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
(WebKit::RemoteLayerTreeDrawingArea::updateMainFrameClipsToExposedRect):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
(WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):</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="#trunkSourceWebCoreplatformgraphicsGraphicsLayerClienth">trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsTiledBackingh">trunk/Source/WebCore/platform/graphics/TiledBacking.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaPlatformCALayerClienth">trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.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="#trunkSourceWebCorerenderingRenderLayerBackingh">trunk/Source/WebCore/rendering/RenderLayerBacking.h</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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/ChangeLog        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-01-07 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r161447.
+ http://trac.webkit.org/changeset/161447
+ https://bugs.webkit.org/show_bug.cgi?id=126592
+
+ needs some more work (Requested by thorton on #webkit).
+
+ * WebCore.exp.in:
+ * page/FrameView.cpp:
+ (WebCore::FrameView::FrameView):
+ * page/FrameView.h:
+ * platform/graphics/GraphicsLayerClient.h:
+ * platform/graphics/TiledBacking.h:
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ * platform/graphics/ca/PlatformCALayerClient.h:
+ * platform/graphics/ca/mac/TileController.h:
+ * platform/graphics/ca/mac/TileController.mm:
+ (WebCore::TileController::TileController):
+ (WebCore::TileController::tilesWouldChangeForVisibleRect):
+ (WebCore::TileController::setExposedRect):
+ (WebCore::TileController::setClipsToExposedRect):
+ (WebCore::TileController::computeTileCoverageRect):
+ (WebCore::TileController::revalidateTiles):
+ (WebCore::TileController::updateTileCoverageMap):
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::computeTileCoverage):
+ * rendering/RenderLayerBacking.h:
+
</ins><span class="cx"> 2014-01-07 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> TileController can fail to receive exposedRect from the drawing area if set at the wrong time
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -1265,7 +1265,6 @@
</span><span class="cx"> __ZN7WebCore9FrameView13setNodeToDrawEPNS_4NodeE
</span><span class="cx"> __ZN7WebCore9FrameView14adjustViewSizeEv
</span><span class="cx"> __ZN7WebCore9FrameView14invalidateRectERKNS_7IntRectE
</span><del>-__ZN7WebCore9FrameView14setExposedRectENS_9FloatRectE
</del><span class="cx"> __ZN7WebCore9FrameView14setNeedsLayoutEv
</span><span class="cx"> __ZN7WebCore9FrameView14setTransparentEb
</span><span class="cx"> __ZN7WebCore9FrameView15setFooterHeightEi
</span><span class="lines">@@ -1581,7 +1580,6 @@
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA24dumpAdditionalPropertiesERNS_10TextStreamEij
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA25shouldRepaintOnSizeChangeEv
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA26backingStoreMemoryEstimateEv
</span><del>-__ZNK7WebCore15GraphicsLayerCA26platformCALayerExposedRectEv
</del><span class="cx"> __ZNK7WebCore15GraphicsLayerCA30visibleRectChangeRequiresFlushERKNS_9FloatRectE
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA32platformCALayerDeviceScaleFactorEv
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA33platformCALayerShowRepaintCounterEPNS_15PlatformCALayerE
</span><span class="lines">@@ -1858,7 +1856,6 @@
</span><span class="cx"> __ZThn???_NK7WebCore15GraphicsLayerCA32platformCALayerDeviceScaleFactorEv
</span><span class="cx"> __ZThn???_NK7WebCore15GraphicsLayerCA33platformCALayerShowRepaintCounterEPNS_15PlatformCALayerE
</span><span class="cx"> __ZThn???_NK7WebCore15GraphicsLayerCA49platformCALayerContentsScaleMultiplierForNewTilesEPNS_15PlatformCALayerE
</span><del>-__ZThn???_NK7WebCore15GraphicsLayerCA26platformCALayerExposedRectEv
</del><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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/page/FrameView.cpp        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -201,7 +201,6 @@
</span><span class="cx"> , m_deferredRepaintTimer(this, &FrameView::deferredRepaintTimerFired)
</span><span class="cx"> , m_isTrackingRepaints(false)
</span><span class="cx"> , m_shouldUpdateWhileOffscreen(true)
</span><del>- , m_exposedRect(FloatRect::infiniteRect())
</del><span class="cx"> , m_deferSetNeedsLayouts(0)
</span><span class="cx"> , m_setNeedsLayoutWasDeferred(false)
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -4372,17 +4371,4 @@
</span><span class="cx"> protectedWidgets[i]->notifyWidget(notification);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FrameView::setExposedRect(FloatRect exposedRect)
-{
- m_exposedRect = exposedRect;
-
-#if USE(ACCELERATED_COMPOSITING)
- // FIXME: We should support clipping to the exposed rect for subframes as well.
- if (m_frame->isMainFrame()) {
- if (TiledBacking* tiledBacking = this->tiledBacking())
- tiledBacking->exposedRectDidChange();
- }
-#endif
-}
-
</del><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/page/FrameView.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -445,9 +445,6 @@
</span><span class="cx">
</span><span class="cx"> void addTrackedRepaintRect(const IntRect&);
</span><span class="cx">
</span><del>- void setExposedRect(FloatRect);
- FloatRect exposedRect() const { return m_exposedRect; }
-
</del><span class="cx"> protected:
</span><span class="cx"> virtual bool scrollContentsFastPath(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect) OVERRIDE;
</span><span class="cx"> virtual void scrollContentsSlowPath(const IntRect& updateRect) OVERRIDE;
</span><span class="lines">@@ -633,8 +630,6 @@
</span><span class="cx">
</span><span class="cx"> bool m_shouldUpdateWhileOffscreen;
</span><span class="cx">
</span><del>- FloatRect m_exposedRect;
-
</del><span class="cx"> unsigned m_deferSetNeedsLayouts;
</span><span class="cx"> bool m_setNeedsLayoutWasDeferred;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -28,8 +28,6 @@
</span><span class="cx">
</span><span class="cx"> #if USE(ACCELERATED_COMPOSITING)
</span><span class="cx">
</span><del>-#include "FloatRect.h"
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class FloatPoint;
</span><span class="lines">@@ -97,8 +95,6 @@
</span><span class="cx"> virtual bool shouldSkipLayerInDump(const GraphicsLayer*) const { return false; }
</span><span class="cx"> virtual bool shouldDumpPropertyForLayer(const GraphicsLayer*, const char*) const { return true; }
</span><span class="cx">
</span><del>- virtual FloatRect exposedRect() const { return FloatRect::infiniteRect(); }
-
</del><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> // RenderLayerBacking overrides this to verify that it is not
</span><span class="cx"> // currently painting contents. An ASSERT fails, if it is.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsTiledBackingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/TiledBacking.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/TiledBacking.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/platform/graphics/TiledBacking.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -47,7 +47,9 @@
</span><span class="cx"> virtual FloatRect visibleRect() const = 0;
</span><span class="cx"> virtual bool tilesWouldChangeForVisibleRect(const FloatRect&) const = 0;
</span><span class="cx">
</span><del>- virtual void exposedRectDidChange() = 0;
</del><ins>+ virtual void setExposedRect(const FloatRect&) = 0;
+ virtual void setClipsToExposedRect(bool) = 0;
+ virtual bool clipsToExposedRect() = 0;
</ins><span class="cx">
</span><span class="cx"> virtual void prepopulateRect(const FloatRect&) = 0;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx"> virtual void platformCALayerSetNeedsToRevalidateTiles() OVERRIDE;
</span><span class="cx"> virtual float platformCALayerDeviceScaleFactor() const OVERRIDE;
</span><span class="cx"> virtual float platformCALayerContentsScaleMultiplierForNewTiles(PlatformCALayer*) const OVERRIDE;
</span><del>- virtual FloatRect platformCALayerExposedRect() const OVERRIDE { return m_client->exposedRect(); }
</del><ins>+
</ins><span class="cx"> virtual bool isCommittingChanges() const OVERRIDE { return m_isCommittingChanges; }
</span><span class="cx">
</span><span class="cx"> virtual double backingStoreMemoryEstimate() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaPlatformCALayerClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayerClient.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -63,8 +63,6 @@
</span><span class="cx"> virtual float platformCALayerDeviceScaleFactor() const = 0;
</span><span class="cx"> virtual float platformCALayerContentsScaleMultiplierForNewTiles(PlatformCALayer*) const { return 1; }
</span><span class="cx">
</span><del>- virtual FloatRect platformCALayerExposedRect() const = 0;
-
</del><span class="cx"> virtual bool isCommittingChanges() const { return false; }
</span><span class="cx">
</span><span class="cx"> protected:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacTileControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/TileController.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -102,7 +102,9 @@
</span><span class="cx"> // TiledBacking member functions.
</span><span class="cx"> virtual void setVisibleRect(const FloatRect&) OVERRIDE;
</span><span class="cx"> virtual bool tilesWouldChangeForVisibleRect(const FloatRect&) const OVERRIDE;
</span><del>- virtual void exposedRectDidChange() OVERRIDE;
</del><ins>+ virtual void setExposedRect(const FloatRect&) OVERRIDE;
+ virtual bool clipsToExposedRect() OVERRIDE { return m_clipsToExposedRect; }
+ virtual void setClipsToExposedRect(bool) OVERRIDE;
</ins><span class="cx"> virtual void prepopulateRect(const FloatRect&) OVERRIDE;
</span><span class="cx"> virtual void setIsInWindow(bool) OVERRIDE;
</span><span class="cx"> virtual void setTileCoverage(TileCoverage) OVERRIDE;
</span><span class="lines">@@ -144,7 +146,6 @@
</span><span class="cx">
</span><span class="cx"> virtual void platformCALayerSetNeedsToRevalidateTiles() OVERRIDE { }
</span><span class="cx"> virtual float platformCALayerDeviceScaleFactor() const OVERRIDE;
</span><del>- virtual FloatRect platformCALayerExposedRect() const OVERRIDE;
</del><span class="cx">
</span><span class="cx"> IntRect bounds() const;
</span><span class="cx"> IntRect boundsWithoutMargin() const;
</span><span class="lines">@@ -199,6 +200,7 @@
</span><span class="cx"> IntSize m_tileSize;
</span><span class="cx"> FloatRect m_visibleRect;
</span><span class="cx"> FloatRect m_visibleRectAtLastRevalidate;
</span><ins>+ FloatRect m_exposedRect; // The exposed area of containing platform views.
</ins><span class="cx"> IntRect m_boundsAtLastRevalidate;
</span><span class="cx">
</span><span class="cx"> Vector<FloatRect> m_secondaryTileCoverageRects;
</span><span class="lines">@@ -243,6 +245,7 @@
</span><span class="cx"> bool m_unparentsOffscreenTiles;
</span><span class="cx"> bool m_acceleratesDrawing;
</span><span class="cx"> bool m_tilesAreOpaque;
</span><ins>+ bool m_clipsToExposedRect;
</ins><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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/TileController.mm        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> , m_unparentsOffscreenTiles(false)
</span><span class="cx"> , m_acceleratesDrawing(false)
</span><span class="cx"> , m_tilesAreOpaque(false)
</span><ins>+ , m_clipsToExposedRect(false)
</ins><span class="cx"> , m_hasTilesWithTemporaryScaleFactor(false)
</span><span class="cx"> , m_tileDebugBorderWidth(0)
</span><span class="cx"> , m_indicatorMode(AsyncScrollingIndication)
</span><span class="lines">@@ -209,11 +210,6 @@
</span><span class="cx"> return owningGraphicsLayer()->platformCALayerShowRepaintCounter(0);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-FloatRect TileController::platformCALayerExposedRect() const
-{
- return owningGraphicsLayer()->platformCALayerExposedRect();
-}
-
</del><span class="cx"> void TileController::setScale(float scale)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(owningGraphicsLayer()->isCommittingChanges());
</span><span class="lines">@@ -281,8 +277,10 @@
</span><span class="cx"> bool TileController::tilesWouldChangeForVisibleRect(const FloatRect& newVisibleRect) const
</span><span class="cx"> {
</span><span class="cx"> FloatRect visibleRect = newVisibleRect;
</span><del>- visibleRect.intersect(owningGraphicsLayer()->platformCALayerExposedRect());
</del><span class="cx">
</span><ins>+ if (m_clipsToExposedRect)
+ visibleRect.intersect(m_exposedRect);
+
</ins><span class="cx"> if (visibleRect.isEmpty() || bounds().isEmpty())
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="lines">@@ -305,11 +303,27 @@
</span><span class="cx"> return coverageRect != m_primaryTileCoverageRect;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void TileController::exposedRectDidChange()
</del><ins>+void TileController::setExposedRect(const FloatRect& exposedRect)
</ins><span class="cx"> {
</span><ins>+ if (m_exposedRect == exposedRect)
+ return;
+
+ m_exposedRect = exposedRect;
</ins><span class="cx"> setNeedsRevalidateTiles();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+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();
+}
+
</ins><span class="cx"> void TileController::prepopulateRect(const FloatRect& rect)
</span><span class="cx"> {
</span><span class="cx"> FloatRect scaledRect(rect);
</span><span class="lines">@@ -473,8 +487,10 @@
</span><span class="cx"> FloatRect TileController::computeTileCoverageRect(const FloatRect& previousVisibleRect, const FloatRect& currentVisibleRect) const
</span><span class="cx"> {
</span><span class="cx"> FloatRect visibleRect = currentVisibleRect;
</span><del>- visibleRect.intersect(owningGraphicsLayer()->platformCALayerExposedRect());
</del><span class="cx">
</span><ins>+ if (m_clipsToExposedRect)
+ visibleRect.intersect(m_exposedRect);
+
</ins><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">@@ -672,7 +688,8 @@
</span><span class="cx"> FloatRect visibleRect = m_visibleRect;
</span><span class="cx"> IntRect bounds = this->bounds();
</span><span class="cx">
</span><del>- visibleRect.intersect(owningGraphicsLayer()->platformCALayerExposedRect());
</del><ins>+ if (m_clipsToExposedRect)
+ 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">@@ -915,7 +932,9 @@
</span><span class="cx"> FloatRect containerBounds = bounds();
</span><span class="cx"> FloatRect visibleRect = this->visibleRect();
</span><span class="cx">
</span><del>- visibleRect.intersect(owningGraphicsLayer()->platformCALayerExposedRect());
</del><ins>+ if (m_clipsToExposedRect)
+ 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">@@ -929,8 +948,8 @@
</span><span class="cx"> FloatRect mapBounds = containerBounds;
</span><span class="cx"> mapBounds.scale(indicatorScale, indicatorScale);
</span><span class="cx">
</span><del>- if (!owningGraphicsLayer()->platformCALayerExposedRect().isInfinite())
- m_tiledScrollingIndicatorLayer->setPosition(owningGraphicsLayer()->platformCALayerExposedRect().location() + FloatPoint(2, 2));
</del><ins>+ if (m_clipsToExposedRect)
+ m_tiledScrollingIndicatorLayer->setPosition(m_exposedRect.location() + FloatPoint(2, 2));
</ins><span class="cx"> else
</span><span class="cx"> m_tiledScrollingIndicatorLayer->setPosition(FloatPoint(2, 2));
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx"> backing->setDidSwitchToFullTileCoverageDuringLoading();
</span><span class="cx"> }
</span><span class="cx"> if (!(useMinimalTilesDuringLoading || useMinimalTilesDuringLiveResize)) {
</span><del>- bool clipsToExposedRect = !frameView.exposedRect().isInfinite();
</del><ins>+ bool clipsToExposedRect = backing->tiledBacking()->clipsToExposedRect();
</ins><span class="cx"> if (frameView.horizontalScrollbarMode() != ScrollbarAlwaysOff || clipsToExposedRect)
</span><span class="cx"> tileCoverage |= TiledBacking::CoverageForHorizontalScrolling;
</span><span class="cx">
</span><span class="lines">@@ -2598,15 +2598,6 @@
</span><span class="cx"> return backingMemory;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-FloatRect RenderLayerBacking::exposedRect() const
-{
- // FIXME: We should support clipping to the exposed rect for subframes as well.
- if (m_isMainFrameRenderViewLayer)
- return owningLayer().renderer().view().frameView().exposedRect();
-
- return FloatRect::infiniteRect();
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // USE(ACCELERATED_COMPOSITING)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -180,8 +180,6 @@
</span><span class="cx"> virtual bool shouldSkipLayerInDump(const GraphicsLayer*) const OVERRIDE;
</span><span class="cx"> virtual bool shouldDumpPropertyForLayer(const GraphicsLayer*, const char* propertyName) const OVERRIDE;
</span><span class="cx">
</span><del>- virtual FloatRect exposedRect() const OVERRIDE;
-
</del><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> virtual void verifyNotPainting();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2014-01-07 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r161447.
+ http://trac.webkit.org/changeset/161447
+ https://bugs.webkit.org/show_bug.cgi?id=126592
+
+ needs some more work (Requested by thorton on #webkit).
+
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView _updateViewExposedRect]):
+ * UIProcess/DrawingAreaProxy.cpp:
+ (WebKit::DrawingAreaProxy::DrawingAreaProxy):
+ * UIProcess/DrawingAreaProxy.h:
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::WebPageProxy):
+ (WebKit::WebPageProxy::close):
+ (WebKit::WebPageProxy::viewExposedRectChanged):
+ (WebKit::WebPageProxy::exposedRectChangedTimerFired):
+ * UIProcess/WebPageProxy.h:
+ (WebKit::WebPageProxy::viewExposedRect):
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
+ * WebProcess/WebPage/DrawingArea.h:
+ (WebKit::DrawingArea::setExposedRect):
+ (WebKit::DrawingArea::setClipsToExposedRect):
+ * WebProcess/WebPage/DrawingArea.messages.in:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::viewExposedRectChanged):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
+ (WebKit::RemoteLayerTreeDrawingArea::setClipsToExposedRect):
+ (WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
+ (WebKit::RemoteLayerTreeDrawingArea::updateMainFrameClipsToExposedRect):
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
+ (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+ (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
+ (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
+ (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
+ (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
+ (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
+ (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
+
</ins><span class="cx"> 2014-01-07 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> TileController can fail to receive exposedRect from the drawing area if set at the wrong time
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -390,7 +390,7 @@
</span><span class="cx"> if (_data->_useContentPreparationRectForVisibleRect)
</span><span class="cx"> exposedRect = NSUnionRect(_data->_contentPreparationRect, exposedRect);
</span><span class="cx">
</span><del>- _data->_page->drawingArea()->setExposedRect(_data->_clipsToVisibleRect ? FloatRect(exposedRect) : FloatRect::infiniteRect());
</del><ins>+ _data->_page->viewExposedRectChanged(exposedRect, _data->_clipsToVisibleRect ? WebPageProxy::ClipsToExposedRect::Clip : WebPageProxy::ClipsToExposedRect::DoNotClip);
</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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -26,7 +26,6 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "DrawingAreaProxy.h"
</span><span class="cx">
</span><del>-#include "DrawingAreaMessages.h"
</del><span class="cx"> #include "DrawingAreaProxyMessages.h"
</span><span class="cx"> #include "WebPageProxy.h"
</span><span class="cx"> #include "WebProcessProxy.h"
</span><span class="lines">@@ -39,9 +38,6 @@
</span><span class="cx"> : m_type(type)
</span><span class="cx"> , m_webPageProxy(webPageProxy)
</span><span class="cx"> , m_size(webPageProxy->viewSize())
</span><del>-#if PLATFORM(MAC)
- , m_exposedRectChangedTimer(this, &DrawingAreaProxy::exposedRectChangedTimerFired)
-#endif
</del><span class="cx"> {
</span><span class="cx"> m_webPageProxy->process().addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), webPageProxy->pageID(), *this);
</span><span class="cx"> }
</span><span class="lines">@@ -62,29 +58,4 @@
</span><span class="cx"> sizeDidChange();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-#if PLATFORM(MAC)
-void DrawingAreaProxy::setExposedRect(const FloatRect& exposedRect)
-{
- if (!m_webPageProxy->isValid())
- return;
-
- m_exposedRect = exposedRect;
-
- if (!m_exposedRectChangedTimer.isActive())
- m_exposedRectChangedTimer.startOneShot(0);
-}
-
-void DrawingAreaProxy::exposedRectChangedTimerFired(Timer<DrawingAreaProxy>*)
-{
- if (!m_webPageProxy->isValid())
- return;
-
- if (m_exposedRect == m_lastSentExposedRect)
- return;
-
- m_webPageProxy->process().send(Messages::DrawingArea::SetExposedRect(m_exposedRect), m_webPageProxy->pageID());
- m_lastSentExposedRect = m_exposedRect;
-}
-#endif
-
</del><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -29,10 +29,9 @@
</span><span class="cx">
</span><span class="cx"> #include "DrawingAreaInfo.h"
</span><span class="cx"> #include "MessageReceiver.h"
</span><del>-#include <WebCore/FloatRect.h>
</del><ins>+#include <WebCore/FloatPoint.h>
</ins><span class="cx"> #include <WebCore/IntRect.h>
</span><span class="cx"> #include <WebCore/IntSize.h>
</span><del>-#include <WebCore/Timer.h>
</del><span class="cx"> #include <chrono>
</span><span class="cx"> #include <stdint.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="lines">@@ -73,12 +72,6 @@
</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><del>-#if PLATFORM(MAC)
- void setExposedRect(const WebCore::FloatRect&);
- WebCore::FloatRect exposedRect() const { return m_exposedRect; }
- void exposedRectChangedTimerFired(WebCore::Timer<DrawingAreaProxy>*);
-#endif
-
</del><span class="cx"> protected:
</span><span class="cx"> explicit DrawingAreaProxy(DrawingAreaType, WebPageProxy*);
</span><span class="cx">
</span><span class="lines">@@ -107,10 +100,6 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> virtual void didUpdateGeometry() { }
</span><span class="cx"> virtual void intrinsicContentSizeDidChange(const WebCore::IntSize& newIntrinsicContentSize) { }
</span><del>-
- WebCore::Timer<DrawingAreaProxy> m_exposedRectChangedTimer;
- WebCore::FloatRect m_exposedRect;
- WebCore::FloatRect m_lastSentExposedRect;
</del><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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -308,6 +308,11 @@
</span><span class="cx"> , m_mediaVolume(1)
</span><span class="cx"> , m_mayStartMediaWhenInWindow(true)
</span><span class="cx"> , m_waitingForDidUpdateViewState(false)
</span><ins>+#if PLATFORM(MAC)
+ , m_exposedRectChangedTimer(this, &WebPageProxy::exposedRectChangedTimerFired)
+ , m_clipsToExposedRect(ClipsToExposedRect::DoNotClip)
+ , m_lastSentClipsToExposedRect(ClipsToExposedRect::DoNotClip)
+#endif
</ins><span class="cx"> , m_scrollPinningBehavior(DoNotPin)
</span><span class="cx"> {
</span><span class="cx"> updateViewState();
</span><span class="lines">@@ -557,6 +562,10 @@
</span><span class="cx"> m_contextMenuClient.initialize(0);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if PLATFORM(MAC) && !PLATFORM(IOS)
+ m_exposedRectChangedTimer.stop();
+#endif
+
</ins><span class="cx"> m_process->send(Messages::WebPage::Close(), m_pageID);
</span><span class="cx"> m_process->removeWebPage(m_pageID);
</span><span class="cx"> m_process->removeMessageReceiver(Messages::WebPageProxy::messageReceiverName(), m_pageID);
</span><span class="lines">@@ -4411,4 +4420,31 @@
</span><span class="cx"> m_process->send(Messages::WebPage::SetScrollPinningBehavior(pinning), m_pageID);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+#if PLATFORM(MAC) || PLATFORM(IOS)
+void WebPageProxy::viewExposedRectChanged(const FloatRect& exposedRect, ClipsToExposedRect clipsToExposedRect)
+{
+ if (!isValid())
+ return;
+
+ m_exposedRect = exposedRect;
+ m_clipsToExposedRect = clipsToExposedRect;
+
+ if (!m_exposedRectChangedTimer.isActive())
+ m_exposedRectChangedTimer.startOneShot(0);
+}
+
+void WebPageProxy::exposedRectChangedTimerFired(Timer<WebPageProxy>*)
+{
+ if (!isValid())
+ return;
+
+ if (m_exposedRect == m_lastSentExposedRect && 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
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -472,6 +472,10 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> void windowAndViewFramesChanged(const WebCore::FloatRect& viewFrameInWindowCoordinates, const WebCore::FloatPoint& accessibilityViewCoordinates);
</span><ins>+ enum class ClipsToExposedRect { DoNotClip, Clip };
+ void viewExposedRectChanged(const WebCore::FloatRect& exposedRect, ClipsToExposedRect);
+ WebCore::FloatRect viewExposedRect() const { return m_exposedRect; }
+ void exposedRectChangedTimerFired(WebCore::Timer<WebPageProxy>*);
</ins><span class="cx"> void setMainFrameIsScrollable(bool);
</span><span class="cx">
</span><span class="cx"> void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd);
</span><span class="lines">@@ -1370,6 +1374,14 @@
</span><span class="cx"> bool m_waitingForDidUpdateViewState;
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><ins>+ WebCore::Timer<WebPageProxy> m_exposedRectChangedTimer;
+ WebCore::FloatRect m_exposedRect;
+ WebCore::FloatRect m_lastSentExposedRect;
+ ClipsToExposedRect m_clipsToExposedRect;
+ ClipsToExposedRect m_lastSentClipsToExposedRect;
+#endif
+
+#if PLATFORM(MAC)
</ins><span class="cx"> HashMap<String, String> 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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -1238,7 +1238,6 @@
</span><span class="cx">
</span><span class="cx"> m_frame->coreFrame()->view()->setProhibitsScrolling(shouldDisableScrolling);
</span><span class="cx"> m_frame->coreFrame()->view()->setVisualUpdatesAllowedByClient(!webPage->shouldExtendIncrementalRenderingSuppression());
</span><del>- m_frame->coreFrame()->view()->setExposedRect(webPage->drawingArea()->exposedRect());
</del><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> m_frame->coreFrame()->view()->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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #include "DrawingAreaInfo.h"
</span><span class="cx"> #include "LayerTreeContext.h"
</span><del>-#include <WebCore/FloatRect.h>
</del><ins>+#include <WebCore/FloatPoint.h>
</ins><span class="cx"> #include <WebCore/IntRect.h>
</span><span class="cx"> #include <WebCore/ViewState.h>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="lines">@@ -86,8 +86,8 @@
</span><span class="cx"> virtual void updatePreferences(const WebPreferencesStore&) { }
</span><span class="cx"> virtual void mainFrameContentSizeChanged(const WebCore::IntSize&) { }
</span><span class="cx">
</span><del>- virtual void setExposedRect(const WebCore::FloatRect&) = 0;
- virtual WebCore::FloatRect exposedRect() const = 0;
</del><ins>+ virtual void setExposedRect(const WebCore::FloatRect&) { }
+ virtual void setClipsToExposedRect(bool) { }
</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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -29,8 +29,7 @@
</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>- SetExposedRect(WebCore::FloatRect exposedRect)
-
</del><ins>+
</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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -3075,6 +3075,12 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+void WebPage::viewExposedRectChanged(const FloatRect& exposedRect, bool clipsToExposedRect)
+{
+ m_drawingArea->setExposedRect(exposedRect);
+ m_drawingArea->setClipsToExposedRect(clipsToExposedRect);
+}
+
</ins><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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -802,6 +802,7 @@
</span><span class="cx"> void drawPagesToPDFFromPDFDocument(CGContextRef, PDFDocument *, const PrintInfo&, uint32_t first, uint32_t count);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ void viewExposedRectChanged(const WebCore::FloatRect& exposedRect, bool clipsToExposedRect);
</ins><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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -268,6 +268,7 @@
</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><ins>+ ViewExposedRectChanged(WebCore::FloatRect exposedRect, bool clipsToExposedRect)
</ins><span class="cx"> SetMainFrameIsScrollable(bool isScrollable)
</span><span class="cx"> RegisterUIProcessAccessibilityTokens(IPC::DataReference elemenToken, IPC::DataReference windowToken)
</span><span class="cx"> GetStringSelectionForPasteboard() -> (String stringValue)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-01-07 21:27:10 UTC (rev 161452)
</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&) OVERRIDE;
</span><del>- virtual WebCore::FloatRect exposedRect() const OVERRIDE { return m_scrolledExposedRect; }
</del><ins>+ virtual void setClipsToExposedRect(bool) OVERRIDE;
</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,6 +85,7 @@
</span><span class="cx"> virtual bool allowCompositingLayerVisualDegradation() const OVERRIDE { return false; }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ void updateMainFrameClipsToExposedRect();
</ins><span class="cx"> void updateScrolledExposedRect();
</span><span class="cx">
</span><span class="cx"> void layerFlushTimerFired(WebCore::Timer<RemoteLayerTreeDrawingArea>*);
</span><span class="lines">@@ -101,6 +102,7 @@
</span><span class="cx">
</span><span class="cx"> WebCore::FloatRect m_exposedRect;
</span><span class="cx"> WebCore::FloatRect m_scrolledExposedRect;
</span><ins>+ bool m_clipsToExposedRect;
</ins><span class="cx">
</span><span class="cx"> WebCore::Timer<RemoteLayerTreeDrawingArea> 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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -46,8 +46,7 @@
</span><span class="cx"> RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea(WebPage* webPage, const WebPageCreationParameters&)
</span><span class="cx"> : DrawingArea(DrawingAreaTypeRemoteLayerTree, webPage)
</span><span class="cx"> , m_remoteLayerTreeContext(std::make_unique<RemoteLayerTreeContext>(webPage))
</span><del>- , m_exposedRect(FloatRect::infiniteRect())
- , m_scrolledExposedRect(FloatRect::infiniteRect())
</del><ins>+ , m_clipsToExposedRect(false)
</ins><span class="cx"> , m_layerFlushTimer(this, &RemoteLayerTreeDrawingArea::layerFlushTimerFired)
</span><span class="cx"> , m_isFlushingSuspended(false)
</span><span class="cx"> , m_hasDeferredFlush(false)
</span><span class="lines">@@ -55,6 +54,7 @@
</span><span class="cx"> webPage->corePage()->settings().setForceCompositingMode(true);
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> webPage->corePage()->settings().setDelegatesPageScaling(true);
</span><ins>+ setClipsToExposedRect(true);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -234,8 +234,18 @@
</span><span class="cx"> updateScrolledExposedRect();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void RemoteLayerTreeDrawingArea::setClipsToExposedRect(bool clipsToExposedRect)
+{
+ m_clipsToExposedRect = clipsToExposedRect;
+ updateScrolledExposedRect();
+ updateMainFrameClipsToExposedRect();
+}
+
</ins><span class="cx"> void RemoteLayerTreeDrawingArea::updateScrolledExposedRect()
</span><span class="cx"> {
</span><ins>+ if (!m_clipsToExposedRect)
+ return;
+
</ins><span class="cx"> FrameView* frameView = m_webPage->corePage()->mainFrame().view();
</span><span class="cx"> if (!frameView)
</span><span class="cx"> return;
</span><span class="lines">@@ -243,18 +253,30 @@
</span><span class="cx"> m_scrolledExposedRect = m_exposedRect;
</span><span class="cx">
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>- if (!m_exposedRect.isInfinite()) {
- IntPoint scrollPositionWithOrigin = frameView->scrollPosition() + toIntSize(frameView->scrollOrigin());
- m_scrolledExposedRect.moveBy(scrollPositionWithOrigin);
- }
</del><ins>+ IntPoint scrollPositionWithOrigin = frameView->scrollPosition() + toIntSize(frameView->scrollOrigin());
+ m_scrolledExposedRect.moveBy(scrollPositionWithOrigin);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><del>- frameView->setExposedRect(m_scrolledExposedRect);
</del><ins>+ mainFrameTiledBacking()->setExposedRect(m_scrolledExposedRect);
</ins><span class="cx">
</span><del>- for (const auto& layer : m_pageOverlayLayers.values()) {
- if (TiledBacking* tiledBacking = layer->tiledBacking())
- tiledBacking->exposedRectDidChange();
</del><ins>+ for (auto it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it) {
+ if (TiledBacking* tiledBacking = it->value->tiledBacking())
+ tiledBacking->setExposedRect(m_scrolledExposedRect);
</ins><span class="cx"> }
</span><ins>+}
+
+void RemoteLayerTreeDrawingArea::updateMainFrameClipsToExposedRect()
+{
+ if (TiledBacking* tiledBacking = mainFrameTiledBacking())
+ tiledBacking->setClipsToExposedRect(m_clipsToExposedRect);
+
+ for (auto it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it)
+ if (TiledBacking* tiledBacking = it->value->tiledBacking())
+ tiledBacking->setClipsToExposedRect(m_clipsToExposedRect);
+
+ FrameView* frameView = m_webPage->corePage()->mainFrame().view();
+ if (!frameView)
+ return;
</ins><span class="cx">
</span><span class="cx"> frameView->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 (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -78,8 +78,7 @@
</span><span class="cx"> virtual void mainFrameContentSizeChanged(const WebCore::IntSize&) OVERRIDE;
</span><span class="cx">
</span><span class="cx"> virtual void setExposedRect(const WebCore::FloatRect&) OVERRIDE;
</span><del>- virtual WebCore::FloatRect exposedRect() const OVERRIDE { return m_scrolledExposedRect; }
-
</del><ins>+ virtual void setClipsToExposedRect(bool) OVERRIDE;
</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">@@ -120,6 +119,7 @@
</span><span class="cx"> void updateDebugInfoLayer(bool showLayer);
</span><span class="cx">
</span><span class="cx"> void updateIntrinsicContentSizeTimerFired(WebCore::Timer<TiledCoreAnimationDrawingArea>*);
</span><ins>+ void updateMainFrameClipsToExposedRect();
</ins><span class="cx"> void updateScrolledExposedRect();
</span><span class="cx">
</span><span class="cx"> void invalidateAllPageOverlays();
</span><span class="lines">@@ -143,6 +143,7 @@
</span><span class="cx">
</span><span class="cx"> WebCore::FloatRect m_exposedRect;
</span><span class="cx"> WebCore::FloatRect m_scrolledExposedRect;
</span><ins>+ bool m_clipsToExposedRect;
</ins><span class="cx">
</span><span class="cx"> WebCore::IntSize m_lastSentIntrinsicContentSize;
</span><span class="cx"> WebCore::Timer<TiledCoreAnimationDrawingArea> m_updateIntrinsicContentSizeTimer;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (161451 => 161452)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-01-07 21:07:03 UTC (rev 161451)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-01-07 21:27:10 UTC (rev 161452)
</span><span class="lines">@@ -71,8 +71,7 @@
</span><span class="cx"> , m_layerTreeStateIsFrozen(false)
</span><span class="cx"> , m_layerFlushScheduler(this)
</span><span class="cx"> , m_isPaintingSuspended(!(parameters.viewState & ViewState::IsVisible))
</span><del>- , m_exposedRect(FloatRect::infiniteRect())
- , m_scrolledExposedRect(FloatRect::infiniteRect())
</del><ins>+ , m_clipsToExposedRect(false)
</ins><span class="cx"> , m_updateIntrinsicContentSizeTimer(this, &TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired)
</span><span class="cx"> , m_transientZoomScale(1)
</span><span class="cx"> {
</span><span class="lines">@@ -375,8 +374,9 @@
</span><span class="cx"> m_pendingRootCompositingLayer = nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- FloatRect visibleRect = [m_rootLayer frame];
- visibleRect.intersect(m_scrolledExposedRect);
</del><ins>+ IntRect visibleRect = enclosingIntRect(m_rootLayer.get().frame);
+ if (m_clipsToExposedRect)
+ visibleRect.intersect(enclosingIntRect(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->value.get();
</span><span class="lines">@@ -427,29 +427,33 @@
</span><span class="cx"> updateScrolledExposedRect();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void TiledCoreAnimationDrawingArea::setClipsToExposedRect(bool clipsToExposedRect)
+{
+ m_clipsToExposedRect = clipsToExposedRect;
+ updateScrolledExposedRect();
+ updateMainFrameClipsToExposedRect();
+}
+
</ins><span class="cx"> void TiledCoreAnimationDrawingArea::updateScrolledExposedRect()
</span><span class="cx"> {
</span><ins>+ if (!m_clipsToExposedRect)
+ return;
+
</ins><span class="cx"> FrameView* frameView = m_webPage->corePage()->mainFrame().view();
</span><span class="cx"> if (!frameView)
</span><span class="cx"> return;
</span><span class="cx">
</span><ins>+ IntPoint scrollPositionWithOrigin = frameView->scrollPosition() + toIntSize(frameView->scrollOrigin());
+
</ins><span class="cx"> m_scrolledExposedRect = m_exposedRect;
</span><ins>+ m_scrolledExposedRect.moveBy(scrollPositionWithOrigin);
</ins><span class="cx">
</span><del>-#if !PLATFORM(IOS)
- if (!m_exposedRect.isInfinite()) {
- IntPoint scrollPositionWithOrigin = frameView->scrollPosition() + toIntSize(frameView->scrollOrigin());
- m_scrolledExposedRect.moveBy(scrollPositionWithOrigin);
- }
-#endif
</del><ins>+ mainFrameTiledBacking()->setExposedRect(m_scrolledExposedRect);
</ins><span class="cx">
</span><del>- frameView->setExposedRect(m_scrolledExposedRect);
-
- for (const auto& layer : m_pageOverlayLayers.values()) {
- if (TiledBacking* tiledBacking = layer->tiledBacking())
- tiledBacking->exposedRectDidChange();
</del><ins>+ for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it) {
+ if (TiledBacking* tiledBacking = it->value->tiledBacking())
+ tiledBacking->setExposedRect(m_scrolledExposedRect);
</ins><span class="cx"> }
</span><del>-
- frameView->adjustTiledBackingCoverage();
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updateGeometry(const IntSize& viewSize, const IntSize& layerPosition)
</span><span class="lines">@@ -556,6 +560,22 @@
</span><span class="cx"> m_layerHostingContext->setColorSpace(colorSpace.get());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect()
+{
+ if (TiledBacking* tiledBacking = mainFrameTiledBacking())
+ tiledBacking->setClipsToExposedRect(m_clipsToExposedRect);
+
+ for (PageOverlayLayerMap::iterator it = m_pageOverlayLayers.begin(), end = m_pageOverlayLayers.end(); it != end; ++it)
+ if (TiledBacking* tiledBacking = it->value->tiledBacking())
+ tiledBacking->setClipsToExposedRect(m_clipsToExposedRect);
+
+ FrameView* frameView = m_webPage->corePage()->mainFrame().view();
+ if (!frameView)
+ return;
+
+ frameView->adjustTiledBackingCoverage();
+}
+
</ins><span class="cx"> void TiledCoreAnimationDrawingArea::setRootCompositingLayer(CALayer *layer)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!m_layerTreeStateIsFrozen);
</span><span class="lines">@@ -574,9 +594,13 @@
</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->value->platformLayer()];
</span><span class="cx">
</span><del>- if (TiledBacking* tiledBacking = mainFrameTiledBacking())
</del><ins>+ if (TiledBacking* tiledBacking = mainFrameTiledBacking()) {
</ins><span class="cx"> tiledBacking->setAggressivelyRetainsTiles(m_webPage->corePage()->settings().aggressiveTileRetentionEnabled());
</span><ins>+ tiledBacking->setExposedRect(m_scrolledExposedRect);
+ }
</ins><span class="cx">
</span><ins>+ updateMainFrameClipsToExposedRect();
+
</ins><span class="cx"> updateDebugInfoLayer(m_webPage->corePage()->settings().showTiledScrollingIndicator());
</span><span class="cx">
</span><span class="cx"> [CATransaction commit];
</span><span class="lines">@@ -595,6 +619,11 @@
</span><span class="cx">
</span><span class="cx"> m_pageOverlayPlatformLayers.set(layer.get(), layer->platformLayer());
</span><span class="cx">
</span><ins>+ if (TiledBacking* tiledBacking = layer->tiledBacking()) {
+ tiledBacking->setExposedRect(m_scrolledExposedRect);
+ tiledBacking->setClipsToExposedRect(m_clipsToExposedRect);
+ }
+
</ins><span class="cx"> [CATransaction begin];
</span><span class="cx"> [CATransaction setDisableActions:YES];
</span><span class="cx">
</span><span class="lines">@@ -638,6 +667,11 @@
</span><span class="cx">
</span><span class="cx"> [CATransaction commit];
</span><span class="cx">
</span><ins>+ if (TiledBacking* tiledBacking = layer->tiledBacking()) {
+ tiledBacking->setExposedRect(m_scrolledExposedRect);
+ tiledBacking->setClipsToExposedRect(m_clipsToExposedRect);
+ }
+
</ins><span class="cx"> m_pageOverlayPlatformLayers.set(layer, layer->platformLayer());
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>