<!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>[162453] 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/162453">162453</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2014-01-21 11:19:19 -0800 (Tue, 21 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Keep CALayer implicit animation disabling code in a single place
https://bugs.webkit.org/show_bug.cgi?id=127355

Reviewed by Simon Fraser.

* WebCore.xcodeproj/project.pbxproj:
Add CALayerWebAdditions.{h,mm}.

* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::commonInit):
Remove nullActionsDictionary() and use [CALayer(WebAdditions) web_disableAllActions] instead.

* platform/graphics/mac/CALayerWebAdditions.h: Added.
* platform/graphics/mac/CALayerWebAdditions.mm: Added.
(-[CALayer web_disableAllActions]):
Added. Disable all implicit actions on the layer.

* Shared/mac/RemoteLayerTreePropertyApplier.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
Remove disableActionsForLayer.

* UIProcess/API/mac/WKView.mm:
(-[WKView _rootLayer]):
Disable actions on the root layer. It doesn't need them, and currently
isn't affected by implicit animations, but future patches which animate
the root layer will benefit from this.

* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
Use web_disableAllActions instead of disableActionsForLayer.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp.
(PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
(PlatformCALayerRemoteCustom::hostingContextID):
Use web_disableAllActions instead of disableActionsForLayer.
This requires making this file Obj-C++ but that's OK since it's Mac/iOS only.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscamacPlatformCALayerMacmm">trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreePropertyApplierh">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreePropertyAppliermm">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmm">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacCALayerWebAdditionsh">trunk/Source/WebCore/platform/graphics/mac/CALayerWebAdditions.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsmacCALayerWebAdditionsmm">trunk/Source/WebCore/platform/graphics/mac/CALayerWebAdditions.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustommm">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustomcpp">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebCore/ChangeLog        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-01-21  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Keep CALayer implicit animation disabling code in a single place
+        https://bugs.webkit.org/show_bug.cgi?id=127355
+
+        Reviewed by Simon Fraser.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        Add CALayerWebAdditions.{h,mm}.
+
+        * platform/graphics/ca/mac/PlatformCALayerMac.mm:
+        (PlatformCALayerMac::commonInit):
+        Remove nullActionsDictionary() and use [CALayer(WebAdditions) web_disableAllActions] instead.
+
+        * platform/graphics/mac/CALayerWebAdditions.h: Added.
+        * platform/graphics/mac/CALayerWebAdditions.mm: Added.
+        (-[CALayer web_disableAllActions]):
+        Added. Disable all implicit actions on the layer.
+
</ins><span class="cx"> 2014-01-21  Gavin Barraclough  &lt;barraclough@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Change Page, FocusController to use ViewState
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -1063,6 +1063,8 @@
</span><span class="cx">                 2D9A247515B9C2E300D34527 /* DOMDOMSecurityPolicyInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D9A247115B9C29500D34527 /* DOMDOMSecurityPolicyInternal.h */; };
</span><span class="cx">                 2D9A247615B9C2F400D34527 /* DOMDOMSecurityPolicy.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 2D9A247015B9C29500D34527 /* DOMDOMSecurityPolicy.h */; };
</span><span class="cx">                 2D9F0E1314FF1CBF00BA0FF7 /* linearSRGB.icc in Resources */ = {isa = PBXBuildFile; fileRef = 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */; };
</span><ins>+                2DBADE0B188E5915004D7981 /* CALayerWebAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DBADE09188E5915004D7981 /* CALayerWebAdditions.h */; settings = {ATTRIBUTES = (Private, ); }; };
+                2DBADE0C188E5915004D7981 /* CALayerWebAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2DBADE0A188E5915004D7981 /* CALayerWebAdditions.mm */; };
</ins><span class="cx">                 2DF2E9D5166E39750035BEF2 /* ConsoleAPITypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DF2E9D4166E39740035BEF2 /* ConsoleAPITypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 2E0888D41148848A00AF4265 /* JSDOMFormData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */; };
</span><span class="cx">                 2E0888D51148848A00AF4265 /* JSDOMFormData.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E0888D31148848A00AF4265 /* JSDOMFormData.h */; };
</span><span class="lines">@@ -7927,6 +7929,8 @@
</span><span class="cx">                 2D9A247115B9C29500D34527 /* DOMDOMSecurityPolicyInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMDOMSecurityPolicyInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D9A247215B9C2C700D34527 /* DOMDOMSecurityPolicy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMDOMSecurityPolicy.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D9F0E1214FF1CBF00BA0FF7 /* linearSRGB.icc */ = {isa = PBXFileReference; lastKnownFileType = file; path = linearSRGB.icc; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                2DBADE09188E5915004D7981 /* CALayerWebAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALayerWebAdditions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                2DBADE0A188E5915004D7981 /* CALayerWebAdditions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CALayerWebAdditions.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2DF2E9D4166E39740035BEF2 /* ConsoleAPITypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleAPITypes.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2E0888C3114883A900AF4265 /* DOMFormData.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMFormData.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMFormData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -19868,6 +19872,8 @@
</span><span class="cx">                 B27535490B053814002CE64F /* mac */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                2DBADE09188E5915004D7981 /* CALayerWebAdditions.h */,
+                                2DBADE0A188E5915004D7981 /* CALayerWebAdditions.mm */,
</ins><span class="cx">                                 EDE3A4FF0C7A430600956A37 /* ColorMac.h */,
</span><span class="cx">                                 B275354A0B053814002CE64F /* ColorMac.mm */,
</span><span class="cx">                                 37C2360E1097EE7700EF9F72 /* ComplexTextController.cpp */,
</span><span class="lines">@@ -24393,6 +24399,7 @@
</span><span class="cx">                                 AB4CB4EB0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h in Headers */,
</span><span class="cx">                                 E446143C0CD689CC00FADA75 /* JSHTMLSourceElement.h in Headers */,
</span><span class="cx">                                 078E093F17D16E1C00420AA1 /* RTCDTMFSenderHandlerClient.h in Headers */,
</span><ins>+                                2DBADE0B188E5915004D7981 /* CALayerWebAdditions.h in Headers */,
</ins><span class="cx">                                 9752D38E1413104B003305BD /* JSHTMLSpanElement.h in Headers */,
</span><span class="cx">                                 A80E7B0E0A19D606007FB8C5 /* JSHTMLStyleElement.h in Headers */,
</span><span class="cx">                                 BCA169A30BFD55B40019CA76 /* JSHTMLTableCaptionElement.h in Headers */,
</span><span class="lines">@@ -27900,6 +27907,7 @@
</span><span class="cx">                                 598365E41355F604001B185D /* JSPositionCallback.cpp in Sources */,
</span><span class="cx">                                 FE80DA710E9C472F000D6F75 /* JSPositionError.cpp in Sources */,
</span><span class="cx">                                 598365E61355F60D001B185D /* JSPositionErrorCallback.cpp in Sources */,
</span><ins>+                                2DBADE0C188E5915004D7981 /* CALayerWebAdditions.mm in Sources */,
</ins><span class="cx">                                 65DF31FF09D1CC60000BE325 /* JSProcessingInstruction.cpp in Sources */,
</span><span class="cx">                                 E44613ED0CD681BA00FADA75 /* JSProgressEvent.cpp in Sources */,
</span><span class="cx">                                 B658FFA11522EF3A00DD5595 /* JSRadioNodeList.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacPlatformCALayerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> 
</span><span class="cx"> #import &quot;AnimationUtilities.h&quot;
</span><span class="cx"> #import &quot;BlockExceptions.h&quot;
</span><ins>+#import &quot;CALayerWebAdditions.h&quot;
</ins><span class="cx"> #import &quot;GraphicsContext.h&quot;
</span><span class="cx"> #import &quot;GraphicsLayerCA.h&quot;
</span><span class="cx"> #import &quot;LengthFunctions.h&quot;
</span><span class="lines">@@ -153,31 +154,6 @@
</span><span class="cx">         [static_cast&lt;WebAnimationDelegate*&gt;(m_delegate.get()) setOwner:this];        
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static NSDictionary *nullActionsDictionary()
-{
-    NSNull *nullValue = [NSNull null];
-    NSDictionary *actions = [NSDictionary dictionaryWithObjectsAndKeys:
-                             nullValue, @&quot;anchorPoint&quot;,
-                             nullValue, @&quot;anchorPointZ&quot;,
-                             nullValue, @&quot;backgroundColor&quot;,
-                             nullValue, @&quot;borderColor&quot;,
-                             nullValue, @&quot;borderWidth&quot;,
-                             nullValue, @&quot;bounds&quot;,
-                             nullValue, @&quot;contents&quot;,
-                             nullValue, @&quot;contentsRect&quot;,
-                             nullValue, @&quot;contentsScale&quot;,
-                             nullValue, @&quot;cornerRadius&quot;,
-                             nullValue, @&quot;opacity&quot;,
-                             nullValue, @&quot;position&quot;,
-                             nullValue, @&quot;shadowColor&quot;,
-                             nullValue, @&quot;sublayerTransform&quot;,
-                             nullValue, @&quot;sublayers&quot;,
-                             nullValue, @&quot;transform&quot;,
-                             nullValue, @&quot;zPosition&quot;,
-                             nil];
-    return actions;
-}
-
</del><span class="cx"> static NSString *toCAFilterType(PlatformCALayer::FilterType type)
</span><span class="cx"> {
</span><span class="cx">     switch (type) {
</span><span class="lines">@@ -243,7 +219,7 @@
</span><span class="cx">     [m_layer.get() setValue:[NSValue valueWithPointer:this] forKey:platformCALayerPointer];
</span><span class="cx">     
</span><span class="cx">     // Clear all the implicit animations on the CALayer
</span><del>-    [m_layer.get() setStyle:[NSDictionary dictionaryWithObject:nullActionsDictionary() forKey:@&quot;actions&quot;]];
</del><ins>+    [m_layer web_disableAllActions];
</ins><span class="cx"> 
</span><span class="cx">     // So that the scrolling thread's performance logging code can find all the tiles, mark this as being a tile.
</span><span class="cx">     if (m_layerType == LayerTypeTiledBackingTileLayer)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacCALayerWebAdditionsh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/mac/CALayerWebAdditions.h (0 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/CALayerWebAdditions.h                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/mac/CALayerWebAdditions.h        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+/*
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef CALayerWebAdditions_h
+#define CALayerWebAdditions_h
+
+#import &lt;QuartzCore/QuartzCore.h&gt;
+
+@interface CALayer (WebAdditions)
+
+- (void)web_disableAllActions;
+
+@end
+
+#endif // CALayerWebAdditions_h
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsmacCALayerWebAdditionsmm"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/graphics/mac/CALayerWebAdditions.mm (0 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/mac/CALayerWebAdditions.mm                                (rev 0)
+++ trunk/Source/WebCore/platform/graphics/mac/CALayerWebAdditions.mm        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include &quot;config.h&quot;
+
+#import &quot;CALayerWebAdditions.h&quot;
+
+@implementation CALayer (WebAdditions)
+
+- (void)web_disableAllActions
+{
+    NSNull *nullValue = [NSNull null];
+    self.style = @{
+        @&quot;actions&quot; : @{
+            @&quot;anchorPoint&quot; : nullValue,
+            @&quot;anchorPointZ&quot; : nullValue,
+            @&quot;backgroundColor&quot; : nullValue,
+            @&quot;borderColor&quot; : nullValue,
+            @&quot;borderWidth&quot; : nullValue,
+            @&quot;bounds&quot; : nullValue,
+            @&quot;contents&quot; : nullValue,
+            @&quot;contentsRect&quot; : nullValue,
+            @&quot;contentsScale&quot; : nullValue,
+            @&quot;cornerRadius&quot; : nullValue,
+            @&quot;opacity&quot; : nullValue,
+            @&quot;position&quot; : nullValue,
+            @&quot;shadowColor&quot; : nullValue,
+            @&quot;sublayerTransform&quot; : nullValue,
+            @&quot;sublayers&quot; : nullValue,
+            @&quot;transform&quot; : nullValue,
+            @&quot;zPosition&quot; : nullValue
+        }
+    };
+}
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebKit2/ChangeLog        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-01-21  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Keep CALayer implicit animation disabling code in a single place
+        https://bugs.webkit.org/show_bug.cgi?id=127355
+
+        Reviewed by Simon Fraser.
+
+        * Shared/mac/RemoteLayerTreePropertyApplier.h:
+        * Shared/mac/RemoteLayerTreePropertyApplier.mm:
+        Remove disableActionsForLayer.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _rootLayer]):
+        Disable actions on the root layer. It doesn't need them, and currently
+        isn't affected by implicit animations, but future patches which animate
+        the root layer will benefit from this.
+
+        * UIProcess/mac/RemoteLayerTreeHost.mm:
+        (WebKit::RemoteLayerTreeHost::createLayer):
+        Use web_disableAllActions instead of disableActionsForLayer.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp.
+        (PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
+        (PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
+        (PlatformCALayerRemoteCustom::hostingContextID):
+        Use web_disableAllActions instead of disableActionsForLayer.
+        This requires making this file Obj-C++ but that's OK since it's Mac/iOS only.
+
</ins><span class="cx"> 2014-01-21  Gavin Barraclough  &lt;barraclough@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Change Page, FocusController to use ViewState
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreePropertyApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> public:
</span><span class="cx">     typedef HashMap&lt;WebCore::GraphicsLayer::PlatformLayerID, CALayer *&gt; RelatedLayerMap;
</span><span class="cx">     static void applyPropertiesToLayer(CALayer *, RemoteLayerTreeTransaction::LayerProperties, RelatedLayerMap);
</span><del>-    static void disableActionsForLayer(CALayer *);
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreePropertyAppliermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -187,30 +187,4 @@
</span><span class="cx">         updateCustomAppearance(layer, properties.customAppearance);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteLayerTreePropertyApplier::disableActionsForLayer(CALayer *layer)
-{
-    NSNull *nullValue = [NSNull null];
-    layer.style = @{
-        @&quot;actions&quot; : @{
-            @&quot;anchorPoint&quot; : nullValue,
-            @&quot;anchorPointZ&quot; : nullValue,
-            @&quot;backgroundColor&quot; : nullValue,
-            @&quot;borderColor&quot; : nullValue,
-            @&quot;borderWidth&quot; : nullValue,
-            @&quot;bounds&quot; : nullValue,
-            @&quot;contents&quot; : nullValue,
-            @&quot;contentsRect&quot; : nullValue,
-            @&quot;contentsScale&quot; : nullValue,
-            @&quot;cornerRadius&quot; : nullValue,
-            @&quot;opacity&quot; : nullValue,
-            @&quot;position&quot; : nullValue,
-            @&quot;shadowColor&quot; : nullValue,
-            @&quot;sublayerTransform&quot; : nullValue,
-            @&quot;sublayers&quot; : nullValue,
-            @&quot;transform&quot; : nullValue,
-            @&quot;zPosition&quot; : nullValue
-        }
-    };
-}
-
</del><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -2476,13 +2476,14 @@
</span><span class="cx">         if (!_data-&gt;_layerHostingView) {
</span><span class="cx">             // Create an NSView that will host our layer tree.
</span><span class="cx">             _data-&gt;_layerHostingView = adoptNS([[WKFlippedView alloc] initWithFrame:[self bounds]]);
</span><del>-            [_data-&gt;_layerHostingView.get() setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
</del><ins>+            [_data-&gt;_layerHostingView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">             [self addSubview:_data-&gt;_layerHostingView.get() positioned:NSWindowBelow relativeTo:nil];
</span><span class="cx"> 
</span><span class="cx">             // Create a root layer that will back the NSView.
</span><span class="cx">             RetainPtr&lt;CALayer&gt; layer = adoptNS([[CALayer alloc] init]);
</span><ins>+            [layer web_disableAllActions];
</ins><span class="cx"> #ifndef NDEBUG
</span><span class="cx">             [layer setName:@&quot;Hosting root layer&quot;];
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeHostmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #import &quot;ShareableBitmap.h&quot;
</span><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><ins>+#import &lt;WebCore/CALayerWebAdditions.h&gt;
</ins><span class="cx"> #import &lt;WebCore/PlatformLayer.h&gt;
</span><span class="cx"> #import &lt;WebKitSystemInterface.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -121,7 +122,7 @@
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RemoteLayerTreePropertyApplier::disableActionsForLayer(layer.get());
</del><ins>+    [layer web_disableAllActions];
</ins><span class="cx"> 
</span><span class="cx">     return layer.get();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -407,7 +407,7 @@
</span><span class="cx">                 2D819BA11862800E001F03D1 /* ViewGestureGeometryCollectorMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D819B9F1862800E001F03D1 /* ViewGestureGeometryCollectorMessageReceiver.cpp */; };
</span><span class="cx">                 2D819BA21862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D819BA01862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h */; };
</span><span class="cx">                 2D870D1016234FFE000A3F20 /* PDFPlugin.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D870D0E1622B7F9000A3F20 /* PDFPlugin.mm */; };
</span><del>-                2D8710161828415D0018FA01 /* PlatformCALayerRemoteCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.cpp */; };
</del><ins>+                2D8710161828415D0018FA01 /* PlatformCALayerRemoteCustom.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.mm */; };
</ins><span class="cx">                 2D8710171828415D0018FA01 /* PlatformCALayerRemoteCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D8710151828415D0018FA01 /* PlatformCALayerRemoteCustom.h */; };
</span><span class="cx">                 2D8949F0182044F600E898AA /* PlatformCALayerRemoteTiledBacking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D8949EE182044F600E898AA /* PlatformCALayerRemoteTiledBacking.cpp */; };
</span><span class="cx">                 2D8949F1182044F600E898AA /* PlatformCALayerRemoteTiledBacking.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D8949EF182044F600E898AA /* PlatformCALayerRemoteTiledBacking.h */; };
</span><span class="lines">@@ -2053,7 +2053,7 @@
</span><span class="cx">                 2D819BA01862800E001F03D1 /* ViewGestureGeometryCollectorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewGestureGeometryCollectorMessages.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D870D0D1622B7F9000A3F20 /* PDFPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDFPlugin.h; path = PDF/PDFPlugin.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D870D0E1622B7F9000A3F20 /* PDFPlugin.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PDFPlugin.mm; path = PDF/PDFPlugin.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><del>-                2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformCALayerRemoteCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</del><ins>+                2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformCALayerRemoteCustom.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 2D8710151828415D0018FA01 /* PlatformCALayerRemoteCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCALayerRemoteCustom.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D8949EE182044F600E898AA /* PlatformCALayerRemoteTiledBacking.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformCALayerRemoteTiledBacking.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 2D8949EF182044F600E898AA /* PlatformCALayerRemoteTiledBacking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCALayerRemoteTiledBacking.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5518,7 +5518,7 @@
</span><span class="cx">                                 2DA049B6180CCD0A00AAFA9E /* GraphicsLayerCARemote.h */,
</span><span class="cx">                                 2DA049B1180CCCD300AAFA9E /* PlatformCALayerRemote.cpp */,
</span><span class="cx">                                 2DA049B2180CCCD300AAFA9E /* PlatformCALayerRemote.h */,
</span><del>-                                2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.cpp */,
</del><ins>+                                2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.mm */,
</ins><span class="cx">                                 2D8710151828415D0018FA01 /* PlatformCALayerRemoteCustom.h */,
</span><span class="cx">                                 2D8949EE182044F600E898AA /* PlatformCALayerRemoteTiledBacking.cpp */,
</span><span class="cx">                                 2D8949EF182044F600E898AA /* PlatformCALayerRemoteTiledBacking.h */,
</span><span class="lines">@@ -7935,7 +7935,7 @@
</span><span class="cx">                                 F036978515F4BE6B00C3A80E /* WKColorPickerResultListener.cpp in Sources */,
</span><span class="cx">                                 BCA284D61492F2C7001F9042 /* WKConnection.mm in Sources */,
</span><span class="cx">                                 BC4A6296147313A0006C681A /* WKConnectionRef.cpp in Sources */,
</span><del>-                                2D8710161828415D0018FA01 /* PlatformCALayerRemoteCustom.cpp in Sources */,
</del><ins>+                                2D8710161828415D0018FA01 /* PlatformCALayerRemoteCustom.mm in Sources */,
</ins><span class="cx">                                 BCB9E24C1120E15C00A137E0 /* WKContext.cpp in Sources */,
</span><span class="cx">                                 51A555F5128C6C47009ABCEC /* WKContextMenuItem.cpp in Sources */,
</span><span class="cx">                                 9FB5F394169E6A80002C25BF /* WKContextPrivateMac.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustomcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp (162452 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp        2014-01-21 19:02:08 UTC (rev 162452)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -1,73 +0,0 @@
</span><del>-/*
- * Copyright (C) 2013 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include &quot;config.h&quot;
-
-#if USE(ACCELERATED_COMPOSITING)
-
-#import &quot;PlatformCALayerRemoteCustom.h&quot;
-
-#import &quot;LayerHostingContext.h&quot;
-#import &quot;RemoteLayerTreeContext.h&quot;
-#import &quot;RemoteLayerTreePropertyApplier.h&quot;
-#import &quot;WebProcess.h&quot;
-#import &lt;WebCore/GraphicsLayerCA.h&gt;
-#import &lt;WebCore/PlatformCALayerMac.h&gt;
-#import &lt;WebCore/SoftLinking.h&gt;
-#import &lt;wtf/RetainPtr.h&gt;
-
-using namespace WebCore;
-using namespace WebKit;
-
-PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom(PlatformLayer* customLayer, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
-    : PlatformCALayerRemote(LayerTypeCustom, owner, context)
-{
-    switch (context-&gt;layerHostingMode()) {
-    case LayerHostingModeDefault:
-        m_layerHostingContext = LayerHostingContext::createForPort(WebProcess::shared().compositingRenderServerPort());
-        break;
-#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
-    case LayerHostingModeInWindowServer:
-        m_layerHostingContext = LayerHostingContext::createForWindowServer();
-        break;
-#endif
-    }
-
-    m_layerHostingContext-&gt;setRootLayer(customLayer);
-
-    m_platformLayer = customLayer;
-    RemoteLayerTreePropertyApplier::disableActionsForLayer(customLayer);
-}
-
-PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom()
-{
-}
-
-uint32_t PlatformCALayerRemoteCustom::hostingContextID()
-{
-    return m_layerHostingContext-&gt;contextID();
-}
-
-#endif // USE(ACCELERATED_COMPOSITING)
</del></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustommmfromrev162452trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustomcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm (from rev 162452, trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.cpp) (0 => 162453)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm                                (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm        2014-01-21 19:19:19 UTC (rev 162453)
</span><span class="lines">@@ -0,0 +1,74 @@
</span><ins>+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#import &quot;PlatformCALayerRemoteCustom.h&quot;
+
+#import &quot;LayerHostingContext.h&quot;
+#import &quot;RemoteLayerTreeContext.h&quot;
+#import &quot;RemoteLayerTreePropertyApplier.h&quot;
+#import &quot;WebProcess.h&quot;
+#import &lt;WebCore/CALayerWebAdditions.h&gt;
+#import &lt;WebCore/GraphicsLayerCA.h&gt;
+#import &lt;WebCore/PlatformCALayerMac.h&gt;
+#import &lt;WebCore/SoftLinking.h&gt;
+#import &lt;wtf/RetainPtr.h&gt;
+
+using namespace WebCore;
+using namespace WebKit;
+
+PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom(PlatformLayer* customLayer, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
+    : PlatformCALayerRemote(LayerTypeCustom, owner, context)
+{
+    switch (context-&gt;layerHostingMode()) {
+    case LayerHostingModeDefault:
+        m_layerHostingContext = LayerHostingContext::createForPort(WebProcess::shared().compositingRenderServerPort());
+        break;
+#if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
+    case LayerHostingModeInWindowServer:
+        m_layerHostingContext = LayerHostingContext::createForWindowServer();
+        break;
+#endif
+    }
+
+    m_layerHostingContext-&gt;setRootLayer(customLayer);
+
+    m_platformLayer = customLayer;
+    [customLayer web_disableAllActions];
+}
+
+PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom()
+{
+}
+
+uint32_t PlatformCALayerRemoteCustom::hostingContextID()
+{
+    return m_layerHostingContext-&gt;contextID();
+}
+
+#endif // USE(ACCELERATED_COMPOSITING)
</ins></span></pre>
</div>
</div>

</body>
</html>