<!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>[170274] trunk/Source/WebKit2</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/170274">170274</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2014-06-22 17:51:33 -0700 (Sun, 22 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Thread some references through the remote layer tree code
https://bugs.webkit.org/show_bug.cgi?id=134177

Reviewed by Zalan Bujtas.

A first pass at references for never-null things (first pass because I didn't touch the collections).
Things that aren't straightforward reference-threading:

* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
Remove the unimplemented/nonexistant RemoteLayerBackingStoreCollection::create.
Make RemoteLayerBackingStoreCollection constructor not take a context, because m_context is never used.

* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
Factor out grabbing the PlatformLayerID in a few places.

* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
Use WebPage::mainFrameView() instead of WebPage::corePage()-&gt;mainFrame().view().

* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
* WebProcess/WebPage/DrawingArea.cpp:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:om):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
* Shared/mac/RemoteLayerBackingStore.mm:
References.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerBackingStoremm">trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerBackingStoreCollectionh">trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStoreCollection.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerBackingStoreCollectionmm">trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStoreCollection.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionh">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreacpp">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemotecpp">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustomh">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustommm">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteTiledBackingcpp">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteTiledBackingh">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm</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="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/ChangeLog        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2014-06-22  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Thread some references through the remote layer tree code
+        https://bugs.webkit.org/show_bug.cgi?id=134177
+
+        Reviewed by Zalan Bujtas.
+
+        A first pass at references for never-null things (first pass because I didn't touch the collections).
+        Things that aren't straightforward reference-threading:
+
+        * Shared/mac/RemoteLayerBackingStoreCollection.h:
+        * Shared/mac/RemoteLayerBackingStoreCollection.mm:
+        Remove the unimplemented/nonexistant RemoteLayerBackingStoreCollection::create.
+        Make RemoteLayerBackingStoreCollection constructor not take a context, because m_context is never used.
+
+        * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
+        Factor out grabbing the PlatformLayerID in a few places.
+
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        Use WebPage::mainFrameView() instead of WebPage::corePage()-&gt;mainFrame().view().
+
+        * Shared/mac/RemoteLayerTreeTransaction.h:
+        * Shared/mac/RemoteLayerTreeTransaction.mm:
+        * WebProcess/WebPage/DrawingArea.cpp:
+        * WebProcess/WebPage/DrawingArea.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
+        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+        * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
+        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
+        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:om):
+        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
+        * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
+        * Shared/mac/RemoteLayerBackingStore.mm:
+        References.
+        
</ins><span class="cx"> 2014-06-22  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Replace a couple of uses of bind with lambdas
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerBackingStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx">     if (!m_layer)
</span><span class="cx">         return;
</span><span class="cx">     if (RemoteLayerTreeContext* context = m_layer-&gt;context())
</span><del>-        context-&gt;backingStoreWasCreated(this);
</del><ins>+        context-&gt;backingStoreWasCreated(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RemoteLayerBackingStore::~RemoteLayerBackingStore()
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">     if (!m_layer)
</span><span class="cx">         return;
</span><span class="cx">     if (RemoteLayerTreeContext* context = m_layer-&gt;context())
</span><del>-        context-&gt;backingStoreWillBeDestroyed(this);
</del><ins>+        context-&gt;backingStoreWillBeDestroyed(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerBackingStore::ensureBackingStore(FloatSize size, float scale, bool acceleratesDrawing, bool isOpaque)
</span><span class="lines">@@ -204,7 +204,7 @@
</span><span class="cx">     m_lastDisplayTime = std::chrono::steady_clock::now();
</span><span class="cx"> 
</span><span class="cx">     if (RemoteLayerTreeContext* context = m_layer-&gt;context())
</span><del>-        context-&gt;backingStoreWillBeDisplayed(this);
</del><ins>+        context-&gt;backingStoreWillBeDisplayed(*this);
</ins><span class="cx"> 
</span><span class="cx">     // Make the previous front buffer non-volatile early, so that we can dirty the whole layer if it comes back empty.
</span><span class="cx">     setBufferVolatility(BufferType::Front, false);
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerBackingStoreCollectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStoreCollection.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStoreCollection.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStoreCollection.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -40,14 +40,13 @@
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(RemoteLayerBackingStoreCollection);
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><del>-    static std::unique_ptr&lt;RemoteLayerBackingStoreCollection&gt; create(RemoteLayerTreeContext*);
-    RemoteLayerBackingStoreCollection(RemoteLayerTreeContext*);
</del><ins>+    RemoteLayerBackingStoreCollection();
</ins><span class="cx"> 
</span><del>-    void backingStoreWasCreated(RemoteLayerBackingStore*);
-    void backingStoreWillBeDestroyed(RemoteLayerBackingStore*);
</del><ins>+    void backingStoreWasCreated(RemoteLayerBackingStore&amp;);
+    void backingStoreWillBeDestroyed(RemoteLayerBackingStore&amp;);
</ins><span class="cx"> 
</span><del>-    void backingStoreWillBeDisplayed(RemoteLayerBackingStore*);
-    void backingStoreBecameUnreachable(RemoteLayerBackingStore*);
</del><ins>+    void backingStoreWillBeDisplayed(RemoteLayerBackingStore&amp;);
+    void backingStoreBecameUnreachable(RemoteLayerBackingStore&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void willFlushLayers();
</span><span class="cx">     void willCommitLayerTree(RemoteLayerTreeTransaction&amp;);
</span><span class="lines">@@ -65,7 +64,6 @@
</span><span class="cx">     HashSet&lt;RemoteLayerBackingStore*&gt; m_unparentedBackingStore;
</span><span class="cx">     HashSet&lt;RemoteLayerBackingStore*&gt; m_reachableBackingStoreInLatestFlush;
</span><span class="cx"> 
</span><del>-    RemoteLayerTreeContext* m_context;
</del><span class="cx">     WebCore::Timer&lt;RemoteLayerBackingStoreCollection&gt; m_volatilityTimer;
</span><span class="cx"> 
</span><span class="cx">     bool m_inLayerFlush;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerBackingStoreCollectionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStoreCollection.mm (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStoreCollection.mm        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerBackingStoreCollection.mm        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -36,9 +36,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection(RemoteLayerTreeContext* context)
-    : m_context(context)
-    , m_volatilityTimer(this, &amp;RemoteLayerBackingStoreCollection::volatilityTimerFired)
</del><ins>+RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection()
+    : m_volatilityTimer(this, &amp;RemoteLayerBackingStoreCollection::volatilityTimerFired)
</ins><span class="cx">     , m_inLayerFlush(false)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -72,32 +71,32 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (auto&amp; backingStore : newlyUnreachableBackingStore)
</span><del>-        backingStoreBecameUnreachable(backingStore);
</del><ins>+        backingStoreBecameUnreachable(*backingStore);
</ins><span class="cx"> 
</span><span class="cx">     if (!newlyUnreachableBackingStore.isEmpty())
</span><span class="cx">         scheduleVolatilityTimer();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerBackingStoreCollection::backingStoreWasCreated(RemoteLayerBackingStore* backingStore)
</del><ins>+void RemoteLayerBackingStoreCollection::backingStoreWasCreated(RemoteLayerBackingStore&amp; backingStore)
</ins><span class="cx"> {
</span><del>-    m_liveBackingStore.add(backingStore);
</del><ins>+    m_liveBackingStore.add(&amp;backingStore);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerBackingStoreCollection::backingStoreWillBeDestroyed(RemoteLayerBackingStore* backingStore)
</del><ins>+void RemoteLayerBackingStoreCollection::backingStoreWillBeDestroyed(RemoteLayerBackingStore&amp; backingStore)
</ins><span class="cx"> {
</span><del>-    m_liveBackingStore.remove(backingStore);
-    m_unparentedBackingStore.remove(backingStore);
</del><ins>+    m_liveBackingStore.remove(&amp;backingStore);
+    m_unparentedBackingStore.remove(&amp;backingStore);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed(RemoteLayerBackingStore* backingStore)
</del><ins>+void RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed(RemoteLayerBackingStore&amp; backingStore)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(m_inLayerFlush);
</span><del>-    m_reachableBackingStoreInLatestFlush.add(backingStore);
</del><ins>+    m_reachableBackingStoreInLatestFlush.add(&amp;backingStore);
</ins><span class="cx"> 
</span><del>-    auto backingStoreIter = m_unparentedBackingStore.find(backingStore);
</del><ins>+    auto backingStoreIter = m_unparentedBackingStore.find(&amp;backingStore);
</ins><span class="cx">     if (backingStoreIter == m_unparentedBackingStore.end())
</span><span class="cx">         return;
</span><del>-    m_liveBackingStore.add(backingStore);
</del><ins>+    m_liveBackingStore.add(&amp;backingStore);
</ins><span class="cx">     m_unparentedBackingStore.remove(backingStoreIter);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -132,23 +131,23 @@
</span><span class="cx">     return markBackingStoreVolatileImmediately(backingStore);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable(RemoteLayerBackingStore* backingStore)
</del><ins>+void RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable(RemoteLayerBackingStore&amp; backingStore)
</ins><span class="cx"> {
</span><del>-    ASSERT(backingStore-&gt;layer());
</del><ins>+    ASSERT(backingStore.layer());
</ins><span class="cx"> 
</span><del>-    auto backingStoreIter = m_liveBackingStore.find(backingStore);
</del><ins>+    auto backingStoreIter = m_liveBackingStore.find(&amp;backingStore);
</ins><span class="cx">     if (backingStoreIter == m_liveBackingStore.end())
</span><span class="cx">         return;
</span><del>-    m_unparentedBackingStore.add(backingStore);
</del><ins>+    m_unparentedBackingStore.add(&amp;backingStore);
</ins><span class="cx">     m_liveBackingStore.remove(backingStoreIter);
</span><span class="cx"> 
</span><span class="cx">     // If a layer with backing store is removed from the tree, mark it as having changed backing store, so that
</span><span class="cx">     // on the commit which returns it to the tree, we serialize the backing store (despite possibly not painting).
</span><del>-    backingStore-&gt;layer()-&gt;properties().notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged);
</del><ins>+    backingStore.layer()-&gt;properties().notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged);
</ins><span class="cx"> 
</span><span class="cx">     // This will not succeed in marking all buffers as volatile, because the commit unparenting the layer hasn't
</span><span class="cx">     // made it to the UI process yet. The volatility timer will finish marking the remaining buffers later.
</span><del>-    markBackingStoreVolatileImmediately(*backingStore);
</del><ins>+    markBackingStoreVolatileImmediately(backingStore);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerBackingStoreCollection::volatilityTimerFired(WebCore::Timer&lt;RemoteLayerBackingStoreCollection&gt;&amp;)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx"> 
</span><span class="cx">     WebCore::GraphicsLayer::PlatformLayerID rootLayerID() const { return m_rootLayerID; }
</span><span class="cx">     void setRootLayerID(WebCore::GraphicsLayer::PlatformLayerID);
</span><del>-    void layerPropertiesChanged(PlatformCALayerRemote*);
</del><ins>+    void layerPropertiesChanged(PlatformCALayerRemote&amp;);
</ins><span class="cx">     void setCreatedLayers(Vector&lt;LayerCreationProperties&gt;);
</span><span class="cx">     void setDestroyedLayerIDs(Vector&lt;WebCore::GraphicsLayer::PlatformLayerID&gt;);
</span><span class="cx">     void setLayerIDsWithNewlyUnreachableBackingStore(Vector&lt;WebCore::GraphicsLayer::PlatformLayerID&gt;);
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -559,9 +559,9 @@
</span><span class="cx">     m_rootLayerID = rootLayerID;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeTransaction::layerPropertiesChanged(PlatformCALayerRemote* remoteLayer)
</del><ins>+void RemoteLayerTreeTransaction::layerPropertiesChanged(PlatformCALayerRemote&amp; remoteLayer)
</ins><span class="cx"> {
</span><del>-    m_changedLayers.append(remoteLayer);
</del><ins>+    m_changedLayers.append(&amp;remoteLayer);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeTransaction::setCreatedLayers(Vector&lt;LayerCreationProperties&gt; createdLayers)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-std::unique_ptr&lt;DrawingArea&gt; DrawingArea::create(WebPage* webPage, const WebPageCreationParameters&amp; parameters)
</del><ins>+std::unique_ptr&lt;DrawingArea&gt; DrawingArea::create(WebPage&amp; webPage, const WebPageCreationParameters&amp; parameters)
</ins><span class="cx"> {
</span><span class="cx">     switch (parameters.drawingAreaType) {
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DrawingArea::DrawingArea(DrawingAreaType type, WebPage* webPage)
</del><ins>+DrawingArea::DrawingArea(DrawingAreaType type, WebPage&amp; webPage)
</ins><span class="cx">     : m_type(type)
</span><span class="cx">     , m_webPage(webPage)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(DrawingArea);
</span><span class="cx"> 
</span><span class="cx"> public:
</span><del>-    static std::unique_ptr&lt;DrawingArea&gt; create(WebPage*, const WebPageCreationParameters&amp;);
</del><ins>+    static std::unique_ptr&lt;DrawingArea&gt; create(WebPage&amp;, const WebPageCreationParameters&amp;);
</ins><span class="cx">     virtual ~DrawingArea();
</span><span class="cx">     
</span><span class="cx">     DrawingAreaType type() const { return m_type; }
</span><span class="lines">@@ -118,10 +118,10 @@
</span><span class="cx">     virtual void setLayerHostingMode(LayerHostingMode) { }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    DrawingArea(DrawingAreaType, WebPage*);
</del><ins>+    DrawingArea(DrawingAreaType, WebPage&amp;);
</ins><span class="cx"> 
</span><span class="cx">     DrawingAreaType m_type;
</span><del>-    WebPage* m_webPage;
</del><ins>+    WebPage&amp; m_webPage;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     // Message handlers.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_page = std::make_unique&lt;Page&gt;(pageClients);
</span><span class="cx"> 
</span><del>-    m_drawingArea = DrawingArea::create(this, parameters);
</del><ins>+    m_drawingArea = DrawingArea::create(*this, parameters);
</ins><span class="cx">     m_drawingArea-&gt;setPaintingEnabled(false);
</span><span class="cx">     m_pageOverlayController.initialize();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> class GraphicsLayerCARemote final : public WebCore::GraphicsLayerCA {
</span><span class="cx"> public:
</span><del>-    GraphicsLayerCARemote(WebCore::GraphicsLayerClient&amp; client, RemoteLayerTreeContext* context)
</del><ins>+    GraphicsLayerCARemote(WebCore::GraphicsLayerClient&amp; client, RemoteLayerTreeContext&amp; context)
</ins><span class="cx">         : GraphicsLayerCA(client)
</span><span class="cx">         , m_context(context)
</span><span class="cx">     {
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">     // PlatformCALayerRemote can't currently proxy directly composited image contents, so opt out of this optimization.
</span><span class="cx">     virtual bool shouldDirectlyCompositeImage(WebCore::Image*) const override { return false; }
</span><span class="cx">     
</span><del>-    RemoteLayerTreeContext* m_context;
</del><ins>+    RemoteLayerTreeContext&amp; m_context;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> GRAPHICSLAYER_TYPE_CASTS(GraphicsLayerCARemote, isGraphicsLayerCARemote());
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemotecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;PlatformCALayerRemote&gt; PlatformCALayerRemote::create(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</del><ins>+PassRefPtr&lt;PlatformCALayerRemote&gt; PlatformCALayerRemote::create(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;PlatformCALayerRemote&gt; layer;
</span><span class="cx"> 
</span><span class="lines">@@ -54,53 +54,53 @@
</span><span class="cx">     else
</span><span class="cx">         layer = adoptRef(new PlatformCALayerRemote(layerType, owner, context));
</span><span class="cx"> 
</span><del>-    context-&gt;layerWasCreated(layer.get(), layerType);
</del><ins>+    context.layerWasCreated(*layer, layerType);
</ins><span class="cx"> 
</span><span class="cx">     return layer.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;PlatformCALayerRemote&gt; PlatformCALayerRemote::create(PlatformLayer *platformLayer, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</del><ins>+PassRefPtr&lt;PlatformCALayerRemote&gt; PlatformCALayerRemote::create(PlatformLayer *platformLayer, PlatformCALayerClient* owner, RemoteLayerTreeContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;PlatformCALayerRemote&gt; layer = adoptRef(new PlatformCALayerRemoteCustom(static_cast&lt;PlatformLayer*&gt;(platformLayer), owner, context));
</span><span class="cx"> 
</span><del>-    context-&gt;layerWasCreated(layer.get(), LayerTypeCustom);
</del><ins>+    context.layerWasCreated(*layer, LayerTypeCustom);
</ins><span class="cx"> 
</span><span class="cx">     return layer.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PassRefPtr&lt;PlatformCALayerRemote&gt; PlatformCALayerRemote::create(const PlatformCALayerRemote&amp; other, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</del><ins>+PassRefPtr&lt;PlatformCALayerRemote&gt; PlatformCALayerRemote::create(const PlatformCALayerRemote&amp; other, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext&amp; context)
</ins><span class="cx"> {
</span><span class="cx">     RefPtr&lt;PlatformCALayerRemote&gt; layer = adoptRef(new PlatformCALayerRemote(other, owner, context));
</span><span class="cx"> 
</span><del>-    context-&gt;layerWasCreated(layer.get(), other.layerType());
</del><ins>+    context.layerWasCreated(*layer, other.layerType());
</ins><span class="cx"> 
</span><span class="cx">     return layer.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformCALayerRemote::PlatformCALayerRemote(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</del><ins>+PlatformCALayerRemote::PlatformCALayerRemote(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext&amp; context)
</ins><span class="cx">     : PlatformCALayer(layerType, owner)
</span><span class="cx">     , m_superlayer(nullptr)
</span><span class="cx">     , m_maskLayer(nullptr)
</span><span class="cx">     , m_acceleratesDrawing(false)
</span><del>-    , m_context(context)
</del><ins>+    , m_context(&amp;context)
</ins><span class="cx"> {
</span><span class="cx">     if (owner)
</span><span class="cx">         m_properties.contentsScale = owner-&gt;platformCALayerDeviceScaleFactor();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-PlatformCALayerRemote::PlatformCALayerRemote(const PlatformCALayerRemote&amp; other, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</del><ins>+PlatformCALayerRemote::PlatformCALayerRemote(const PlatformCALayerRemote&amp; other, PlatformCALayerClient* owner, RemoteLayerTreeContext&amp; context)
</ins><span class="cx">     : PlatformCALayer(other.layerType(), owner)
</span><span class="cx">     , m_properties(other.m_properties)
</span><span class="cx">     , m_superlayer(nullptr)
</span><span class="cx">     , m_maskLayer(nullptr)
</span><span class="cx">     , m_acceleratesDrawing(other.acceleratesDrawing())
</span><del>-    , m_context(context)
</del><ins>+    , m_context(&amp;context)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;PlatformCALayer&gt; PlatformCALayerRemote::clone(PlatformCALayerClient* client) const
</span><span class="cx"> {
</span><del>-    RefPtr&lt;PlatformCALayerRemote&gt; clone = PlatformCALayerRemote::create(*this, client, m_context);
</del><ins>+    RefPtr&lt;PlatformCALayerRemote&gt; clone = PlatformCALayerRemote::create(*this, client, *m_context);
</ins><span class="cx"> 
</span><span class="cx">     clone-&gt;m_properties.notePropertiesChanged(static_cast&lt;RemoteLayerTreeTransaction::LayerChange&gt;(m_properties.everChangedProperties &amp; ~RemoteLayerTreeTransaction::BackingStoreChanged));
</span><span class="cx"> 
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx">         toPlatformCALayerRemote(layer.get())-&gt;m_superlayer = nullptr;
</span><span class="cx"> 
</span><span class="cx">     if (m_context)
</span><del>-        m_context-&gt;layerWillBeDestroyed(this);
</del><ins>+        m_context-&gt;layerWillBeDestroyed(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformCALayerRemote::recursiveBuildTransaction(RemoteLayerTreeContext&amp; context, RemoteLayerTreeTransaction&amp; transaction)
</span><span class="lines">@@ -143,7 +143,7 @@
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        transaction.layerPropertiesChanged(this);
</del><ins>+        transaction.layerPropertiesChanged(*this);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i &lt; m_children.size(); ++i) {
</span><span class="lines">@@ -199,7 +199,7 @@
</span><span class="cx">     ASSERT(m_properties.clonedLayerID == layer-&gt;layerID());
</span><span class="cx">     
</span><span class="cx">     if (!m_properties.changedProperties)
</span><del>-        m_context-&gt;layerPropertyChangedWhileBuildingTransaction(this);
</del><ins>+        m_context-&gt;layerPropertyChangedWhileBuildingTransaction(*this);
</ins><span class="cx"> 
</span><span class="cx">     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ClonedContentsChanged);
</span><span class="cx"> }
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx">     m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged);
</span><span class="cx"> 
</span><span class="cx">     if (m_context)
</span><del>-        m_context-&gt;willStartAnimationOnLayer(this);
</del><ins>+        m_context-&gt;willStartAnimationOnLayer(*this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformCALayerRemote::removeAnimationForKey(const String&amp; key)
</span><span class="lines">@@ -644,7 +644,7 @@
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;PlatformCALayer&gt; PlatformCALayerRemote::createCompatibleLayer(PlatformCALayer::LayerType layerType, PlatformCALayerClient* client) const
</span><span class="cx"> {
</span><del>-    return PlatformCALayerRemote::create(layerType, client, m_context);
</del><ins>+    return PlatformCALayerRemote::create(layerType, client, *m_context);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformCALayerRemote::enumerateRectsBeingDrawn(CGContextRef context, void (^block)(CGRect))
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -41,9 +41,9 @@
</span><span class="cx"> 
</span><span class="cx"> class PlatformCALayerRemote : public WebCore::PlatformCALayer {
</span><span class="cx"> public:
</span><del>-    static PassRefPtr&lt;PlatformCALayerRemote&gt; create(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext*);
-    static PassRefPtr&lt;PlatformCALayerRemote&gt; create(PlatformLayer *, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext*);
-    static PassRefPtr&lt;PlatformCALayerRemote&gt; create(const PlatformCALayerRemote&amp;, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext*);
</del><ins>+    static PassRefPtr&lt;PlatformCALayerRemote&gt; create(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext&amp;);
+    static PassRefPtr&lt;PlatformCALayerRemote&gt; create(PlatformLayer *, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext&amp;);
+    static PassRefPtr&lt;PlatformCALayerRemote&gt; create(const PlatformCALayerRemote&amp;, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext&amp;);
</ins><span class="cx"> 
</span><span class="cx">     virtual ~PlatformCALayerRemote();
</span><span class="cx"> 
</span><span class="lines">@@ -168,8 +168,8 @@
</span><span class="cx">     RemoteLayerTreeContext* context() const { return m_context; }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><del>-    PlatformCALayerRemote(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext* context);
-    PlatformCALayerRemote(const PlatformCALayerRemote&amp;, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext*);
</del><ins>+    PlatformCALayerRemote(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext&amp; context);
+    PlatformCALayerRemote(const PlatformCALayerRemote&amp;, WebCore::PlatformCALayerClient*, RemoteLayerTreeContext&amp;);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     virtual bool isPlatformCALayerRemote() const override { return true; }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustomh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -44,7 +44,7 @@
</span><span class="cx">     virtual void setNeedsDisplay(const WebCore::FloatRect* dirtyRect = 0) override;
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    PlatformCALayerRemoteCustom(PlatformLayer*, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext*);
</del><ins>+    PlatformCALayerRemoteCustom(PlatformLayer*, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext&amp;);
</ins><span class="cx"> 
</span><span class="cx">     std::unique_ptr&lt;LayerHostingContext&gt; m_layerHostingContext;
</span><span class="cx">     RetainPtr&lt;PlatformLayer&gt; m_platformLayer;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustommm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -41,10 +41,10 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> static NSString * const platformCALayerPointer = @&quot;WKPlatformCALayer&quot;;
</span><del>-PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom(PlatformLayer* customLayer, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</del><ins>+PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom(PlatformLayer* customLayer, PlatformCALayerClient* owner, RemoteLayerTreeContext&amp; context)
</ins><span class="cx">     : PlatformCALayerRemote(LayerTypeCustom, owner, context)
</span><span class="cx"> {
</span><del>-    switch (context-&gt;layerHostingMode()) {
</del><ins>+    switch (context.layerHostingMode()) {
</ins><span class="cx">     case LayerHostingMode::InProcess:
</span><span class="cx">         m_layerHostingContext = LayerHostingContext::createForPort(WebProcess::shared().compositingRenderServerPort());
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteTiledBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</del><ins>+PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext&amp; context)
</ins><span class="cx">     : PlatformCALayerRemote(layerType, owner, context)
</span><span class="cx"> {
</span><span class="cx">     m_tileController = TileController::create(this);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteTiledBackingh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">     virtual ~PlatformCALayerRemoteTiledBacking();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    PlatformCALayerRemoteTiledBacking(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext*);
</del><ins>+    PlatformCALayerRemoteTiledBacking(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner, RemoteLayerTreeContext&amp;);
</ins><span class="cx"> 
</span><span class="cx">     virtual WebCore::TiledBacking* tiledBacking() override { return m_tileController.get(); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -43,28 +43,28 @@
</span><span class="cx"> // FIXME: This class doesn't do much now. Roll into RemoteLayerTreeDrawingArea?
</span><span class="cx"> class RemoteLayerTreeContext : public WebCore::GraphicsLayerFactory {
</span><span class="cx"> public:
</span><del>-    explicit RemoteLayerTreeContext(WebPage*);
</del><ins>+    explicit RemoteLayerTreeContext(WebPage&amp;);
</ins><span class="cx">     ~RemoteLayerTreeContext();
</span><span class="cx"> 
</span><del>-    void layerWasCreated(PlatformCALayerRemote*, WebCore::PlatformCALayer::LayerType);
-    void layerWillBeDestroyed(PlatformCALayerRemote*);
</del><ins>+    void layerWasCreated(PlatformCALayerRemote&amp;, WebCore::PlatformCALayer::LayerType);
+    void layerWillBeDestroyed(PlatformCALayerRemote&amp;);
</ins><span class="cx"> 
</span><del>-    void backingStoreWasCreated(RemoteLayerBackingStore*);
-    void backingStoreWillBeDestroyed(RemoteLayerBackingStore*);
-    void backingStoreWillBeDisplayed(RemoteLayerBackingStore*);
</del><ins>+    void backingStoreWasCreated(RemoteLayerBackingStore&amp;);
+    void backingStoreWillBeDestroyed(RemoteLayerBackingStore&amp;);
+    void backingStoreWillBeDisplayed(RemoteLayerBackingStore&amp;);
</ins><span class="cx"> 
</span><span class="cx">     WebCore::LayerPool&amp; layerPool() { return m_layerPool; }
</span><span class="cx"> 
</span><del>-    LayerHostingMode layerHostingMode() const { return m_webPage-&gt;layerHostingMode(); }
</del><ins>+    LayerHostingMode layerHostingMode() const { return m_webPage.layerHostingMode(); }
</ins><span class="cx"> 
</span><span class="cx">     void buildTransaction(RemoteLayerTreeTransaction&amp;, WebCore::PlatformCALayer&amp; rootLayer);
</span><span class="cx"> 
</span><del>-    void layerPropertyChangedWhileBuildingTransaction(PlatformCALayerRemote*);
</del><ins>+    void layerPropertyChangedWhileBuildingTransaction(PlatformCALayerRemote&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // From the UI process
</span><span class="cx">     void animationDidStart(WebCore::GraphicsLayer::PlatformLayerID, const String&amp; key, double startTime);
</span><span class="cx"> 
</span><del>-    void willStartAnimationOnLayer(PlatformCALayerRemote*);
</del><ins>+    void willStartAnimationOnLayer(PlatformCALayerRemote&amp;);
</ins><span class="cx"> 
</span><span class="cx">     RemoteLayerBackingStoreCollection&amp; backingStoreCollection() { return m_backingStoreCollection; }
</span><span class="cx"> 
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     // WebCore::GraphicsLayerFactory
</span><span class="cx">     virtual std::unique_ptr&lt;WebCore::GraphicsLayer&gt; createGraphicsLayer(WebCore::GraphicsLayerClient&amp;) override;
</span><span class="cx"> 
</span><del>-    WebPage* m_webPage;
</del><ins>+    WebPage&amp; m_webPage;
</ins><span class="cx"> 
</span><span class="cx">     Vector&lt;RemoteLayerTreeTransaction::LayerCreationProperties&gt; m_createdLayers;
</span><span class="cx">     Vector&lt;WebCore::GraphicsLayer::PlatformLayerID&gt; m_destroyedLayers;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -41,9 +41,8 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-RemoteLayerTreeContext::RemoteLayerTreeContext(WebPage* webPage)
</del><ins>+RemoteLayerTreeContext::RemoteLayerTreeContext(WebPage&amp; webPage)
</ins><span class="cx">     : m_webPage(webPage)
</span><del>-    , m_backingStoreCollection(this)
</del><span class="cx">     , m_currentTransaction(nullptr)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -54,47 +53,51 @@
</span><span class="cx">         layer-&gt;clearContext();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::layerWasCreated(PlatformCALayerRemote* layer, PlatformCALayer::LayerType type)
</del><ins>+void RemoteLayerTreeContext::layerWasCreated(PlatformCALayerRemote&amp; layer, PlatformCALayer::LayerType type)
</ins><span class="cx"> {
</span><ins>+    GraphicsLayer::PlatformLayerID layerID = layer.layerID();
+
</ins><span class="cx">     RemoteLayerTreeTransaction::LayerCreationProperties creationProperties;
</span><del>-    creationProperties.layerID = layer-&gt;layerID();
</del><ins>+    creationProperties.layerID = layerID;
</ins><span class="cx">     creationProperties.type = type;
</span><span class="cx"> 
</span><span class="cx">     if (type == PlatformCALayer::LayerTypeCustom)
</span><del>-        creationProperties.hostingContextID = layer-&gt;hostingContextID();
</del><ins>+        creationProperties.hostingContextID = layer.hostingContextID();
</ins><span class="cx"> 
</span><span class="cx">     m_createdLayers.append(creationProperties);
</span><del>-    m_liveLayers.add(layer-&gt;layerID(), layer);
</del><ins>+    m_liveLayers.add(layerID, &amp;layer);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::layerWillBeDestroyed(PlatformCALayerRemote* layer)
</del><ins>+void RemoteLayerTreeContext::layerWillBeDestroyed(PlatformCALayerRemote&amp; layer)
</ins><span class="cx"> {
</span><del>-    m_liveLayers.remove(layer-&gt;layerID());
</del><ins>+    GraphicsLayer::PlatformLayerID layerID = layer.layerID();
</ins><span class="cx"> 
</span><del>-    ASSERT(!m_destroyedLayers.contains(layer-&gt;layerID()));
-    m_destroyedLayers.append(layer-&gt;layerID());
</del><ins>+    m_liveLayers.remove(layerID);
+
+    ASSERT(!m_destroyedLayers.contains(layerID));
+    m_destroyedLayers.append(layerID);
</ins><span class="cx">     
</span><del>-    m_layersAwaitingAnimationStart.remove(layer-&gt;layerID());
</del><ins>+    m_layersAwaitingAnimationStart.remove(layerID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::backingStoreWasCreated(RemoteLayerBackingStore* backingStore)
</del><ins>+void RemoteLayerTreeContext::backingStoreWasCreated(RemoteLayerBackingStore&amp; backingStore)
</ins><span class="cx"> {
</span><span class="cx">     m_backingStoreCollection.backingStoreWasCreated(backingStore);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::backingStoreWillBeDestroyed(RemoteLayerBackingStore* backingStore)
</del><ins>+void RemoteLayerTreeContext::backingStoreWillBeDestroyed(RemoteLayerBackingStore&amp; backingStore)
</ins><span class="cx"> {
</span><span class="cx">     m_backingStoreCollection.backingStoreWillBeDestroyed(backingStore);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::backingStoreWillBeDisplayed(RemoteLayerBackingStore* backingStore)
</del><ins>+void RemoteLayerTreeContext::backingStoreWillBeDisplayed(RemoteLayerBackingStore&amp; backingStore)
</ins><span class="cx"> {
</span><span class="cx">     m_backingStoreCollection.backingStoreWillBeDisplayed(backingStore);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> std::unique_ptr&lt;GraphicsLayer&gt; RemoteLayerTreeContext::createGraphicsLayer(GraphicsLayerClient&amp; client)
</span><span class="cx"> {
</span><del>-    return std::make_unique&lt;GraphicsLayerCARemote&gt;(client, this);
</del><ins>+    return std::make_unique&lt;GraphicsLayerCARemote&gt;(client, *this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeContext::buildTransaction(RemoteLayerTreeTransaction&amp; transaction, PlatformCALayer&amp; rootLayer)
</span><span class="lines">@@ -110,15 +113,15 @@
</span><span class="cx">     transaction.setDestroyedLayerIDs(std::move(m_destroyedLayers));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::layerPropertyChangedWhileBuildingTransaction(PlatformCALayerRemote* layer)
</del><ins>+void RemoteLayerTreeContext::layerPropertyChangedWhileBuildingTransaction(PlatformCALayerRemote&amp; layer)
</ins><span class="cx"> {
</span><span class="cx">     if (m_currentTransaction)
</span><span class="cx">         m_currentTransaction-&gt;layerPropertiesChanged(layer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreeContext::willStartAnimationOnLayer(PlatformCALayerRemote* layer)
</del><ins>+void RemoteLayerTreeContext::willStartAnimationOnLayer(PlatformCALayerRemote&amp; layer)
</ins><span class="cx"> {
</span><del>-    m_layersAwaitingAnimationStart.add(layer-&gt;layerID(), layer);
</del><ins>+    m_layersAwaitingAnimationStart.add(layer.layerID(), &amp;layer);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeContext::animationDidStart(WebCore::GraphicsLayer::PlatformLayerID layerID, const String&amp; key, double startTime)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> class RemoteLayerTreeDrawingArea : public DrawingArea, public WebCore::GraphicsLayerClient {
</span><span class="cx">     friend class RemoteLayerTreeDisplayRefreshMonitor;
</span><span class="cx"> public:
</span><del>-    RemoteLayerTreeDrawingArea(WebPage*, const WebPageCreationParameters&amp;);
</del><ins>+    RemoteLayerTreeDrawingArea(WebPage&amp;, const WebPageCreationParameters&amp;);
</ins><span class="cx">     virtual ~RemoteLayerTreeDrawingArea();
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea(WebPage* webPage, const WebPageCreationParameters&amp;)
</del><ins>+RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea(WebPage&amp; webPage, const WebPageCreationParameters&amp;)
</ins><span class="cx">     : DrawingArea(DrawingAreaTypeRemoteLayerTree, webPage)
</span><span class="cx">     , m_remoteLayerTreeContext(std::make_unique&lt;RemoteLayerTreeContext&gt;(webPage))
</span><span class="cx">     , m_rootLayer(GraphicsLayer::create(graphicsLayerFactory(), *this))
</span><span class="lines">@@ -64,9 +64,9 @@
</span><span class="cx">     , m_displayRefreshMonitorsToNotify(nullptr)
</span><span class="cx">     , m_currentTransactionID(0)
</span><span class="cx"> {
</span><del>-    webPage-&gt;corePage()-&gt;settings().setForceCompositingMode(true);
</del><ins>+    webPage.corePage()-&gt;settings().setForceCompositingMode(true);
</ins><span class="cx"> #if PLATFORM(IOS)
</span><del>-    webPage-&gt;corePage()-&gt;settings().setDelegatesPageScaling(true);
</del><ins>+    webPage.corePage()-&gt;settings().setDelegatesPageScaling(true);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     m_commitQueue = dispatch_queue_create(&quot;com.apple.WebKit.WebContent.RemoteLayerTreeDrawingArea.CommitQueue&quot;, nullptr);
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx">     Vector&lt;GraphicsLayer *&gt; children;
</span><span class="cx">     if (rootLayer) {
</span><span class="cx">         children.append(rootLayer);
</span><del>-        children.append(m_webPage-&gt;pageOverlayController().viewOverlayRootLayer());
</del><ins>+        children.append(m_webPage.pageOverlayController().viewOverlayRootLayer());
</ins><span class="cx">     }
</span><span class="cx">     m_rootLayer-&gt;setChildren(children);
</span><span class="cx"> }
</span><span class="lines">@@ -123,11 +123,11 @@
</span><span class="cx"> void RemoteLayerTreeDrawingArea::updateGeometry(const IntSize&amp; viewSize, const IntSize&amp; layerPosition)
</span><span class="cx"> {
</span><span class="cx">     m_viewSize = viewSize;
</span><del>-    m_webPage-&gt;setSize(viewSize);
</del><ins>+    m_webPage.setSize(viewSize);
</ins><span class="cx"> 
</span><span class="cx">     scheduleCompositingLayerFlush();
</span><span class="cx"> 
</span><del>-    m_webPage-&gt;send(Messages::DrawingAreaProxy::DidUpdateGeometry());
</del><ins>+    m_webPage.send(Messages::DrawingAreaProxy::DidUpdateGeometry());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RemoteLayerTreeDrawingArea::shouldUseTiledBackingForFrameView(const FrameView* frameView)
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeDrawingArea::updatePreferences(const WebPreferencesStore&amp;)
</span><span class="cx"> {
</span><del>-    Settings&amp; settings = m_webPage-&gt;corePage()-&gt;settings();
</del><ins>+    Settings&amp; settings = m_webPage.corePage()-&gt;settings();
</ins><span class="cx"> 
</span><span class="cx">     // Fixed position elements need to be composited and create stacking contexts
</span><span class="cx">     // in order to be scrolled by the ScrollingCoordinator.
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> void RemoteLayerTreeDrawingArea::setDeviceScaleFactor(float deviceScaleFactor)
</span><span class="cx"> {
</span><del>-    m_webPage-&gt;setDeviceScaleFactor(deviceScaleFactor);
</del><ins>+    m_webPage.setDeviceScaleFactor(deviceScaleFactor);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     if (m_isFlushingSuspended)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    for (Frame* frame = &amp;m_webPage-&gt;corePage()-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
</del><ins>+    for (Frame* frame = &amp;m_webPage.corePage()-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
</ins><span class="cx">         FrameView* frameView = frame-&gt;view();
</span><span class="cx">         if (!frameView || !frameView-&gt;tiledBacking())
</span><span class="cx">             continue;
</span><span class="lines">@@ -197,7 +197,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> void RemoteLayerTreeDrawingArea::setExposedContentRect(const FloatRect&amp; exposedContentRect)
</span><span class="cx"> {
</span><del>-    FrameView* frameView = m_webPage-&gt;corePage()-&gt;mainFrame().view();
</del><ins>+    FrameView* frameView = m_webPage.mainFrameView();
</ins><span class="cx">     if (!frameView)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -208,7 +208,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeDrawingArea::updateScrolledExposedRect()
</span><span class="cx"> {
</span><del>-    FrameView* frameView = m_webPage-&gt;corePage()-&gt;mainFrame().view();
</del><ins>+    FrameView* frameView = m_webPage.mainFrameView();
</ins><span class="cx">     if (!frameView)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -224,13 +224,13 @@
</span><span class="cx">     frameView-&gt;setExposedRect(m_scrolledExposedRect);
</span><span class="cx">     frameView-&gt;adjustTiledBackingCoverage();
</span><span class="cx"> 
</span><del>-    m_webPage-&gt;pageOverlayController().didChangeExposedRect();
</del><ins>+    m_webPage.pageOverlayController().didChangeExposedRect();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TiledBacking* RemoteLayerTreeDrawingArea::mainFrameTiledBacking() const
</span><span class="cx"> {
</span><del>-    FrameView* frameView = m_webPage-&gt;corePage()-&gt;mainFrame().view();
-    return frameView ? frameView-&gt;tiledBacking() : 0;
</del><ins>+    FrameView* frameView = m_webPage.mainFrameView();
+    return frameView ? frameView-&gt;tiledBacking() : nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush()
</span><span class="lines">@@ -266,12 +266,12 @@
</span><span class="cx">     RemoteLayerBackingStoreCollection&amp; backingStoreCollection = m_remoteLayerTreeContext-&gt;backingStoreCollection();
</span><span class="cx">     backingStoreCollection.willFlushLayers();
</span><span class="cx"> 
</span><del>-    m_webPage-&gt;layoutIfNeeded();
</del><ins>+    m_webPage.layoutIfNeeded();
</ins><span class="cx"> 
</span><span class="cx">     FloatRect visibleRect(FloatPoint(), m_viewSize);
</span><span class="cx">     visibleRect.intersect(m_scrolledExposedRect);
</span><del>-    m_webPage-&gt;pageOverlayController().flushPageOverlayLayers(visibleRect);
-    m_webPage-&gt;corePage()-&gt;mainFrame().view()-&gt;flushCompositingStateIncludingSubframes();
</del><ins>+    m_webPage.pageOverlayController().flushPageOverlayLayers(visibleRect);
+    m_webPage.mainFrameView()-&gt;flushCompositingStateIncludingSubframes();
</ins><span class="cx">     m_rootLayer-&gt;flushCompositingStateForThisLayerOnly();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Minimize these transactions if nothing changed.
</span><span class="lines">@@ -279,20 +279,20 @@
</span><span class="cx">     layerTransaction.setTransactionID(takeNextTransactionID());
</span><span class="cx">     m_remoteLayerTreeContext-&gt;buildTransaction(layerTransaction, *toGraphicsLayerCARemote(m_rootLayer.get())-&gt;platformCALayer());
</span><span class="cx">     backingStoreCollection.willCommitLayerTree(layerTransaction);
</span><del>-    m_webPage-&gt;willCommitLayerTree(layerTransaction);
</del><ins>+    m_webPage.willCommitLayerTree(layerTransaction);
</ins><span class="cx"> 
</span><span class="cx">     RemoteScrollingCoordinatorTransaction scrollingTransaction;
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><del>-    if (m_webPage-&gt;scrollingCoordinator())
-        toRemoteScrollingCoordinator(m_webPage-&gt;scrollingCoordinator())-&gt;buildTransaction(scrollingTransaction);
</del><ins>+    if (m_webPage.scrollingCoordinator())
+        toRemoteScrollingCoordinator(m_webPage.scrollingCoordinator())-&gt;buildTransaction(scrollingTransaction);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     m_waitingForBackingStoreSwap = true;
</span><span class="cx"> 
</span><del>-    m_webPage-&gt;send(Messages::RemoteLayerTreeDrawingAreaProxy::WillCommitLayerTree(layerTransaction.transactionID()));
</del><ins>+    m_webPage.send(Messages::RemoteLayerTreeDrawingAreaProxy::WillCommitLayerTree(layerTransaction.transactionID()));
</ins><span class="cx"> 
</span><span class="cx">     Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree message(layerTransaction, scrollingTransaction);
</span><del>-    auto commitEncoder = std::make_unique&lt;IPC::MessageEncoder&gt;(Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree::receiverName(), Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree::name(), m_webPage-&gt;pageID());
</del><ins>+    auto commitEncoder = std::make_unique&lt;IPC::MessageEncoder&gt;(Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree::receiverName(), Messages::RemoteLayerTreeDrawingAreaProxy::CommitLayerTree::name(), m_webPage.pageID());
</ins><span class="cx">     commitEncoder-&gt;encode(message.arguments());
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Move all backing store flushing management to RemoteLayerBackingStoreCollection.
</span><span class="lines">@@ -350,7 +350,7 @@
</span><span class="cx"> void RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged(const IntSize&amp; contentsSize)
</span><span class="cx"> {
</span><span class="cx">     m_rootLayer-&gt;setSize(contentsSize);
</span><del>-    m_webPage-&gt;pageOverlayController().didChangeDocumentSize();
</del><ins>+    m_webPage.pageOverlayController().didChangeDocumentSize();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PassRefPtr&lt;RemoteLayerTreeDrawingArea::BackingStoreFlusher&gt; RemoteLayerTreeDrawingArea::BackingStoreFlusher::create(IPC::Connection* connection, std::unique_ptr&lt;IPC::MessageEncoder&gt; encoder, Vector&lt;RetainPtr&lt;CGContextRef&gt;&gt; contextsToFlush)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -51,7 +51,7 @@
</span><span class="cx"> 
</span><span class="cx"> class TiledCoreAnimationDrawingArea : public DrawingArea, WebCore::LayerFlushSchedulerClient {
</span><span class="cx"> public:
</span><del>-    TiledCoreAnimationDrawingArea(WebPage*, const WebPageCreationParameters&amp;);
</del><ins>+    TiledCoreAnimationDrawingArea(WebPage&amp;, const WebPageCreationParameters&amp;);
</ins><span class="cx">     virtual ~TiledCoreAnimationDrawingArea();
</span><span class="cx"> 
</span><span class="cx">     virtual void viewStateDidChange(WebCore::ViewState::Flags changed) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (170273 => 170274)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-06-23 00:34:25 UTC (rev 170273)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-06-23 00:51:33 UTC (rev 170274)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><del>-TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea(WebPage* webPage, const WebPageCreationParameters&amp; parameters)
</del><ins>+TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea(WebPage&amp; webPage, const WebPageCreationParameters&amp; parameters)
</ins><span class="cx">     : DrawingArea(DrawingAreaTypeTiledCoreAnimation, webPage)
</span><span class="cx">     , m_layerTreeStateIsFrozen(false)
</span><span class="cx">     , m_layerFlushScheduler(this)
</span><span class="lines">@@ -76,10 +76,10 @@
</span><span class="cx">     , m_scrolledExposedRect(FloatRect::infiniteRect())
</span><span class="cx">     , m_transientZoomScale(1)
</span><span class="cx"> {
</span><del>-    m_webPage-&gt;corePage()-&gt;settings().setForceCompositingMode(true);
</del><ins>+    m_webPage.corePage()-&gt;settings().setForceCompositingMode(true);
</ins><span class="cx"> 
</span><span class="cx">     m_hostingLayer = [CALayer layer];
</span><del>-    [m_hostingLayer setFrame:m_webPage-&gt;bounds()];
</del><ins>+    [m_hostingLayer setFrame:m_webPage.bounds()];
</ins><span class="cx">     [m_hostingLayer setOpaque:YES];
</span><span class="cx">     [m_hostingLayer setGeometryFlipped:YES];
</span><span class="cx"> 
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> 
</span><span class="cx">     LayerTreeContext layerTreeContext;
</span><span class="cx">     layerTreeContext.contextID = m_layerHostingContext-&gt;contextID();
</span><del>-    m_webPage-&gt;send(Messages::DrawingAreaProxy::EnterAcceleratedCompositingMode(0, layerTreeContext));
</del><ins>+    m_webPage.send(Messages::DrawingAreaProxy::EnterAcceleratedCompositingMode(0, layerTreeContext));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea()
</span><span class="lines">@@ -126,7 +126,7 @@
</span><span class="cx">     if (m_layerTreeStateIsFrozen)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    for (Frame* frame = &amp;m_webPage-&gt;corePage()-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
</del><ins>+    for (Frame* frame = &amp;m_webPage.corePage()-&gt;mainFrame(); frame; frame = frame-&gt;tree().traverseNext()) {
</ins><span class="cx">         FrameView* frameView = frame-&gt;view();
</span><span class="cx">         if (!frameView || !frameView-&gt;tiledBacking())
</span><span class="cx">             continue;
</span><span class="lines">@@ -145,8 +145,8 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     dispatchAfterEnsuringUpdatedScrollPosition([this, callbackID] {
</span><del>-        m_webPage-&gt;drawingArea()-&gt;forceRepaint();
-        m_webPage-&gt;send(Messages::WebPageProxy::VoidCallback(callbackID));
</del><ins>+        m_webPage.drawingArea()-&gt;forceRepaint();
+        m_webPage.send(Messages::WebPageProxy::VoidCallback(callbackID));
</ins><span class="cx">     });
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="lines">@@ -175,11 +175,11 @@
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updatePreferences(const WebPreferencesStore&amp;)
</span><span class="cx"> {
</span><del>-    Settings&amp; settings = m_webPage-&gt;corePage()-&gt;settings();
</del><ins>+    Settings&amp; settings = m_webPage.corePage()-&gt;settings();
</ins><span class="cx"> 
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><del>-    if (AsyncScrollingCoordinator* scrollingCoordinator = toAsyncScrollingCoordinator(m_webPage-&gt;corePage()-&gt;scrollingCoordinator())) {
-        bool scrollingPerformanceLoggingEnabled = m_webPage-&gt;scrollingPerformanceLoggingEnabled();
</del><ins>+    if (AsyncScrollingCoordinator* scrollingCoordinator = toAsyncScrollingCoordinator(m_webPage.corePage()-&gt;scrollingCoordinator())) {
+        bool scrollingPerformanceLoggingEnabled = m_webPage.scrollingPerformanceLoggingEnabled();
</ins><span class="cx">         ScrollingThread::dispatch(bind(&amp;ScrollingTree::setScrollingPerformanceLoggingEnabled, scrollingCoordinator-&gt;scrollingTree(), scrollingPerformanceLoggingEnabled));
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -200,15 +200,15 @@
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged(const IntSize&amp; size)
</span><span class="cx"> {
</span><del>-    m_webPage-&gt;pageOverlayController().didChangeDocumentSize();
</del><ins>+    m_webPage.pageOverlayController().didChangeDocumentSize();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded()
</span><span class="cx"> {
</span><del>-    if (!m_webPage-&gt;minimumLayoutSize().width())
</del><ins>+    if (!m_webPage.minimumLayoutSize().width())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    FrameView* frameView = m_webPage-&gt;mainFrameView();
</del><ins>+    FrameView* frameView = m_webPage.mainFrameView();
</ins><span class="cx">     if (!frameView)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -220,19 +220,19 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     m_lastSentIntrinsicContentSize = contentSize;
</span><del>-    m_webPage-&gt;send(Messages::DrawingAreaProxy::IntrinsicContentSizeDidChange(contentSize));
</del><ins>+    m_webPage.send(Messages::DrawingAreaProxy::IntrinsicContentSizeDidChange(contentSize));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition(std::function&lt;void ()&gt; function)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><del>-    if (!m_webPage-&gt;corePage()-&gt;scrollingCoordinator()) {
</del><ins>+    if (!m_webPage.corePage()-&gt;scrollingCoordinator()) {
</ins><span class="cx">         function();
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_webPage-&gt;ref();
-    m_webPage-&gt;corePage()-&gt;scrollingCoordinator()-&gt;commitTreeStateIfNeeded();
</del><ins>+    m_webPage.ref();
+    m_webPage.corePage()-&gt;scrollingCoordinator()-&gt;commitTreeStateIfNeeded();
</ins><span class="cx"> 
</span><span class="cx">     if (!m_layerTreeStateIsFrozen)
</span><span class="cx">         m_layerFlushScheduler.suspend();
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx">     // It is possible for the drawing area to be destroyed before the bound block
</span><span class="cx">     // is invoked, so grab a reference to the web page here so we can access the drawing area through it.
</span><span class="cx">     // (The web page is already kept alive by dispatchAfterEnsuringUpdatedScrollPosition).
</span><del>-    WebPage* webPage = m_webPage;
</del><ins>+    WebPage* webPage = &amp;m_webPage;
</ins><span class="cx"> 
</span><span class="cx">     ScrollingThread::dispatchBarrier([this, webPage, function] {
</span><span class="cx">         DrawingArea* drawingArea = webPage-&gt;drawingArea();
</span><span class="lines">@@ -266,7 +266,7 @@
</span><span class="cx">     // This gets called outside of the normal event loop so wrap in an autorelease pool
</span><span class="cx">     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
</span><span class="cx"> 
</span><del>-    m_webPage-&gt;layoutIfNeeded();
</del><ins>+    m_webPage.layoutIfNeeded();
</ins><span class="cx"> 
</span><span class="cx">     updateIntrinsicContentSizeIfNeeded();
</span><span class="cx"> 
</span><span class="lines">@@ -277,11 +277,11 @@
</span><span class="cx"> 
</span><span class="cx">     FloatRect visibleRect = [m_hostingLayer frame];
</span><span class="cx">     visibleRect.intersect(m_scrolledExposedRect);
</span><del>-    m_webPage-&gt;pageOverlayController().flushPageOverlayLayers(visibleRect);
</del><ins>+    m_webPage.pageOverlayController().flushPageOverlayLayers(visibleRect);
</ins><span class="cx"> 
</span><del>-    bool returnValue = m_webPage-&gt;corePage()-&gt;mainFrame().view()-&gt;flushCompositingStateIncludingSubframes();
</del><ins>+    bool returnValue = m_webPage.mainFrameView()-&gt;flushCompositingStateIncludingSubframes();
</ins><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><del>-    if (ScrollingCoordinator* scrollingCoordinator = m_webPage-&gt;corePage()-&gt;scrollingCoordinator())
</del><ins>+    if (ScrollingCoordinator* scrollingCoordinator = m_webPage.corePage()-&gt;scrollingCoordinator())
</ins><span class="cx">         scrollingCoordinator-&gt;commitTreeStateIfNeeded();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx"> void TiledCoreAnimationDrawingArea::viewStateDidChange(ViewState::Flags changed)
</span><span class="cx"> {
</span><span class="cx">     if (changed &amp; ViewState::IsVisible) {
</span><del>-        if (m_webPage-&gt;isVisible())
</del><ins>+        if (m_webPage.isVisible())
</ins><span class="cx">             resumePainting();
</span><span class="cx">         else
</span><span class="cx">             suspendPainting();
</span><span class="lines">@@ -334,7 +334,7 @@
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updateScrolledExposedRect()
</span><span class="cx"> {
</span><del>-    FrameView* frameView = m_webPage-&gt;corePage()-&gt;mainFrame().view();
</del><ins>+    FrameView* frameView = m_webPage.mainFrameView();
</ins><span class="cx">     if (!frameView)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -350,7 +350,7 @@
</span><span class="cx">     frameView-&gt;setExposedRect(m_scrolledExposedRect);
</span><span class="cx">     frameView-&gt;adjustTiledBackingCoverage();
</span><span class="cx"> 
</span><del>-    m_webPage-&gt;pageOverlayController().didChangeExposedRect();
</del><ins>+    m_webPage.pageOverlayController().didChangeExposedRect();
</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">@@ -360,17 +360,17 @@
</span><span class="cx">     IntSize size = viewSize;
</span><span class="cx">     IntSize contentSize = IntSize(-1, -1);
</span><span class="cx"> 
</span><del>-    if (!m_webPage-&gt;minimumLayoutSize().width() || m_webPage-&gt;autoSizingShouldExpandToViewHeight())
-        m_webPage-&gt;setSize(size);
</del><ins>+    if (!m_webPage.minimumLayoutSize().width() || m_webPage.autoSizingShouldExpandToViewHeight())
+        m_webPage.setSize(size);
</ins><span class="cx"> 
</span><del>-    FrameView* frameView = m_webPage-&gt;mainFrameView();
</del><ins>+    FrameView* frameView = m_webPage.mainFrameView();
</ins><span class="cx"> 
</span><del>-    if (m_webPage-&gt;autoSizingShouldExpandToViewHeight() &amp;&amp; frameView)
</del><ins>+    if (m_webPage.autoSizingShouldExpandToViewHeight() &amp;&amp; frameView)
</ins><span class="cx">         frameView-&gt;setAutoSizeFixedMinimumHeight(viewSize.height());
</span><span class="cx"> 
</span><del>-    m_webPage-&gt;layoutIfNeeded();
</del><ins>+    m_webPage.layoutIfNeeded();
</ins><span class="cx"> 
</span><del>-    if (m_webPage-&gt;minimumLayoutSize().width() &amp;&amp; frameView) {
</del><ins>+    if (m_webPage.minimumLayoutSize().width() &amp;&amp; frameView) {
</ins><span class="cx">         contentSize = frameView-&gt;autoSizingIntrinsicContentSize();
</span><span class="cx">         size = contentSize;
</span><span class="cx">     }
</span><span class="lines">@@ -388,14 +388,14 @@
</span><span class="cx">     [CATransaction flush];
</span><span class="cx">     [CATransaction synchronize];
</span><span class="cx"> 
</span><del>-    m_webPage-&gt;send(Messages::DrawingAreaProxy::DidUpdateGeometry());
</del><ins>+    m_webPage.send(Messages::DrawingAreaProxy::DidUpdateGeometry());
</ins><span class="cx"> 
</span><span class="cx">     m_inUpdateGeometry = false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::setDeviceScaleFactor(float deviceScaleFactor)
</span><span class="cx"> {
</span><del>-    m_webPage-&gt;setDeviceScaleFactor(deviceScaleFactor);
</del><ins>+    m_webPage.setDeviceScaleFactor(deviceScaleFactor);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::setLayerHostingMode(LayerHostingMode)
</span><span class="lines">@@ -405,7 +405,7 @@
</span><span class="cx">     // Finally, inform the UIProcess that the context has changed.
</span><span class="cx">     LayerTreeContext layerTreeContext;
</span><span class="cx">     layerTreeContext.contextID = m_layerHostingContext-&gt;contextID();
</span><del>-    m_webPage-&gt;send(Messages::DrawingAreaProxy::UpdateAcceleratedCompositingMode(0, layerTreeContext));
</del><ins>+    m_webPage.send(Messages::DrawingAreaProxy::UpdateAcceleratedCompositingMode(0, layerTreeContext));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::setColorSpace(const ColorSpaceData&amp; colorSpace)
</span><span class="lines">@@ -425,7 +425,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Create a new context and set it up.
</span><del>-    switch (m_webPage-&gt;layerHostingMode()) {
</del><ins>+    switch (m_webPage.layerHostingMode()) {
</ins><span class="cx">     case LayerHostingMode::InProcess:
</span><span class="cx">         m_layerHostingContext = LayerHostingContext::createForPort(WebProcess::shared().compositingRenderServerPort());
</span><span class="cx">         break;
</span><span class="lines">@@ -450,7 +450,7 @@
</span><span class="cx">     [CATransaction begin];
</span><span class="cx">     [CATransaction setDisableActions:YES];
</span><span class="cx"> 
</span><del>-    [m_hostingLayer setSublayers:layer ? @[ layer, m_webPage-&gt;pageOverlayController().viewOverlayRootLayer()-&gt;platformLayer() ] : @[ ]];
</del><ins>+    [m_hostingLayer setSublayers:layer ? @[ layer, m_webPage.pageOverlayController().viewOverlayRootLayer()-&gt;platformLayer() ] : @[ ]];
</ins><span class="cx"> 
</span><span class="cx">     bool hadRootLayer = !!m_rootLayer;
</span><span class="cx">     m_rootLayer = layer;
</span><span class="lines">@@ -459,15 +459,15 @@
</span><span class="cx">     if (hadRootLayer != !!layer)
</span><span class="cx">         m_layerHostingContext-&gt;setRootLayer(layer ? m_hostingLayer.get() : 0);
</span><span class="cx"> 
</span><del>-    updateDebugInfoLayer(m_webPage-&gt;corePage()-&gt;settings().showTiledScrollingIndicator());
</del><ins>+    updateDebugInfoLayer(m_webPage.corePage()-&gt;settings().showTiledScrollingIndicator());
</ins><span class="cx"> 
</span><span class="cx">     [CATransaction commit];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TiledBacking* TiledCoreAnimationDrawingArea::mainFrameTiledBacking() const
</span><span class="cx"> {
</span><del>-    FrameView* frameView = m_webPage-&gt;corePage()-&gt;mainFrame().view();
-    return frameView ? frameView-&gt;tiledBacking() : 0;
</del><ins>+    FrameView* frameView = m_webPage.mainFrameView();
+    return frameView ? frameView-&gt;tiledBacking() : nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::updateDebugInfoLayer(bool showLayer)
</span><span class="lines">@@ -497,7 +497,7 @@
</span><span class="cx"> 
</span><span class="cx"> PlatformCALayer* TiledCoreAnimationDrawingArea::layerForTransientZoom() const
</span><span class="cx"> {
</span><del>-    RenderLayerBacking* renderViewBacking = m_webPage-&gt;mainFrameView()-&gt;renderView()-&gt;layer()-&gt;backing();
</del><ins>+    RenderLayerBacking* renderViewBacking = m_webPage.mainFrameView()-&gt;renderView()-&gt;layer()-&gt;backing();
</ins><span class="cx"> 
</span><span class="cx">     if (GraphicsLayer* contentsContainmentLayer = renderViewBacking-&gt;contentsContainmentLayer())
</span><span class="cx">         return toGraphicsLayerCA(contentsContainmentLayer)-&gt;platformCALayer();
</span><span class="lines">@@ -507,7 +507,7 @@
</span><span class="cx"> 
</span><span class="cx"> PlatformCALayer* TiledCoreAnimationDrawingArea::shadowLayerForTransientZoom() const
</span><span class="cx"> {
</span><del>-    RenderLayerCompositor&amp; renderLayerCompositor = m_webPage-&gt;mainFrameView()-&gt;renderView()-&gt;compositor();
</del><ins>+    RenderLayerCompositor&amp; renderLayerCompositor = m_webPage.mainFrameView()-&gt;renderView()-&gt;compositor();
</ins><span class="cx"> 
</span><span class="cx">     if (GraphicsLayer* shadowGraphicsLayer = renderLayerCompositor.layerForContentShadow())
</span><span class="cx">         return toGraphicsLayerCA(shadowGraphicsLayer)-&gt;platformCALayer();
</span><span class="lines">@@ -532,7 +532,7 @@
</span><span class="cx">     zoomLayer-&gt;setPosition(FloatPoint3D());
</span><span class="cx"> 
</span><span class="cx">     if (PlatformCALayer* shadowLayer = shadowLayerForTransientZoom()) {
</span><del>-        RenderView* renderView = m_webPage-&gt;mainFrameView()-&gt;renderView();
</del><ins>+        RenderView* renderView = m_webPage.mainFrameView()-&gt;renderView();
</ins><span class="cx">         FloatRect shadowBounds = FloatRect(FloatPoint(), toFloatSize(renderView-&gt;layoutOverflowRect().maxXMaxYCorner()));
</span><span class="cx">         shadowBounds.scale(scale);
</span><span class="cx"> 
</span><span class="lines">@@ -548,11 +548,11 @@
</span><span class="cx"> {
</span><span class="cx">     applyTransientZoomToLayers(scale, origin);
</span><span class="cx"> 
</span><del>-    double currentPageScale = m_webPage-&gt;pageScaleFactor();
</del><ins>+    double currentPageScale = m_webPage.pageScaleFactor();
</ins><span class="cx">     if (scale &gt; currentPageScale)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    FrameView* frameView = m_webPage-&gt;mainFrameView();
</del><ins>+    FrameView* frameView = m_webPage.mainFrameView();
</ins><span class="cx">     FloatRect tileCoverageRect = frameView-&gt;visibleContentRectIncludingScrollbars();
</span><span class="cx">     tileCoverageRect.moveBy(-origin);
</span><span class="cx">     tileCoverageRect.scale(currentPageScale / scale);
</span><span class="lines">@@ -574,7 +574,7 @@
</span><span class="cx"> 
</span><span class="cx"> void TiledCoreAnimationDrawingArea::commitTransientZoom(double scale, FloatPoint origin)
</span><span class="cx"> {
</span><del>-    FrameView* frameView = m_webPage-&gt;mainFrameView();
</del><ins>+    FrameView* frameView = m_webPage.mainFrameView();
</ins><span class="cx">     FloatRect visibleContentRect = frameView-&gt;visibleContentRectIncludingScrollbars();
</span><span class="cx"> 
</span><span class="cx">     FloatPoint constrainedOrigin = visibleContentRect.location();
</span><span class="lines">@@ -650,16 +650,16 @@
</span><span class="cx">     layerForTransientZoom()-&gt;setTransform(finalTransform);
</span><span class="cx"> 
</span><span class="cx">     if (PlatformCALayer* shadowLayer = shadowLayerForTransientZoom()) {
</span><del>-        RenderView* renderView = m_webPage-&gt;mainFrameView()-&gt;renderView();
</del><ins>+        RenderView* renderView = m_webPage.mainFrameView()-&gt;renderView();
</ins><span class="cx">         IntRect overflowRect = renderView-&gt;pixelSnappedLayoutOverflowRect();
</span><span class="cx">         shadowLayer-&gt;setBounds(IntRect(IntPoint(), toIntSize(overflowRect.maxXMaxYCorner())));
</span><span class="cx">         shadowLayer-&gt;setPosition(shadowLayer-&gt;bounds().center());
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     FloatPoint unscrolledOrigin(origin);
</span><del>-    FloatRect unobscuredContentRect = m_webPage-&gt;mainFrameView()-&gt;unobscuredContentRectIncludingScrollbars();
</del><ins>+    FloatRect unobscuredContentRect = m_webPage.mainFrameView()-&gt;unobscuredContentRectIncludingScrollbars();
</ins><span class="cx">     unscrolledOrigin.moveBy(-unobscuredContentRect.location());
</span><del>-    m_webPage-&gt;scalePage(scale, roundedIntPoint(-unscrolledOrigin));
</del><ins>+    m_webPage.scalePage(scale, roundedIntPoint(-unscrolledOrigin));
</ins><span class="cx">     m_transientZoomScale = 1;
</span><span class="cx">     flushLayers();
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>