<!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>[166804] tags/Safari-538.26.3/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/166804">166804</a></dd>
<dt>Author</dt> <dd>lforschler@apple.com</dd>
<dt>Date</dt> <dd>2014-04-04 15:13:54 -0700 (Fri, 04 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/166542">r166542</a>. </pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#tagsSafari538263SourceWebCoreChangeLog">tags/Safari-538.26.3/Source/WebCore/ChangeLog</a></li>
<li><a href="#tagsSafari538263SourceWebCoreWebCoreexpin">tags/Safari-538.26.3/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#tagsSafari538263SourceWebCoreWebCorevcxprojWebCorevcxproj">tags/Safari-538.26.3/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#tagsSafari538263SourceWebCoreWebCorexcodeprojprojectpbxproj">tags/Safari-538.26.3/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformanimationTimingFunctionh">tags/Safari-538.26.3/Source/WebCore/platform/animation/TimingFunction.h</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscaGraphicsLayerCAh">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscaPlatformCAAnimationh">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscaPlatformCALayerh">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/PlatformCALayer.h</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscamacPlatformCAAnimationMacmm">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscamacPlatformCALayerMacmm">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscamacTileControllermm">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/TileController.mm</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscawinPlatformCAAnimationWincpp">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.cpp</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscawinPlatformCALayerWincpp">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscawinPlatformCALayerWinInternalcpp">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp</a></li>
<li><a href="#tagsSafari538263SourceWebKit2ChangeLog">tags/Safari-538.26.3/Source/WebKit2/ChangeLog</a></li>
<li><a href="#tagsSafari538263SourceWebKit2PlatformIPCArgumentCodersh">tags/Safari-538.26.3/Source/WebKit2/Platform/IPC/ArgumentCoders.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2SharedWebCoreArgumentCoderscpp">tags/Safari-538.26.3/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#tagsSafari538263SourceWebKit2SharedWebCoreArgumentCodersh">tags/Safari-538.26.3/Source/WebKit2/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2SharedmacRemoteLayerBackingStoremm">tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm</a></li>
<li><a href="#tagsSafari538263SourceWebKit2SharedmacRemoteLayerTreePropertyApplierh">tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2SharedmacRemoteLayerTreePropertyAppliermm">tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm</a></li>
<li><a href="#tagsSafari538263SourceWebKit2SharedmacRemoteLayerTreeTransactionh">tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2SharedmacRemoteLayerTreeTransactionmm">tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm</a></li>
<li><a href="#tagsSafari538263SourceWebKit2UIProcessiosRemoteLayerTreeHostIOSmm">tags/Safari-538.26.3/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm</a></li>
<li><a href="#tagsSafari538263SourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh">tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm">tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm</a></li>
<li><a href="#tagsSafari538263SourceWebKit2UIProcessmacRemoteLayerTreeHosth">tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2UIProcessmacRemoteLayerTreeHostmm">tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebKit2xcodeprojprojectpbxproj">tags/Safari-538.26.3/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPageDrawingAreah">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPageDrawingAreamessagesin">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacGraphicsLayerCARemotecpp">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCALayerRemotecpp">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustommm">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteTiledBackingcpp">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscamacPlatformCAAnimationMach">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h</a></li>
<li><a href="#tagsSafari538263SourceWebCoreplatformgraphicscawinPlatformCAAnimationWinh">tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemoteh">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h</a></li>
<li><a href="#tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemotemm">tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="tagsSafari538263SourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/ChangeLog (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/ChangeLog        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/ChangeLog        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -1,5 +1,58 @@
</span><span class="cx"> 2014-04-04 Lucas Forschler <lforschler@apple.com>
</span><span class="cx">
</span><ins>+ Merge r166542
+
+ 2014-03-31 Simon Fraser <simon.fraser@apple.com>
+
+ [UI-side compositing] Proxy animations to the UI process
+ https://bugs.webkit.org/show_bug.cgi?id=130946
+
+ Reviewed by Tim Horton.
+
+ To proxy CA animations, make PlatformCAAnimation a pure virtual base class
+ and subclass for Mac, Windows, and Remote (just like PlatformCALayer).
+
+ Add coding support for TimingFunctions.
+
+ Do some minor #include tidyup.
+
+ Minor refactor in GraphicsLayerCA to share some animations code.
+
+ * WebCore.exp.in:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/animation/TimingFunction.h: Add setters need for encode/decode.
+ (WebCore::CubicBezierTimingFunction::setValues):
+ (WebCore::CubicBezierTimingFunction::setTimingFunctionPreset):
+ (WebCore::StepsTimingFunction::create):
+ (WebCore::StepsTimingFunction::setNumberOfSteps):
+ (WebCore::StepsTimingFunction::setStepAtStart):
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::createPlatformCAAnimation):
+ (WebCore::GraphicsLayerCA::animationCanBeAccelerated): Minor refactor so we can share
+ code with GraphicsLayerCARemote.
+ (WebCore::GraphicsLayerCA::addAnimation):
+ (WebCore::GraphicsLayerCA::createBasicAnimation):
+ (WebCore::PassRefPtr<PlatformCAAnimation>GraphicsLayerCA::createKeyframeAnimation):
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ * platform/graphics/ca/PlatformCAAnimation.h:
+ (WebCore::PlatformCAAnimation::~PlatformCAAnimation):
+ (WebCore::PlatformCAAnimation::isPlatformCAAnimationMac):
+ (WebCore::PlatformCAAnimation::isPlatformCAAnimationWin):
+ (WebCore::PlatformCAAnimation::isPlatformCAAnimationRemote):
+ (WebCore::PlatformCAAnimation::PlatformCAAnimation):
+ (WebCore::PlatformCAAnimation::setType):
+ * platform/graphics/ca/PlatformCALayer.h:
+ * platform/graphics/ca/mac/PlatformCAAnimationMac.h: Added.
+ * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
+ * platform/graphics/ca/mac/PlatformCALayerMac.mm:
+ (PlatformCALayerMac::addAnimationForKey):
+ (PlatformCALayerMac::animationForKey):
+ * platform/graphics/ca/mac/TileController.mm:
+ * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
+ * platform/graphics/ca/win/PlatformCAAnimationWin.h: Added.
+
+2014-04-04 Lucas Forschler <lforschler@apple.com>
+
</ins><span class="cx"> Merge r166516
</span><span class="cx">
</span><span class="cx"> 2014-03-31 Tim Horton <timothy_horton@apple.com>
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/WebCore.exp.in (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/WebCore.exp.in        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/WebCore.exp.in        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -716,6 +716,7 @@
</span><span class="cx"> __ZN7WebCore16scriptNameToCodeERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore16startOfParagraphERKNS_15VisiblePositionENS_27EditingBoundaryCrossingRuleE
</span><span class="cx"> __ZN7WebCore16threadGlobalDataEv
</span><ins>+__ZN7WebCore16toCAFillModeTypeENS_19PlatformCAAnimation12FillModeTypeE
</ins><span class="cx"> __ZN7WebCore17CredentialStorage24getFromPersistentStorageERKNS_15ProtectionSpaceE
</span><span class="cx"> __ZN7WebCore17CredentialStorage3getERKNS_15ProtectionSpaceE
</span><span class="cx"> __ZN7WebCore17DOMImplementation13isXMLMIMETypeERKN3WTF6StringE
</span><span class="lines">@@ -791,9 +792,6 @@
</span><span class="cx"> __ZN7WebCore19MediaSessionManager17removeRestrictionENS_12MediaSession9MediaTypeEj
</span><span class="cx"> __ZN7WebCore19MediaSessionManager30didReceiveRemoteControlCommandENS_12MediaSession24RemoteControlCommandTypeE
</span><span class="cx"> __ZN7WebCore19MediaSessionManager9addClientEPNS_25MediaSessionManagerClientE
</span><del>-__ZN7WebCore19PlatformCAAnimation10setToValueERKNS_20TransformationMatrixE
-__ZN7WebCore19PlatformCAAnimation6createEP19CAPropertyAnimation
-__ZN7WebCore19PlatformCAAnimationD1Ev
</del><span class="cx"> __ZN7WebCore19ResourceRequestBase11setHTTPBodyEN3WTF10PassRefPtrINS_8FormDataEEE
</span><span class="cx"> __ZN7WebCore19ResourceRequestBase13setHTTPMethodERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore19ResourceRequestBase18setHTTPHeaderFieldEPKcRKN3WTF6StringE
</span><span class="lines">@@ -900,10 +898,12 @@
</span><span class="cx"> __ZN7WebCore21resourceLoadSchedulerEv
</span><span class="cx"> __ZN7WebCore21setGlobalIconDatabaseEPNS_16IconDatabaseBaseE
</span><span class="cx"> __ZN7WebCore21setPlatformStrategiesEPNS_18PlatformStrategiesE
</span><ins>+__ZN7WebCore21toCAValueFunctionTypeENS_19PlatformCAAnimation17ValueFunctionTypeE
</ins><span class="cx"> __ZN7WebCore22HTMLPlugInImageElement24restartSnapshottedPlugInEv
</span><span class="cx"> __ZN7WebCore22HTMLPlugInImageElement29setIsPrimarySnapshottedPlugInEb
</span><span class="cx"> __ZN7WebCore22MutableStyleProperties25ensureCSSStyleDeclarationEv
</span><span class="cx"> __ZN7WebCore22MutableStylePropertiesD1Ev
</span><ins>+__ZN7WebCore22PlatformCAAnimationMac6createEP19CAPropertyAnimation
</ins><span class="cx"> __ZN7WebCore22RuntimeEnabledFeatures14sharedFeaturesEv
</span><span class="cx"> __ZN7WebCore22ScriptExecutionContext26canSuspendActiveDOMObjectsEv
</span><span class="cx"> __ZN7WebCore22ScriptExecutionContext2vmEv
</span><span class="lines">@@ -939,6 +939,7 @@
</span><span class="cx"> __ZN7WebCore23encodeHostNameWithRangeEP8NSString8_NSRange
</span><span class="cx"> __ZN7WebCore23getFileModificationTimeERKN3WTF6StringERl
</span><span class="cx"> __ZN7WebCore23getHostnamesWithCookiesERKNS_21NetworkStorageSessionERN3WTF7HashSetINS3_6StringENS3_10StringHashENS3_10HashTraitsIS5_EEEE
</span><ins>+__ZN7WebCore23toCAMediaTimingFunctionEPKNS_14TimingFunctionEb
</ins><span class="cx"> __ZN7WebCore24CachedResourceHandleBase11setResourceEPNS_14CachedResourceE
</span><span class="cx"> __ZN7WebCore24DocumentMarkerController10markersForEPNS_4NodeENS_14DocumentMarker11MarkerTypesE
</span><span class="cx"> __ZN7WebCore24DocumentMarkerController13removeMarkersENS_14DocumentMarker11MarkerTypesE
</span><span class="lines">@@ -1644,6 +1645,7 @@
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA18getDebugBorderInfoERNS_5ColorERf
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA21canThrottleLayerFlushEv
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA24dumpAdditionalPropertiesERNS_10TextStreamEij
</span><ins>+__ZNK7WebCore15GraphicsLayerCA25animationCanBeAcceleratedERKNS_17KeyframeValueListEPKNS_9AnimationE
</ins><span class="cx"> __ZNK7WebCore15GraphicsLayerCA25shouldRepaintOnSizeChangeEv
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA26backingStoreMemoryEstimateEv
</span><span class="cx"> __ZNK7WebCore15GraphicsLayerCA30visibleRectChangeRequiresFlushERKNS_9FloatRectE
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -19112,6 +19112,7 @@
</span><span class="cx"> <ClInclude Include="..\platform\graphics\avfoundation\InbandTextTrackPrivateAVF.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\cairo\TileCairo.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\ca\PlatformCAFilters.h" />
</span><ins>+ <ClInclude Include="..\platform\graphics\ca\win\PlatformCAAnimationWin.h" />
</ins><span class="cx"> <ClInclude Include="..\platform\graphics\ca\win\PlatformCALayerWin.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\GLContext.h" />
</span><span class="cx"> <ClInclude Include="..\platform\graphics\GraphicsContext3DPrivate.h" />
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/WebCore.xcodeproj/project.pbxproj (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -504,6 +504,7 @@
</span><span class="cx">                 0F580FAF149800D400FB5BD8 /* AnimationUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580FAE149800D400FB5BD8 /* AnimationUtilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */; };
</span><span class="cx">                 0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                0F5E200618E771FC003EC3E5 /* PlatformCAAnimationMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5E200518E771FC003EC3E5 /* PlatformCAAnimationMac.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 0F605AEC15F94848004DF0C0 /* ScrollingConstraints.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F605AEA15F94848004DF0C0 /* ScrollingConstraints.cpp */; };
</span><span class="cx">                 0F605AED15F94848004DF0C0 /* ScrollingConstraints.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F605AEB15F94848004DF0C0 /* ScrollingConstraints.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 0F6383DD18615B29003E5DB5 /* ThreadedScrollingTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F6383DB18615B29003E5DB5 /* ThreadedScrollingTree.cpp */; };
</span><span class="lines">@@ -7324,6 +7325,7 @@
</span><span class="cx">                 0F580FAE149800D400FB5BD8 /* AnimationUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationUtilities.h; path = animation/AnimationUtilities.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderEmbeddedObject.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderEmbeddedObject.h; sourceTree = "<group>"; };
</span><ins>+                0F5E200518E771FC003EC3E5 /* PlatformCAAnimationMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformCAAnimationMac.h; path = ca/mac/PlatformCAAnimationMac.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0F605AEA15F94848004DF0C0 /* ScrollingConstraints.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollingConstraints.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0F605AEB15F94848004DF0C0 /* ScrollingConstraints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollingConstraints.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F6383DB18615B29003E5DB5 /* ThreadedScrollingTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadedScrollingTree.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -15593,6 +15595,7 @@
</span><span class="cx">                                 2917B565147349950052C9D0 /* LayerFlushSchedulerMac.cpp */,
</span><span class="cx">                                 93F72AF11666EDFC002A02BD /* LayerPool.h */,
</span><span class="cx">                                 93F72AF21666EDFC002A02BD /* LayerPool.mm */,
</span><ins>+                                0F5E200518E771FC003EC3E5 /* PlatformCAAnimationMac.h */,
</ins><span class="cx">                                 4958781F12A57DDF007238AC /* PlatformCAAnimationMac.mm */,
</span><span class="cx">                                 D66B2D5B186830050073C4DD /* PlatformCAFiltersMac.h */,
</span><span class="cx">                                 0F13163F16ED0CDE0035CC04 /* PlatformCAFiltersMac.mm */,
</span><span class="lines">@@ -24382,6 +24385,7 @@
</span><span class="cx">                                 1A85B1900A1B18A200D8C87C /* JSHTMLHtmlElement.h in Headers */,
</span><span class="cx">                                 BC4918C90BFEA050009D6316 /* JSHTMLIFrameElement.h in Headers */,
</span><span class="cx">                                 1AE2AA980A1CDD2D00B42B25 /* JSHTMLImageElement.h in Headers */,
</span><ins>+                                0F5E200618E771FC003EC3E5 /* PlatformCAAnimationMac.h in Headers */,
</ins><span class="cx">                                 A80E7E970A1A83E3007FB8C5 /* JSHTMLInputElement.h in Headers */,
</span><span class="cx">                                 E1AD14231295EA7F00ACA989 /* JSHTMLInputElementCustom.h in Headers */,
</span><span class="cx">                                 A6148A7912E41E3B0044A784 /* JSHTMLKeygenElement.h in Headers */,
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformanimationTimingFunctionh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/animation/TimingFunction.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/animation/TimingFunction.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/animation/TimingFunction.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -32,6 +32,8 @@
</span><span class="cx"> class TimingFunction : public RefCounted<TimingFunction> {
</span><span class="cx"> public:
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<TimingFunction> clone() const = 0;
+
</ins><span class="cx"> enum TimingFunctionType {
</span><span class="cx"> LinearFunction, CubicBezierFunction, StepsFunction
</span><span class="cx"> };
</span><span class="lines">@@ -68,14 +70,19 @@
</span><span class="cx"> {
</span><span class="cx"> return other.isLinearTimingFunction();
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> private:
</span><span class="cx"> LinearTimingFunction()
</span><span class="cx"> : TimingFunction(LinearFunction)
</span><span class="cx"> {
</span><span class="cx"> }
</span><ins>+
+ virtual PassRefPtr<TimingFunction> clone() const override
+ {
+ return adoptRef(new LinearTimingFunction);
+ }
</ins><span class="cx"> };
</span><del>-
</del><ins>+
</ins><span class="cx"> class CubicBezierTimingFunction : public TimingFunction {
</span><span class="cx"> public:
</span><span class="cx"> enum TimingFunctionPreset {
</span><span class="lines">@@ -132,7 +139,16 @@
</span><span class="cx"> double x2() const { return m_x2; }
</span><span class="cx"> double y2() const { return m_y2; }
</span><span class="cx">
</span><ins>+ void setValues(double x1, double y1, double x2, double y2)
+ {
+ m_x1 = x1;
+ m_y1 = y1;
+ m_x2 = x2;
+ m_y2 = y2;
+ }
+
</ins><span class="cx"> TimingFunctionPreset timingFunctionPreset() const { return m_timingFunctionPreset; }
</span><ins>+ void setTimingFunctionPreset(TimingFunctionPreset preset) { m_timingFunctionPreset = preset; }
</ins><span class="cx">
</span><span class="cx"> static const CubicBezierTimingFunction* defaultTimingFunction()
</span><span class="cx"> {
</span><span class="lines">@@ -156,6 +172,11 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<TimingFunction> clone() const override
+ {
+ return adoptRef(new CubicBezierTimingFunction(m_timingFunctionPreset, m_x1, m_y1, m_x2, m_y2));
+ }
+
</ins><span class="cx"> double m_x1;
</span><span class="cx"> double m_y1;
</span><span class="cx"> double m_x2;
</span><span class="lines">@@ -165,10 +186,15 @@
</span><span class="cx">
</span><span class="cx"> class StepsTimingFunction : public TimingFunction {
</span><span class="cx"> public:
</span><ins>+
</ins><span class="cx"> static PassRefPtr<StepsTimingFunction> create(int steps, bool stepAtStart)
</span><span class="cx"> {
</span><span class="cx"> return adoptRef(new StepsTimingFunction(steps, stepAtStart));
</span><span class="cx"> }
</span><ins>+ static PassRefPtr<StepsTimingFunction> create()
+ {
+ return adoptRef(new StepsTimingFunction(1, true));
+ }
</ins><span class="cx">
</span><span class="cx"> virtual ~StepsTimingFunction() { }
</span><span class="cx">
</span><span class="lines">@@ -182,7 +208,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> int numberOfSteps() const { return m_steps; }
</span><ins>+ void setNumberOfSteps(int steps) { m_steps = steps; }
+
</ins><span class="cx"> bool stepAtStart() const { return m_stepAtStart; }
</span><ins>+ void setStepAtStart(bool stepAtStart) { m_stepAtStart = stepAtStart; }
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> StepsTimingFunction(int steps, bool stepAtStart)
</span><span class="lines">@@ -191,11 +220,16 @@
</span><span class="cx"> , m_stepAtStart(stepAtStart)
</span><span class="cx"> {
</span><span class="cx"> }
</span><ins>+
+ virtual PassRefPtr<TimingFunction> clone() const override
+ {
+ return adoptRef(new StepsTimingFunction(m_steps, m_stepAtStart));
+ }
</ins><span class="cx">
</span><span class="cx"> int m_steps;
</span><span class="cx"> bool m_stepAtStart;
</span><span class="cx"> };
</span><del>-
</del><ins>+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // TimingFunction_h
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "FloatConversion.h"
</span><span class="cx"> #include "FloatRect.h"
</span><span class="cx"> #include "GraphicsLayerFactory.h"
</span><ins>+#include "Image.h"
</ins><span class="cx"> #include "PlatformCAFilters.h"
</span><span class="cx"> #include "PlatformCALayer.h"
</span><span class="cx"> #include "RotateTransformOperation.h"
</span><span class="lines">@@ -51,11 +52,13 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(COCOA)
</span><ins>+#include "PlatformCAAnimationMac.h"
</ins><span class="cx"> #include "PlatformCALayerMac.h"
</span><span class="cx"> #include "WebCoreSystemInterface.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(WIN)
</span><ins>+#include "PlatformCAAnimationWin.h"
</ins><span class="cx"> #include "PlatformCALayerWin.h"
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -341,6 +344,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+PassRefPtr<PlatformCAAnimation> GraphicsLayerCA::createPlatformCAAnimation(PlatformCAAnimation::AnimationType type, const String& keyPath)
+{
+#if PLATFORM(COCOA)
+ return PlatformCAAnimationMac::create(type, keyPath);
+#elif PLATFORM(WIN)
+ return PlatformCAAnimationWin::create(type, keyPath);
+#endif
+}
+
</ins><span class="cx"> GraphicsLayerCA::GraphicsLayerCA(GraphicsLayerClient* client)
</span><span class="cx"> : GraphicsLayer(client)
</span><span class="cx"> , m_contentsLayerPurpose(NoContentsLayer)
</span><span class="lines">@@ -787,18 +799,24 @@
</span><span class="cx"> return drawsContent() && !tiledBacking();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool GraphicsLayerCA::addAnimation(const KeyframeValueList& valueList, const FloatSize& boxSize, const Animation* anim, const String& animationName, double timeOffset)
</del><ins>+bool GraphicsLayerCA::animationCanBeAccelerated(const KeyframeValueList& valueList, const Animation* anim) const
</ins><span class="cx"> {
</span><del>- ASSERT(!animationName.isEmpty());
-
</del><span class="cx"> if (!anim || anim->isEmptyOrZeroDuration() || valueList.size() < 2)
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- // CoreAnimation does not handle the steps() timing function. Fall back
- // to software animation in that case.
</del><span class="cx"> if (animationHasStepsTimingFunction(valueList, anim))
</span><span class="cx"> return false;
</span><span class="cx">
</span><ins>+ return true;
+}
+
+bool GraphicsLayerCA::addAnimation(const KeyframeValueList& valueList, const FloatSize& boxSize, const Animation* anim, const String& animationName, double timeOffset)
+{
+ ASSERT(!animationName.isEmpty());
+
+ if (!animationCanBeAccelerated(valueList, anim))
+ return false;
+
</ins><span class="cx"> bool createdAnimations = false;
</span><span class="cx"> if (valueList.property() == AnimatedPropertyWebkitTransform)
</span><span class="cx"> createdAnimations = createTransformAnimationsFromKeyframes(valueList, anim, animationName, timeOffset, boxSize);
</span><span class="lines">@@ -2576,14 +2594,14 @@
</span><span class="cx">
</span><span class="cx"> PassRefPtr<PlatformCAAnimation> GraphicsLayerCA::createBasicAnimation(const Animation* anim, const String& keyPath, bool additive)
</span><span class="cx"> {
</span><del>- RefPtr<PlatformCAAnimation> basicAnim = PlatformCAAnimation::create(PlatformCAAnimation::Basic, keyPath);
</del><ins>+ RefPtr<PlatformCAAnimation> basicAnim = createPlatformCAAnimation(PlatformCAAnimation::Basic, keyPath);
</ins><span class="cx"> setupAnimation(basicAnim.get(), anim, additive);
</span><span class="cx"> return basicAnim;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<PlatformCAAnimation>GraphicsLayerCA::createKeyframeAnimation(const Animation* anim, const String& keyPath, bool additive)
</span><span class="cx"> {
</span><del>- RefPtr<PlatformCAAnimation> keyframeAnim = PlatformCAAnimation::create(PlatformCAAnimation::Keyframe, keyPath);
</del><ins>+ RefPtr<PlatformCAAnimation> keyframeAnim = createPlatformCAAnimation(PlatformCAAnimation::Keyframe, keyPath);
</ins><span class="cx"> setupAnimation(keyframeAnim.get(), anim, additive);
</span><span class="cx"> return keyframeAnim;
</span><span class="cx"> }
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #define GraphicsLayerCA_h
</span><span class="cx">
</span><span class="cx"> #include "GraphicsLayer.h"
</span><del>-#include "Image.h"
</del><span class="cx"> #include "PlatformCAAnimation.h"
</span><span class="cx"> #include "PlatformCALayer.h"
</span><span class="cx"> #include "PlatformCALayerClient.h"
</span><span class="lines">@@ -42,6 +41,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+class Image;
</ins><span class="cx"> class TransformState;
</span><span class="cx">
</span><span class="cx"> class GraphicsLayerCA : public GraphicsLayer, public PlatformCALayerClient {
</span><span class="lines">@@ -170,6 +170,8 @@
</span><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> virtual void setOpacityInternal(float);
</span><ins>+
+ bool animationCanBeAccelerated(const KeyframeValueList&, const Animation*) const;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> virtual bool isGraphicsLayerCA() const { return true; }
</span><span class="lines">@@ -214,6 +216,7 @@
</span><span class="cx">
</span><span class="cx"> virtual PassRefPtr<PlatformCALayer> createPlatformCALayer(PlatformCALayer::LayerType, PlatformCALayerClient* owner);
</span><span class="cx"> virtual PassRefPtr<PlatformCALayer> createPlatformCALayer(PlatformLayer*, PlatformCALayerClient* owner);
</span><ins>+ virtual PassRefPtr<PlatformCAAnimation> createPlatformCAAnimation(PlatformCAAnimation::AnimationType, const String& keyPath);
</ins><span class="cx">
</span><span class="cx"> PlatformCALayer* primaryLayer() const { return m_structuralLayer.get() ? m_structuralLayer.get() : m_layer.get(); }
</span><span class="cx"> PlatformCALayer* hostLayerForSublayers() const;
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscaPlatformCAAnimationh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -31,136 +31,119 @@
</span><span class="cx"> #include "FloatPoint3D.h"
</span><span class="cx"> #include "TransformationMatrix.h"
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><del>-#include <wtf/RetainPtr.h>
</del><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><del>-#if PLATFORM(COCOA)
-OBJC_CLASS CAPropertyAnimation;
-typedef CAPropertyAnimation* PlatformAnimationRef;
-#elif PLATFORM(WIN)
-typedef struct _CACFAnimation* CACFAnimationRef;
-typedef CACFAnimationRef PlatformAnimationRef;
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class FloatRect;
</span><del>-class PlatformCAAnimation;
</del><span class="cx"> class TimingFunction;
</span><span class="cx">
</span><span class="cx"> class PlatformCAAnimation : public RefCounted<PlatformCAAnimation> {
</span><span class="cx"> public:
</span><del>- friend class PlatformCALayer;
-#if PLATFORM(COCOA)
- friend class PlatformCALayerMac;
-#elif PLATFORM(WIN)
- friend class PlatformCALayerWin;
-#endif
-
</del><span class="cx"> enum AnimationType { Basic, Keyframe };
</span><span class="cx"> enum FillModeType { NoFillMode, Forwards, Backwards, Both };
</span><span class="cx"> enum ValueFunctionType { NoValueFunction, RotateX, RotateY, RotateZ, ScaleX, ScaleY, ScaleZ, Scale, TranslateX, TranslateY, TranslateZ, Translate };
</span><span class="cx">
</span><del>- static PassRefPtr<PlatformCAAnimation> create(AnimationType, const String& keyPath);
- static PassRefPtr<PlatformCAAnimation> create(PlatformAnimationRef);
</del><ins>+ virtual ~PlatformCAAnimation() { }
</ins><span class="cx">
</span><del>- ~PlatformCAAnimation();
</del><ins>+ virtual bool isPlatformCAAnimationMac() const { return false; }
+ virtual bool isPlatformCAAnimationWin() const { return false; }
+ virtual bool isPlatformCAAnimationRemote() const { return false; }
</ins><span class="cx">
</span><del>- PassRefPtr<PlatformCAAnimation> copy() const;
-
- PlatformAnimationRef platformAnimation() const;
</del><ins>+ virtual PassRefPtr<PlatformCAAnimation> copy() const = 0;
</ins><span class="cx">
</span><span class="cx"> AnimationType animationType() const { return m_type; }
</span><del>- String keyPath() const;
</del><ins>+ virtual String keyPath() const = 0;
</ins><span class="cx">
</span><del>- CFTimeInterval beginTime() const;
- void setBeginTime(CFTimeInterval);
</del><ins>+ virtual CFTimeInterval beginTime() const = 0;
+ virtual void setBeginTime(CFTimeInterval) = 0;
</ins><span class="cx">
</span><del>- CFTimeInterval duration() const;
- void setDuration(CFTimeInterval);
</del><ins>+ virtual CFTimeInterval duration() const = 0;
+ virtual void setDuration(CFTimeInterval) = 0;
</ins><span class="cx">
</span><del>- float speed() const;
- void setSpeed(float);
</del><ins>+ virtual float speed() const = 0;
+ virtual void setSpeed(float) = 0;
</ins><span class="cx">
</span><del>- CFTimeInterval timeOffset() const;
- void setTimeOffset(CFTimeInterval);
</del><ins>+ virtual CFTimeInterval timeOffset() const = 0;
+ virtual void setTimeOffset(CFTimeInterval) = 0;
</ins><span class="cx">
</span><del>- float repeatCount() const;
- void setRepeatCount(float);
</del><ins>+ virtual float repeatCount() const = 0;
+ virtual void setRepeatCount(float) = 0;
</ins><span class="cx">
</span><del>- bool autoreverses() const;
- void setAutoreverses(bool);
</del><ins>+ virtual bool autoreverses() const = 0;
+ virtual void setAutoreverses(bool) = 0;
</ins><span class="cx">
</span><del>- FillModeType fillMode() const;
- void setFillMode(FillModeType);
</del><ins>+ virtual FillModeType fillMode() const = 0;
+ virtual void setFillMode(FillModeType) = 0;
</ins><span class="cx">
</span><del>- void setTimingFunction(const TimingFunction*, bool reverse = false);
- void copyTimingFunctionFrom(const PlatformCAAnimation*);
</del><ins>+ virtual void setTimingFunction(const TimingFunction*, bool reverse = false) = 0;
+ virtual void copyTimingFunctionFrom(const PlatformCAAnimation*) = 0;
</ins><span class="cx">
</span><del>- bool isRemovedOnCompletion() const;
- void setRemovedOnCompletion(bool);
</del><ins>+ virtual bool isRemovedOnCompletion() const = 0;
+ virtual void setRemovedOnCompletion(bool) = 0;
</ins><span class="cx">
</span><del>- bool isAdditive() const;
- void setAdditive(bool);
</del><ins>+ virtual bool isAdditive() const = 0;
+ virtual void setAdditive(bool) = 0;
</ins><span class="cx">
</span><del>- ValueFunctionType valueFunction() const;
- void setValueFunction(ValueFunctionType);
</del><ins>+ virtual ValueFunctionType valueFunction() const = 0;
+ virtual void setValueFunction(ValueFunctionType) = 0;
</ins><span class="cx">
</span><span class="cx"> // Basic-animation properties.
</span><del>- void setFromValue(float);
- void setFromValue(const WebCore::TransformationMatrix&);
- void setFromValue(const FloatPoint3D&);
- void setFromValue(const WebCore::Color&);
</del><ins>+ virtual void setFromValue(float) = 0;
+ virtual void setFromValue(const WebCore::TransformationMatrix&) = 0;
+ virtual void setFromValue(const FloatPoint3D&) = 0;
+ virtual void setFromValue(const WebCore::Color&) = 0;
</ins><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>- void setFromValue(const FilterOperation*, int internalFilterPropertyIndex);
</del><ins>+ virtual void setFromValue(const FilterOperation*, int internalFilterPropertyIndex) = 0;
</ins><span class="cx"> #endif
</span><del>- void copyFromValueFrom(const PlatformCAAnimation*);
</del><ins>+ virtual void copyFromValueFrom(const PlatformCAAnimation*) = 0;
</ins><span class="cx">
</span><del>- void setToValue(float);
- void setToValue(const WebCore::TransformationMatrix&);
- void setToValue(const FloatPoint3D&);
- void setToValue(const WebCore::Color&);
</del><ins>+ virtual void setToValue(float) = 0;
+ virtual void setToValue(const WebCore::TransformationMatrix&) = 0;
+ virtual void setToValue(const FloatPoint3D&) = 0;
+ virtual void setToValue(const WebCore::Color&) = 0;
</ins><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>- void setToValue(const FilterOperation*, int internalFilterPropertyIndex);
</del><ins>+ virtual void setToValue(const FilterOperation*, int internalFilterPropertyIndex) = 0;
</ins><span class="cx"> #endif
</span><del>- void copyToValueFrom(const PlatformCAAnimation*);
</del><ins>+ virtual void copyToValueFrom(const PlatformCAAnimation*) = 0;
</ins><span class="cx">
</span><span class="cx"> // Keyframe-animation properties.
</span><del>- void setValues(const Vector<float>&);
- void setValues(const Vector<WebCore::TransformationMatrix>&);
- void setValues(const Vector<FloatPoint3D>&);
- void setValues(const Vector<WebCore::Color>&);
</del><ins>+ virtual void setValues(const Vector<float>&) = 0;
+ virtual void setValues(const Vector<WebCore::TransformationMatrix>&) = 0;
+ virtual void setValues(const Vector<FloatPoint3D>&) = 0;
+ virtual void setValues(const Vector<WebCore::Color>&) = 0;
</ins><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>- void setValues(const Vector<RefPtr<FilterOperation>>&, int internalFilterPropertyIndex);
</del><ins>+ virtual void setValues(const Vector<RefPtr<FilterOperation>>&, int internalFilterPropertyIndex) = 0;
</ins><span class="cx"> #endif
</span><del>- void copyValuesFrom(const PlatformCAAnimation*);
</del><ins>+ virtual void copyValuesFrom(const PlatformCAAnimation*) = 0;
</ins><span class="cx">
</span><del>- void setKeyTimes(const Vector<float>&);
- void copyKeyTimesFrom(const PlatformCAAnimation*);
</del><ins>+ virtual void setKeyTimes(const Vector<float>&) = 0;
+ virtual void copyKeyTimesFrom(const PlatformCAAnimation*) = 0;
</ins><span class="cx">
</span><del>- void setTimingFunctions(const Vector<const TimingFunction*>&, bool reverse = false);
- void copyTimingFunctionsFrom(const PlatformCAAnimation*);
</del><ins>+ virtual void setTimingFunctions(const Vector<const TimingFunction*>&, bool reverse = false) = 0;
+ virtual void copyTimingFunctionsFrom(const PlatformCAAnimation*) = 0;
</ins><span class="cx">
</span><del>-protected:
- PlatformCAAnimation(AnimationType, const String& keyPath);
- PlatformCAAnimation(PlatformAnimationRef);
-
</del><span class="cx"> void setActualStartTimeIfNeeded(CFTimeInterval t)
</span><span class="cx"> {
</span><span class="cx"> if (beginTime() <= 0)
</span><span class="cx"> setBeginTime(t);
</span><span class="cx"> }
</span><ins>+
+protected:
+ PlatformCAAnimation(AnimationType type = Basic)
+ : m_type(type)
+ {
+ }
</ins><span class="cx">
</span><ins>+ void setType(AnimationType type) { m_type = type; }
+
</ins><span class="cx"> private:
</span><span class="cx"> AnimationType m_type;
</span><del>-
-#if PLATFORM(COCOA)
- RetainPtr<CAPropertyAnimation> m_animation;
-#elif PLATFORM(WIN)
- RetainPtr<CACFAnimationRef> m_animation;
-#endif
</del><span class="cx"> };
</span><span class="cx">
</span><ins>+#define PLATFORM_CAANIMATION_TYPE_CASTS(ToValueTypeName, predicate) \
+ TYPE_CASTS_BASE(ToValueTypeName, WebCore::PlatformCAAnimation, object, object->predicate, object.predicate)
+
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif // PlatformCAAnimation_h
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscaPlatformCALayerh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/PlatformCALayer.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/PlatformCALayer.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/PlatformCALayer.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -26,9 +26,7 @@
</span><span class="cx"> #ifndef PlatformCALayer_h
</span><span class="cx"> #define PlatformCALayer_h
</span><span class="cx">
</span><del>-#include "GraphicsContext.h"
</del><span class="cx"> #include "GraphicsLayer.h"
</span><del>-#include "PlatformCAAnimation.h"
</del><span class="cx"> #include "PlatformCALayerClient.h"
</span><span class="cx"> #include <QuartzCore/CABase.h>
</span><span class="cx"> #include <wtf/CurrentTime.h>
</span><span class="lines">@@ -42,9 +40,14 @@
</span><span class="cx">
</span><span class="cx"> OBJC_CLASS AVPlayerLayer;
</span><span class="cx">
</span><ins>+#if PLATFORM(COCOA)
+typedef struct CGContext *CGContextRef;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="cx"> class PlatformCALayer;
</span><ins>+class PlatformCAAnimation;
</ins><span class="cx">
</span><span class="cx"> typedef Vector<RefPtr<PlatformCALayer>> PlatformCALayerList;
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscamacPlatformCAAnimationMachfromrev166542trunkSourceWebCoreplatformgraphicscamacPlatformCAAnimationMach"></a>
<div class="copfile"><h4>Copied: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h (from rev 166542, trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h) (0 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h         (rev 0)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -0,0 +1,140 @@
</span><ins>+/*
+ * Copyright (C) 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 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 PlatformCAAnimationMac_h
+#define PlatformCAAnimationMac_h
+
+#include "PlatformCAAnimation.h"
+
+#include <wtf/RetainPtr.h>
+
+OBJC_CLASS CAMediaTimingFunction;
+OBJC_CLASS CAPropertyAnimation;
+OBJC_CLASS NSString;
+
+typedef CAPropertyAnimation* PlatformAnimationRef;
+
+namespace WebCore {
+
+NSString* toCAFillModeType(PlatformCAAnimation::FillModeType);
+NSString* toCAValueFunctionType(PlatformCAAnimation::ValueFunctionType);
+CAMediaTimingFunction* toCAMediaTimingFunction(const TimingFunction*, bool reverse);
+
+class PlatformCAAnimationMac final : public PlatformCAAnimation {
+public:
+ static PassRefPtr<PlatformCAAnimation> create(AnimationType, const String& keyPath);
+ static PassRefPtr<PlatformCAAnimation> create(PlatformAnimationRef);
+
+ virtual ~PlatformCAAnimationMac();
+
+ virtual bool isPlatformCAAnimationMac() const override { return true; }
+
+ virtual PassRefPtr<PlatformCAAnimation> copy() const override;
+
+ PlatformAnimationRef platformAnimation() const;
+
+ virtual String keyPath() const override;
+
+ virtual CFTimeInterval beginTime() const override;
+ virtual void setBeginTime(CFTimeInterval) override;
+
+ virtual CFTimeInterval duration() const override;
+ virtual void setDuration(CFTimeInterval) override;
+
+ virtual float speed() const override;
+ virtual void setSpeed(float) override;
+
+ virtual CFTimeInterval timeOffset() const override;
+ virtual void setTimeOffset(CFTimeInterval) override;
+
+ virtual float repeatCount() const override;
+ virtual void setRepeatCount(float) override;
+
+ virtual bool autoreverses() const override;
+ virtual void setAutoreverses(bool) override;
+
+ virtual FillModeType fillMode() const override;
+ virtual void setFillMode(FillModeType) override;
+
+ virtual void setTimingFunction(const TimingFunction*, bool reverse = false) override;
+ void copyTimingFunctionFrom(const PlatformCAAnimation*) override;
+
+ virtual bool isRemovedOnCompletion() const override;
+ virtual void setRemovedOnCompletion(bool) override;
+
+ virtual bool isAdditive() const override;
+ virtual void setAdditive(bool) override;
+
+ virtual ValueFunctionType valueFunction() const override;
+ virtual void setValueFunction(ValueFunctionType) override;
+
+ // Basic-animation properties.
+ virtual void setFromValue(float) override;
+ virtual void setFromValue(const WebCore::TransformationMatrix&) override;
+ virtual void setFromValue(const FloatPoint3D&) override;
+ virtual void setFromValue(const WebCore::Color&) override;
+#if ENABLE(CSS_FILTERS)
+ virtual void setFromValue(const FilterOperation*, int internalFilterPropertyIndex) override;
+#endif
+ virtual void copyFromValueFrom(const PlatformCAAnimation*) override;
+
+ virtual void setToValue(float) override;
+ virtual void setToValue(const WebCore::TransformationMatrix&) override;
+ virtual void setToValue(const FloatPoint3D&) override;
+ virtual void setToValue(const WebCore::Color&) override;
+#if ENABLE(CSS_FILTERS)
+ virtual void setToValue(const FilterOperation*, int internalFilterPropertyIndex) override;
+#endif
+ virtual void copyToValueFrom(const PlatformCAAnimation*) override;
+
+ // Keyframe-animation properties.
+ virtual void setValues(const Vector<float>&) override;
+ virtual void setValues(const Vector<WebCore::TransformationMatrix>&) override;
+ virtual void setValues(const Vector<FloatPoint3D>&) override;
+ virtual void setValues(const Vector<WebCore::Color>&) override;
+#if ENABLE(CSS_FILTERS)
+ virtual void setValues(const Vector<RefPtr<FilterOperation>>&, int internalFilterPropertyIndex) override;
+#endif
+ virtual void copyValuesFrom(const PlatformCAAnimation*) override;
+
+ virtual void setKeyTimes(const Vector<float>&) override;
+ virtual void copyKeyTimesFrom(const PlatformCAAnimation*) override;
+
+ virtual void setTimingFunctions(const Vector<const TimingFunction*>&, bool reverse = false) override;
+ virtual void copyTimingFunctionsFrom(const PlatformCAAnimation*) override;
+
+protected:
+ PlatformCAAnimationMac(AnimationType, const String& keyPath);
+ PlatformCAAnimationMac(PlatformAnimationRef);
+
+private:
+ RetainPtr<CAPropertyAnimation> m_animation;
+};
+
+PLATFORM_CAANIMATION_TYPE_CASTS(PlatformCAAnimationMac, isPlatformCAAnimationMac())
+
+}
+
+#endif // PlatformCAAnimationMac_h
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscamacPlatformCAAnimationMacmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><span class="cx">
</span><del>-#import "PlatformCAAnimation.h"
</del><ins>+#import "PlatformCAAnimationMac.h"
</ins><span class="cx">
</span><span class="cx"> #import "FloatConversion.h"
</span><span class="cx"> #import "PlatformCAFilters.h"
</span><span class="lines">@@ -40,15 +40,15 @@
</span><span class="cx">
</span><span class="cx"> static bool hasNonZeroBeginTimeFlag(const PlatformCAAnimation* animation)
</span><span class="cx"> {
</span><del>- return [[animation->platformAnimation() valueForKey:WKNonZeroBeginTimeFlag] boolValue];
</del><ins>+ return [[toPlatformCAAnimationMac(animation)->platformAnimation() valueForKey:WKNonZeroBeginTimeFlag] boolValue];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static void setNonZeroBeginTimeFlag(PlatformCAAnimation* animation, bool value)
</span><span class="cx"> {
</span><del>- [animation->platformAnimation() setValue:[NSNumber numberWithBool:value] forKey:WKNonZeroBeginTimeFlag];
</del><ins>+ [toPlatformCAAnimationMac(animation)->platformAnimation() setValue:[NSNumber numberWithBool:value] forKey:WKNonZeroBeginTimeFlag];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static NSString* toCAFillModeType(PlatformCAAnimation::FillModeType type)
</del><ins>+NSString* WebCore::toCAFillModeType(PlatformCAAnimation::FillModeType type)
</ins><span class="cx"> {
</span><span class="cx"> switch (type) {
</span><span class="cx"> case PlatformCAAnimation::NoFillMode:
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> return PlatformCAAnimation::Forwards;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static NSString* toCAValueFunctionType(PlatformCAAnimation::ValueFunctionType type)
</del><ins>+NSString* WebCore::toCAValueFunctionType(PlatformCAAnimation::ValueFunctionType type)
</ins><span class="cx"> {
</span><span class="cx"> switch (type) {
</span><span class="cx"> case PlatformCAAnimation::NoValueFunction: return @"";
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> return PlatformCAAnimation::NoValueFunction;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static CAMediaTimingFunction* toCAMediaTimingFunction(const TimingFunction* timingFunction, bool reverse)
</del><ins>+CAMediaTimingFunction* WebCore::toCAMediaTimingFunction(const TimingFunction* timingFunction, bool reverse)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(timingFunction);
</span><span class="cx"> if (timingFunction->isCubicBezierTimingFunction()) {
</span><span class="lines">@@ -146,21 +146,22 @@
</span><span class="cx"> return [CAMediaTimingFunction functionWithControlPoints: x1 : y1 : x2 : y2];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ ASSERT(timingFunction->type() == TimingFunction::LinearFunction);
</ins><span class="cx"> return [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<PlatformCAAnimation> PlatformCAAnimation::create(AnimationType type, const String& keyPath)
</del><ins>+PassRefPtr<PlatformCAAnimation> PlatformCAAnimationMac::create(AnimationType type, const String& keyPath)
</ins><span class="cx"> {
</span><del>- return adoptRef(new PlatformCAAnimation(type, keyPath));
</del><ins>+ return adoptRef(new PlatformCAAnimationMac(type, keyPath));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<PlatformCAAnimation> PlatformCAAnimation::create(PlatformAnimationRef animation)
</del><ins>+PassRefPtr<PlatformCAAnimation> PlatformCAAnimationMac::create(PlatformAnimationRef animation)
</ins><span class="cx"> {
</span><del>- return adoptRef(new PlatformCAAnimation(animation));
</del><ins>+ return adoptRef(new PlatformCAAnimationMac(animation));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformCAAnimation::PlatformCAAnimation(AnimationType type, const String& keyPath)
- : m_type(type)
</del><ins>+PlatformCAAnimationMac::PlatformCAAnimationMac(AnimationType type, const String& keyPath)
+ : PlatformCAAnimation(type)
</ins><span class="cx"> {
</span><span class="cx"> if (type == Basic)
</span><span class="cx"> m_animation = [CABasicAnimation animationWithKeyPath:keyPath];
</span><span class="lines">@@ -168,12 +169,12 @@
</span><span class="cx"> m_animation = [CAKeyframeAnimation animationWithKeyPath:keyPath];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformCAAnimation::PlatformCAAnimation(PlatformAnimationRef animation)
</del><ins>+PlatformCAAnimationMac::PlatformCAAnimationMac(PlatformAnimationRef animation)
</ins><span class="cx"> {
</span><span class="cx"> if ([static_cast<CAAnimation*>(animation) isKindOfClass:[CABasicAnimation class]])
</span><del>- m_type = Basic;
</del><ins>+ setType(Basic);
</ins><span class="cx"> else if ([static_cast<CAAnimation*>(animation) isKindOfClass:[CAKeyframeAnimation class]])
</span><del>- m_type = Keyframe;
</del><ins>+ setType(Keyframe);
</ins><span class="cx"> else {
</span><span class="cx"> ASSERT(0);
</span><span class="cx"> return;
</span><span class="lines">@@ -182,8 +183,12 @@
</span><span class="cx"> m_animation = static_cast<CAPropertyAnimation*>(animation);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<PlatformCAAnimation> PlatformCAAnimation::copy() const
</del><ins>+PlatformCAAnimationMac::~PlatformCAAnimationMac()
</ins><span class="cx"> {
</span><ins>+}
+
+PassRefPtr<PlatformCAAnimation> PlatformCAAnimationMac::copy() const
+{
</ins><span class="cx"> RefPtr<PlatformCAAnimation> animation = create(animationType(), keyPath());
</span><span class="cx">
</span><span class="cx"> animation->setBeginTime(beginTime());
</span><span class="lines">@@ -212,26 +217,23 @@
</span><span class="cx">
</span><span class="cx"> return animation;
</span><span class="cx"> }
</span><del>-PlatformCAAnimation::~PlatformCAAnimation()
-{
-}
</del><span class="cx">
</span><del>-PlatformAnimationRef PlatformCAAnimation::platformAnimation() const
</del><ins>+PlatformAnimationRef PlatformCAAnimationMac::platformAnimation() const
</ins><span class="cx"> {
</span><span class="cx"> return m_animation.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String PlatformCAAnimation::keyPath() const
</del><ins>+String PlatformCAAnimationMac::keyPath() const
</ins><span class="cx"> {
</span><span class="cx"> return [m_animation.get() keyPath];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CFTimeInterval PlatformCAAnimation::beginTime() const
</del><ins>+CFTimeInterval PlatformCAAnimationMac::beginTime() const
</ins><span class="cx"> {
</span><span class="cx"> return [m_animation.get() beginTime];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setBeginTime(CFTimeInterval value)
</del><ins>+void PlatformCAAnimationMac::setBeginTime(CFTimeInterval value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setBeginTime:value];
</span><span class="cx">
</span><span class="lines">@@ -243,115 +245,115 @@
</span><span class="cx"> setNonZeroBeginTimeFlag(this, true);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CFTimeInterval PlatformCAAnimation::duration() const
</del><ins>+CFTimeInterval PlatformCAAnimationMac::duration() const
</ins><span class="cx"> {
</span><span class="cx"> return [m_animation.get() duration];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setDuration(CFTimeInterval value)
</del><ins>+void PlatformCAAnimationMac::setDuration(CFTimeInterval value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setDuration:value];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float PlatformCAAnimation::speed() const
</del><ins>+float PlatformCAAnimationMac::speed() const
</ins><span class="cx"> {
</span><span class="cx"> return [m_animation.get() speed];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setSpeed(float value)
</del><ins>+void PlatformCAAnimationMac::setSpeed(float value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setSpeed:value];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CFTimeInterval PlatformCAAnimation::timeOffset() const
</del><ins>+CFTimeInterval PlatformCAAnimationMac::timeOffset() const
</ins><span class="cx"> {
</span><span class="cx"> return [m_animation.get() timeOffset];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setTimeOffset(CFTimeInterval value)
</del><ins>+void PlatformCAAnimationMac::setTimeOffset(CFTimeInterval value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setTimeOffset:value];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float PlatformCAAnimation::repeatCount() const
</del><ins>+float PlatformCAAnimationMac::repeatCount() const
</ins><span class="cx"> {
</span><span class="cx"> return [m_animation.get() repeatCount];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setRepeatCount(float value)
</del><ins>+void PlatformCAAnimationMac::setRepeatCount(float value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setRepeatCount:value];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool PlatformCAAnimation::autoreverses() const
</del><ins>+bool PlatformCAAnimationMac::autoreverses() const
</ins><span class="cx"> {
</span><span class="cx"> return [m_animation.get() autoreverses];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setAutoreverses(bool value)
</del><ins>+void PlatformCAAnimationMac::setAutoreverses(bool value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setAutoreverses:value];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformCAAnimation::FillModeType PlatformCAAnimation::fillMode() const
</del><ins>+PlatformCAAnimation::FillModeType PlatformCAAnimationMac::fillMode() const
</ins><span class="cx"> {
</span><span class="cx"> return fromCAFillModeType([m_animation.get() fillMode]);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFillMode(FillModeType value)
</del><ins>+void PlatformCAAnimationMac::setFillMode(FillModeType value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setFillMode:toCAFillModeType(value)];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setTimingFunction(const TimingFunction* value, bool reverse)
</del><ins>+void PlatformCAAnimationMac::setTimingFunction(const TimingFunction* value, bool reverse)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setTimingFunction:toCAMediaTimingFunction(value, reverse)];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyTimingFunctionFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyTimingFunctionFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><del>- [m_animation.get() setTimingFunction:[value->m_animation.get() timingFunction]];
</del><ins>+ [m_animation.get() setTimingFunction:[toPlatformCAAnimationMac(value)->m_animation.get() timingFunction]];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-bool PlatformCAAnimation::isRemovedOnCompletion() const
</del><ins>+bool PlatformCAAnimationMac::isRemovedOnCompletion() const
</ins><span class="cx"> {
</span><span class="cx"> return [m_animation.get() isRemovedOnCompletion];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setRemovedOnCompletion(bool value)
</del><ins>+void PlatformCAAnimationMac::setRemovedOnCompletion(bool value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setRemovedOnCompletion:value];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool PlatformCAAnimation::isAdditive() const
</del><ins>+bool PlatformCAAnimationMac::isAdditive() const
</ins><span class="cx"> {
</span><span class="cx"> return [m_animation.get() isAdditive];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setAdditive(bool value)
</del><ins>+void PlatformCAAnimationMac::setAdditive(bool value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setAdditive:value];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformCAAnimation::ValueFunctionType PlatformCAAnimation::valueFunction() const
</del><ins>+PlatformCAAnimation::ValueFunctionType PlatformCAAnimationMac::valueFunction() const
</ins><span class="cx"> {
</span><span class="cx"> CAValueFunction* vf = [m_animation.get() valueFunction];
</span><span class="cx"> return fromCAValueFunctionType([vf name]);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setValueFunction(ValueFunctionType value)
</del><ins>+void PlatformCAAnimationMac::setValueFunction(ValueFunctionType value)
</ins><span class="cx"> {
</span><span class="cx"> [m_animation.get() setValueFunction:[CAValueFunction functionWithName:toCAValueFunctionType(value)]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFromValue(float value)
</del><ins>+void PlatformCAAnimationMac::setFromValue(float value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setFromValue:[NSNumber numberWithDouble:value]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFromValue(const WebCore::TransformationMatrix& value)
</del><ins>+void PlatformCAAnimationMac::setFromValue(const WebCore::TransformationMatrix& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -359,7 +361,7 @@
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setFromValue:[NSValue valueWithCATransform3D:value]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFromValue(const FloatPoint3D& value)
</del><ins>+void PlatformCAAnimationMac::setFromValue(const FloatPoint3D& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -372,7 +374,7 @@
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setFromValue:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFromValue(const WebCore::Color& value)
</del><ins>+void PlatformCAAnimationMac::setFromValue(const WebCore::Color& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -387,30 +389,30 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>-void PlatformCAAnimation::setFromValue(const FilterOperation* operation, int internalFilterPropertyIndex)
</del><ins>+void PlatformCAAnimationMac::setFromValue(const FilterOperation* operation, int internalFilterPropertyIndex)
</ins><span class="cx"> {
</span><span class="cx"> RetainPtr<id> value = PlatformCAFilters::filterValueForOperation(operation, internalFilterPropertyIndex);
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setFromValue:value.get()];
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyFromValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyFromValueFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic || value->animationType() != Basic)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CABasicAnimation* otherAnimation = static_cast<CABasicAnimation*>(value->m_animation.get());
</del><ins>+ CABasicAnimation* otherAnimation = static_cast<CABasicAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</ins><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setFromValue:[otherAnimation fromValue]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setToValue(float value)
</del><ins>+void PlatformCAAnimationMac::setToValue(float value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setToValue:[NSNumber numberWithDouble:value]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setToValue(const WebCore::TransformationMatrix& value)
</del><ins>+void PlatformCAAnimationMac::setToValue(const WebCore::TransformationMatrix& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -418,7 +420,7 @@
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setToValue:[NSValue valueWithCATransform3D:value]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setToValue(const FloatPoint3D& value)
</del><ins>+void PlatformCAAnimationMac::setToValue(const FloatPoint3D& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -431,7 +433,7 @@
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setToValue:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setToValue(const WebCore::Color& value)
</del><ins>+void PlatformCAAnimationMac::setToValue(const WebCore::Color& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -446,25 +448,25 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>-void PlatformCAAnimation::setToValue(const FilterOperation* operation, int internalFilterPropertyIndex)
</del><ins>+void PlatformCAAnimationMac::setToValue(const FilterOperation* operation, int internalFilterPropertyIndex)
</ins><span class="cx"> {
</span><span class="cx"> RetainPtr<id> value = PlatformCAFilters::filterValueForOperation(operation, internalFilterPropertyIndex);
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setToValue:value.get()];
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyToValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyToValueFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic || value->animationType() != Basic)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CABasicAnimation* otherAnimation = static_cast<CABasicAnimation*>(value->m_animation.get());
</del><ins>+ CABasicAnimation* otherAnimation = static_cast<CABasicAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</ins><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setToValue:[otherAnimation toValue]];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> // Keyframe-animation properties.
</span><del>-void PlatformCAAnimation::setValues(const Vector<float>& value)
</del><ins>+void PlatformCAAnimationMac::setValues(const Vector<float>& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -475,7 +477,7 @@
</span><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setValues:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setValues(const Vector<WebCore::TransformationMatrix>& value)
</del><ins>+void PlatformCAAnimationMac::setValues(const Vector<WebCore::TransformationMatrix>& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -488,7 +490,7 @@
</span><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setValues:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setValues(const Vector<FloatPoint3D>& value)
</del><ins>+void PlatformCAAnimationMac::setValues(const Vector<FloatPoint3D>& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -506,7 +508,7 @@
</span><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setValues:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setValues(const Vector<WebCore::Color>& value)
</del><ins>+void PlatformCAAnimationMac::setValues(const Vector<WebCore::Color>& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -526,7 +528,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>-void PlatformCAAnimation::setValues(const Vector<RefPtr<FilterOperation>>& values, int internalFilterPropertyIndex)
</del><ins>+void PlatformCAAnimationMac::setValues(const Vector<RefPtr<FilterOperation>>& values, int internalFilterPropertyIndex)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -541,16 +543,16 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyValuesFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyValuesFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe || value->animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CAKeyframeAnimation* otherAnimation = static_cast<CAKeyframeAnimation*>(value->m_animation.get());
</del><ins>+ CAKeyframeAnimation* otherAnimation = static_cast<CAKeyframeAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</ins><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setValues:[otherAnimation values]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setKeyTimes(const Vector<float>& value)
</del><ins>+void PlatformCAAnimationMac::setKeyTimes(const Vector<float>& value)
</ins><span class="cx"> {
</span><span class="cx"> NSMutableArray* array = [NSMutableArray array];
</span><span class="cx">
</span><span class="lines">@@ -560,13 +562,13 @@
</span><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setKeyTimes:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyKeyTimesFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyKeyTimesFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><del>- CAKeyframeAnimation* other = static_cast<CAKeyframeAnimation*>(value->m_animation.get());
</del><ins>+ CAKeyframeAnimation* other = static_cast<CAKeyframeAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</ins><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setKeyTimes:[other keyTimes]];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setTimingFunctions(const Vector<const TimingFunction*>& value, bool reverse)
</del><ins>+void PlatformCAAnimationMac::setTimingFunctions(const Vector<const TimingFunction*>& value, bool reverse)
</ins><span class="cx"> {
</span><span class="cx"> NSMutableArray* array = [NSMutableArray array];
</span><span class="cx">
</span><span class="lines">@@ -576,8 +578,8 @@
</span><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setTimingFunctions:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyTimingFunctionsFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyTimingFunctionsFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><del>- CAKeyframeAnimation* other = static_cast<CAKeyframeAnimation*>(value->m_animation.get());
</del><ins>+ CAKeyframeAnimation* other = static_cast<CAKeyframeAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</ins><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setTimingFunctions:[other timingFunctions]];
</span><span class="cx"> }
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscamacPlatformCALayerMacmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #import "GraphicsContext.h"
</span><span class="cx"> #import "GraphicsLayerCA.h"
</span><span class="cx"> #import "LengthFunctions.h"
</span><ins>+#import "PlatformCAAnimationMac.h"
</ins><span class="cx"> #import "PlatformCAFilters.h"
</span><span class="cx"> #import "PlatformCAFiltersMac.h"
</span><span class="cx"> #import "ScrollbarThemeMac.h"
</span><span class="lines">@@ -395,12 +396,12 @@
</span><span class="cx"> [webAnimationDelegate setOwner:this];
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CAPropertyAnimation* propertyAnimation = static_cast<CAPropertyAnimation*>(animation->platformAnimation());
</del><ins>+ CAPropertyAnimation* propertyAnimation = static_cast<CAPropertyAnimation*>(toPlatformCAAnimationMac(animation)->platformAnimation());
</ins><span class="cx"> if (![propertyAnimation delegate])
</span><span class="cx"> [propertyAnimation setDelegate:static_cast<id>(m_delegate.get())];
</span><span class="cx">
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS
</span><del>- [m_layer.get() addAnimation:animation->m_animation.get() forKey:key];
</del><ins>+ [m_layer.get() addAnimation:propertyAnimation forKey:key];
</ins><span class="cx"> END_BLOCK_OBJC_EXCEPTIONS
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -416,7 +417,7 @@
</span><span class="cx"> CAPropertyAnimation* propertyAnimation = static_cast<CAPropertyAnimation*>([m_layer.get() animationForKey:key]);
</span><span class="cx"> if (!propertyAnimation)
</span><span class="cx"> return 0;
</span><del>- return PlatformCAAnimation::create(propertyAnimation);
</del><ins>+ return PlatformCAAnimationMac::create(propertyAnimation);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlatformCALayerMac::setMask(PlatformCALayer* layer)
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscamacTileControllermm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/TileController.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/TileController.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/mac/TileController.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "TileController.h"
</span><span class="cx">
</span><ins>+#import "GraphicsContext.h"
</ins><span class="cx"> #import "IntRect.h"
</span><span class="cx"> #import "PlatformCALayer.h"
</span><span class="cx"> #import "Region.h"
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscawinPlatformCAAnimationWincpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.cpp (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.cpp        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.cpp        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2014 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -25,7 +25,8 @@
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><span class="cx">
</span><del>-#include "PlatformCAAnimation.h"
</del><ins>+#if PLATFORM(WIN)
+#include "PlatformCAAnimationWin.h"
</ins><span class="cx">
</span><span class="cx"> #include "FloatConversion.h"
</span><span class="cx"> #include "TimingFunction.h"
</span><span class="lines">@@ -141,18 +142,18 @@
</span><span class="cx"> return CACFTimingFunctionGetFunctionWithName(kCACFTimingFunctionLinear);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<PlatformCAAnimation> PlatformCAAnimation::create(AnimationType type, const String& keyPath)
</del><ins>+PassRefPtr<PlatformCAAnimation> PlatformCAAnimationWin::create(AnimationType type, const String& keyPath)
</ins><span class="cx"> {
</span><del>- return adoptRef(new PlatformCAAnimation(type, keyPath));
</del><ins>+ return adoptRef(new PlatformCAAnimationWin(type, keyPath));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<PlatformCAAnimation> PlatformCAAnimation::create(PlatformAnimationRef animation)
</del><ins>+PassRefPtr<PlatformCAAnimation> PlatformCAAnimationWin::create(PlatformAnimationRef animation)
</ins><span class="cx"> {
</span><del>- return adoptRef(new PlatformCAAnimation(animation));
</del><ins>+ return adoptRef(new PlatformCAAnimationWin(animation));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformCAAnimation::PlatformCAAnimation(AnimationType type, const String& keyPath)
- : m_type(type)
</del><ins>+PlatformCAAnimationWin::PlatformCAAnimationWin(AnimationType type, const String& keyPath)
+ : PlatformCAAnimation(type)
</ins><span class="cx"> {
</span><span class="cx"> if (type == Basic)
</span><span class="cx"> m_animation = adoptCF(CACFAnimationCreate(kCACFBasicAnimation));
</span><span class="lines">@@ -162,12 +163,12 @@
</span><span class="cx"> CACFAnimationSetKeyPath(m_animation.get(), keyPath.createCFString().get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformCAAnimation::PlatformCAAnimation(PlatformAnimationRef animation)
</del><ins>+PlatformCAAnimationWin::PlatformCAAnimationWin(PlatformAnimationRef animation)
</ins><span class="cx"> {
</span><span class="cx"> if (CACFAnimationGetClass(animation) == kCACFBasicAnimation)
</span><del>- m_type = Basic;
</del><ins>+ setType(Basic);
</ins><span class="cx"> else if (CACFAnimationGetClass(animation) == kCACFKeyframeAnimation)
</span><del>- m_type = Keyframe;
</del><ins>+ setType(Keyframe);
</ins><span class="cx"> else {
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return;
</span><span class="lines">@@ -176,7 +177,7 @@
</span><span class="cx"> m_animation = animation;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<PlatformCAAnimation> PlatformCAAnimation::copy() const
</del><ins>+PassRefPtr<PlatformCAAnimation> PlatformCAAnimationWin::copy() const
</ins><span class="cx"> {
</span><span class="cx"> RefPtr<PlatformCAAnimation> animation = create(animationType(), keyPath());
</span><span class="cx">
</span><span class="lines">@@ -206,136 +207,136 @@
</span><span class="cx"> return animation;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformCAAnimation::~PlatformCAAnimation()
</del><ins>+PlatformCAAnimationWin::~PlatformCAAnimationWin()
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformAnimationRef PlatformCAAnimation::platformAnimation() const
</del><ins>+PlatformAnimationRef PlatformCAAnimationWin::platformAnimation() const
</ins><span class="cx"> {
</span><span class="cx"> return m_animation.get();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-String PlatformCAAnimation::keyPath() const
</del><ins>+String PlatformCAAnimationWin::keyPath() const
</ins><span class="cx"> {
</span><span class="cx"> return CACFAnimationGetKeyPath(m_animation.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CFTimeInterval PlatformCAAnimation::beginTime() const
</del><ins>+CFTimeInterval PlatformCAAnimationWin::beginTime() const
</ins><span class="cx"> {
</span><span class="cx"> return CACFAnimationGetBeginTime(m_animation.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setBeginTime(CFTimeInterval value)
</del><ins>+void PlatformCAAnimationWin::setBeginTime(CFTimeInterval value)
</ins><span class="cx"> {
</span><span class="cx"> CACFAnimationSetBeginTime(m_animation.get(), value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CFTimeInterval PlatformCAAnimation::duration() const
</del><ins>+CFTimeInterval PlatformCAAnimationWin::duration() const
</ins><span class="cx"> {
</span><span class="cx"> return CACFAnimationGetDuration(m_animation.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setDuration(CFTimeInterval value)
</del><ins>+void PlatformCAAnimationWin::setDuration(CFTimeInterval value)
</ins><span class="cx"> {
</span><span class="cx"> CACFAnimationSetDuration(m_animation.get(), value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float PlatformCAAnimation::speed() const
</del><ins>+float PlatformCAAnimationWin::speed() const
</ins><span class="cx"> {
</span><span class="cx"> return CACFAnimationGetSpeed(m_animation.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setSpeed(float value)
</del><ins>+void PlatformCAAnimationWin::setSpeed(float value)
</ins><span class="cx"> {
</span><span class="cx"> CACFAnimationSetSpeed(m_animation.get(), value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-CFTimeInterval PlatformCAAnimation::timeOffset() const
</del><ins>+CFTimeInterval PlatformCAAnimationWin::timeOffset() const
</ins><span class="cx"> {
</span><span class="cx"> return CACFAnimationGetTimeOffset(m_animation.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setTimeOffset(CFTimeInterval value)
</del><ins>+void PlatformCAAnimationWin::setTimeOffset(CFTimeInterval value)
</ins><span class="cx"> {
</span><span class="cx"> CACFAnimationSetTimeOffset(m_animation.get(), value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-float PlatformCAAnimation::repeatCount() const
</del><ins>+float PlatformCAAnimationWin::repeatCount() const
</ins><span class="cx"> {
</span><span class="cx"> return CACFAnimationGetRepeatCount(m_animation.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setRepeatCount(float value)
</del><ins>+void PlatformCAAnimationWin::setRepeatCount(float value)
</ins><span class="cx"> {
</span><span class="cx"> CACFAnimationSetRepeatCount(m_animation.get(), value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool PlatformCAAnimation::autoreverses() const
</del><ins>+bool PlatformCAAnimationWin::autoreverses() const
</ins><span class="cx"> {
</span><span class="cx"> return CACFAnimationGetAutoreverses(m_animation.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setAutoreverses(bool value)
</del><ins>+void PlatformCAAnimationWin::setAutoreverses(bool value)
</ins><span class="cx"> {
</span><span class="cx"> CACFAnimationSetAutoreverses(m_animation.get(), value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformCAAnimation::FillModeType PlatformCAAnimation::fillMode() const
</del><ins>+PlatformCAAnimationWin::FillModeType PlatformCAAnimationWin::fillMode() const
</ins><span class="cx"> {
</span><span class="cx"> return fromCACFFillModeType(CACFAnimationGetFillMode(m_animation.get()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFillMode(FillModeType value)
</del><ins>+void PlatformCAAnimationWin::setFillMode(FillModeType value)
</ins><span class="cx"> {
</span><span class="cx"> CACFAnimationSetFillMode(m_animation.get(), toCACFFillModeType(value));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setTimingFunction(const TimingFunction* value, bool reverse)
</del><ins>+void PlatformCAAnimationWin::setTimingFunction(const TimingFunction* value, bool reverse)
</ins><span class="cx"> {
</span><span class="cx"> UNUSED_PARAM(reverse);
</span><span class="cx"> CACFAnimationSetTimingFunction(m_animation.get(), toCACFTimingFunction(value, reverse).get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyTimingFunctionFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyTimingFunctionFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><del>- CACFTimingFunctionRef timingFunc = CACFAnimationGetTimingFunction(value->m_animation.get());
</del><ins>+ CACFTimingFunctionRef timingFunc = CACFAnimationGetTimingFunction(toPlatformCAAnimationWin(value)->m_animation.get());
</ins><span class="cx"> if (timingFunc)
</span><span class="cx"> CACFAnimationSetTimingFunction(m_animation.get(), timingFunc);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool PlatformCAAnimation::isRemovedOnCompletion() const
</del><ins>+bool PlatformCAAnimationWin::isRemovedOnCompletion() const
</ins><span class="cx"> {
</span><span class="cx"> return CACFAnimationIsRemovedOnCompletion(m_animation.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setRemovedOnCompletion(bool value)
</del><ins>+void PlatformCAAnimationWin::setRemovedOnCompletion(bool value)
</ins><span class="cx"> {
</span><span class="cx"> CACFAnimationSetRemovedOnCompletion(m_animation.get(), value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool PlatformCAAnimation::isAdditive() const
</del><ins>+bool PlatformCAAnimationWin::isAdditive() const
</ins><span class="cx"> {
</span><span class="cx"> return CACFAnimationIsAdditive(m_animation.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setAdditive(bool value)
</del><ins>+void PlatformCAAnimationWin::setAdditive(bool value)
</ins><span class="cx"> {
</span><span class="cx"> CACFAnimationSetAdditive(m_animation.get(), value);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PlatformCAAnimation::ValueFunctionType PlatformCAAnimation::valueFunction() const
</del><ins>+PlatformCAAnimation::ValueFunctionType PlatformCAAnimationWin::valueFunction() const
</ins><span class="cx"> {
</span><span class="cx"> CACFValueFunctionRef func = CACFAnimationGetValueFunction(m_animation.get());
</span><span class="cx"> return func ? fromCACFValueFunctionType(CACFValueFunctionGetName(func)) : NoValueFunction;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setValueFunction(ValueFunctionType value)
</del><ins>+void PlatformCAAnimationWin::setValueFunction(ValueFunctionType value)
</ins><span class="cx"> {
</span><span class="cx"> CFStringRef valueString = toCACFValueFunctionType(value);
</span><span class="cx"> CACFAnimationSetValueFunction(m_animation.get(), valueString ? CACFValueFunctionGetFunctionWithName(valueString) : 0);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFromValue(float value)
</del><ins>+void PlatformCAAnimationWin::setFromValue(float value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -344,7 +345,7 @@
</span><span class="cx"> CACFAnimationSetFromValue(m_animation.get(), v.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFromValue(const WebCore::TransformationMatrix& value)
</del><ins>+void PlatformCAAnimationWin::setFromValue(const WebCore::TransformationMatrix& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -353,7 +354,7 @@
</span><span class="cx"> CACFAnimationSetFromValue(m_animation.get(), v.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFromValue(const FloatPoint3D& value)
</del><ins>+void PlatformCAAnimationWin::setFromValue(const FloatPoint3D& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -363,7 +364,7 @@
</span><span class="cx"> CACFAnimationSetFromValue(m_animation.get(), v.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setFromValue(const WebCore::Color& value)
</del><ins>+void PlatformCAAnimationWin::setFromValue(const WebCore::Color& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -374,21 +375,21 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>-void PlatformCAAnimation::setFromValue(const FilterOperation*, int)
</del><ins>+void PlatformCAAnimationWin::setFromValue(const FilterOperation*, int)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Hardware filter animation not implemented on Windows
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyFromValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyFromValueFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic || value->animationType() != Basic)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CACFAnimationSetFromValue(m_animation.get(), CACFAnimationGetFromValue(value->platformAnimation()));
</del><ins>+ CACFAnimationSetFromValue(m_animation.get(), CACFAnimationGetFromValue(toPlatformCAAnimationWin(value)->platformAnimation()));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setToValue(float value)
</del><ins>+void PlatformCAAnimationWin::setToValue(float value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -397,7 +398,7 @@
</span><span class="cx"> CACFAnimationSetToValue(m_animation.get(), v.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setToValue(const WebCore::TransformationMatrix& value)
</del><ins>+void PlatformCAAnimationWin::setToValue(const WebCore::TransformationMatrix& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -406,7 +407,7 @@
</span><span class="cx"> CACFAnimationSetToValue(m_animation.get(), v.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setToValue(const FloatPoint3D& value)
</del><ins>+void PlatformCAAnimationWin::setToValue(const FloatPoint3D& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -416,7 +417,7 @@
</span><span class="cx"> CACFAnimationSetToValue(m_animation.get(), v.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setToValue(const WebCore::Color& value)
</del><ins>+void PlatformCAAnimationWin::setToValue(const WebCore::Color& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic)
</span><span class="cx"> return;
</span><span class="lines">@@ -427,23 +428,22 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>-void PlatformCAAnimation::setToValue(const FilterOperation*, int)
</del><ins>+void PlatformCAAnimationWin::setToValue(const FilterOperation*, int)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Hardware filter animation not implemented on Windows
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyToValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyToValueFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Basic || value->animationType() != Basic)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CACFAnimationSetToValue(m_animation.get(), CACFAnimationGetToValue(value->platformAnimation()));
</del><ins>+ CACFAnimationSetToValue(m_animation.get(), CACFAnimationGetToValue(toPlatformCAAnimationWin(value)->platformAnimation()));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> // Keyframe-animation properties.
</span><del>-void PlatformCAAnimation::setValues(const Vector<float>& value)
</del><ins>+void PlatformCAAnimationWin::setValues(const Vector<float>& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -457,7 +457,7 @@
</span><span class="cx"> CACFAnimationSetValues(m_animation.get(), array.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setValues(const Vector<WebCore::TransformationMatrix>& value)
</del><ins>+void PlatformCAAnimationWin::setValues(const Vector<WebCore::TransformationMatrix>& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -471,7 +471,7 @@
</span><span class="cx"> CACFAnimationSetValues(m_animation.get(), array.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setValues(const Vector<FloatPoint3D>& value)
</del><ins>+void PlatformCAAnimationWin::setValues(const Vector<FloatPoint3D>& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -486,7 +486,7 @@
</span><span class="cx"> CACFAnimationSetValues(m_animation.get(), array.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setValues(const Vector<WebCore::Color>& value)
</del><ins>+void PlatformCAAnimationWin::setValues(const Vector<WebCore::Color>& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -502,21 +502,21 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>-void PlatformCAAnimation::setValues(const Vector<RefPtr<FilterOperation> >&, int)
</del><ins>+void PlatformCAAnimationWin::setValues(const Vector<RefPtr<FilterOperation> >&, int)
</ins><span class="cx"> {
</span><span class="cx"> // FIXME: Hardware filter animation not implemented on Windows
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyValuesFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyValuesFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe || value->animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CACFAnimationSetValues(m_animation.get(), CACFAnimationGetValues(value->platformAnimation()));
</del><ins>+ CACFAnimationSetValues(m_animation.get(), CACFAnimationGetValues(toPlatformCAAnimationWin(value)->platformAnimation()));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setKeyTimes(const Vector<float>& value)
</del><ins>+void PlatformCAAnimationWin::setKeyTimes(const Vector<float>& value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="lines">@@ -530,15 +530,15 @@
</span><span class="cx"> CACFAnimationSetKeyTimes(m_animation.get(), array.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyKeyTimesFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyKeyTimesFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- CACFAnimationSetKeyTimes(m_animation.get(), CACFAnimationGetKeyTimes(value->platformAnimation()));
</del><ins>+ CACFAnimationSetKeyTimes(m_animation.get(), CACFAnimationGetKeyTimes(toPlatformCAAnimationWin(value)->platformAnimation()));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::setTimingFunctions(const Vector<const TimingFunction*>& value, bool reverse)
</del><ins>+void PlatformCAAnimationWin::setTimingFunctions(const Vector<const TimingFunction*>& value, bool reverse)
</ins><span class="cx"> {
</span><span class="cx"> UNUSED_PARAM(reverse);
</span><span class="cx"> if (animationType() != Keyframe)
</span><span class="lines">@@ -553,7 +553,9 @@
</span><span class="cx"> CACFAnimationSetTimingFunctions(m_animation.get(), array.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimation::copyTimingFunctionsFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyTimingFunctionsFrom(const PlatformCAAnimation* value)
</ins><span class="cx"> {
</span><del>- CACFAnimationSetTimingFunctions(m_animation.get(), CACFAnimationGetTimingFunctions(value->platformAnimation()));
</del><ins>+ CACFAnimationSetTimingFunctions(m_animation.get(), CACFAnimationGetTimingFunctions(toPlatformCAAnimationWin(value)->platformAnimation()));
</ins><span class="cx"> }
</span><ins>+
+#endif // PLATFORM(WIN)
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscawinPlatformCAAnimationWinhfromrev166542trunkSourceWebCoreplatformgraphicscawinPlatformCAAnimationWinh"></a>
<div class="copfile"><h4>Copied: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h (from rev 166542, trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h) (0 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h         (rev 0)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -0,0 +1,136 @@
</span><ins>+/*
+ * Copyright (C) 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 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 PlatformCAAnimationWin_h
+#define PlatformCAAnimationWin_h
+
+#if PLATFORM(WIN)
+
+#include "PlatformCAAnimation.h"
+#include <wtf/RetainPtr.h>
+
+typedef struct _CACFAnimation* CACFAnimationRef;
+typedef CACFAnimationRef PlatformAnimationRef;
+
+namespace WebCore {
+
+class PlatformCAAnimationWin final : public PlatformCAAnimation {
+public:
+ static PassRefPtr<PlatformCAAnimation> create(AnimationType, const String& keyPath);
+ static PassRefPtr<PlatformCAAnimation> create(PlatformAnimationRef);
+
+ virtual ~PlatformCAAnimationWin();
+
+ virtual bool isPlatformCAAnimationWin() const override { return true; }
+
+ virtual PassRefPtr<PlatformCAAnimation> copy() const override;
+
+ PlatformAnimationRef platformAnimation() const;
+
+ virtual String keyPath() const override;
+
+ virtual CFTimeInterval beginTime() const override;
+ virtual void setBeginTime(CFTimeInterval) override;
+
+ virtual CFTimeInterval duration() const override;
+ virtual void setDuration(CFTimeInterval) override;
+
+ virtual float speed() const override;
+ virtual void setSpeed(float) override;
+
+ virtual CFTimeInterval timeOffset() const override;
+ virtual void setTimeOffset(CFTimeInterval) override;
+
+ virtual float repeatCount() const override;
+ virtual void setRepeatCount(float) override;
+
+ virtual bool autoreverses() const override;
+ virtual void setAutoreverses(bool) override;
+
+ virtual FillModeType fillMode() const override;
+ virtual void setFillMode(FillModeType) override;
+
+ virtual void setTimingFunction(const TimingFunction*, bool reverse = false) override;
+ void copyTimingFunctionFrom(const PlatformCAAnimation*) override;
+
+ virtual bool isRemovedOnCompletion() const override;
+ virtual void setRemovedOnCompletion(bool) override;
+
+ virtual bool isAdditive() const override;
+ virtual void setAdditive(bool) override;
+
+ virtual ValueFunctionType valueFunction() const override;
+ virtual void setValueFunction(ValueFunctionType) override;
+
+ // Basic-animation properties.
+ virtual void setFromValue(float) override;
+ virtual void setFromValue(const WebCore::TransformationMatrix&) override;
+ virtual void setFromValue(const FloatPoint3D&) override;
+ virtual void setFromValue(const WebCore::Color&) override;
+#if ENABLE(CSS_FILTERS)
+ virtual void setFromValue(const FilterOperation*, int internalFilterPropertyIndex) override;
+#endif
+ virtual void copyFromValueFrom(const PlatformCAAnimation*) override;
+
+ virtual void setToValue(float) override;
+ virtual void setToValue(const WebCore::TransformationMatrix&) override;
+ virtual void setToValue(const FloatPoint3D&) override;
+ virtual void setToValue(const WebCore::Color&) override;
+#if ENABLE(CSS_FILTERS)
+ virtual void setToValue(const FilterOperation*, int internalFilterPropertyIndex) override;
+#endif
+ virtual void copyToValueFrom(const PlatformCAAnimation*) override;
+
+ // Keyframe-animation properties.
+ virtual void setValues(const Vector<float>&) override;
+ virtual void setValues(const Vector<WebCore::TransformationMatrix>&) override;
+ virtual void setValues(const Vector<FloatPoint3D>&) override;
+ virtual void setValues(const Vector<WebCore::Color>&) override;
+#if ENABLE(CSS_FILTERS)
+ virtual void setValues(const Vector<RefPtr<FilterOperation>>&, int internalFilterPropertyIndex) override;
+#endif
+ virtual void copyValuesFrom(const PlatformCAAnimation*) override;
+
+ virtual void setKeyTimes(const Vector<float>&) override;
+ virtual void copyKeyTimesFrom(const PlatformCAAnimation*) override;
+
+ virtual void setTimingFunctions(const Vector<const TimingFunction*>&, bool reverse = false) override;
+ virtual void copyTimingFunctionsFrom(const PlatformCAAnimation*) override;
+
+protected:
+ PlatformCAAnimationWin(AnimationType, const String& keyPath);
+ PlatformCAAnimationWin(PlatformAnimationRef);
+
+private:
+ RetainPtr<CACFAnimationRef> m_animation;
+};
+
+PLATFORM_CAANIMATION_TYPE_CASTS(PlatformCAAnimationWin, isPlatformCAAnimationWin())
+
+}
+
+#endif // PLATFORM(WIN)
+
+#endif // PlatformCAAnimationWin_h
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscawinPlatformCALayerWincpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include "AbstractCACFLayerTreeHost.h"
</span><span class="cx"> #include "Font.h"
</span><span class="cx"> #include "GraphicsContext.h"
</span><ins>+#include "PlatformCAAnimationWin.h"
</ins><span class="cx"> #include "PlatformCALayerWinInternal.h"
</span><span class="cx"> #include <QuartzCore/CoreAnimationCF.h>
</span><span class="cx"> #include <WebKitSystemInterface/WebKitSystemInterface.h>
</span><span class="lines">@@ -284,7 +285,7 @@
</span><span class="cx"> // Add it to the animation list
</span><span class="cx"> m_animations.add(key, animation);
</span><span class="cx">
</span><del>- CACFLayerAddAnimation(m_layer.get(), key.createCFString().get(), animation->platformAnimation());
</del><ins>+ CACFLayerAddAnimation(m_layer.get(), key.createCFString().get(), toPlatformCAAnimationWin(animation)->platformAnimation());
</ins><span class="cx"> setNeedsCommit();
</span><span class="cx">
</span><span class="cx"> // Tell the host about it so we can fire the start animation event
</span></span></pre></div>
<a id="tagsSafari538263SourceWebCoreplatformgraphicscawinPlatformCALayerWinInternalcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">
</span><span class="cx"> #include "Font.h"
</span><span class="cx"> #include "FontCache.h"
</span><ins>+#include "GraphicsContext.h"
</ins><span class="cx"> #include "PlatformCALayer.h"
</span><span class="cx"> #include "TextRun.h"
</span><span class="cx"> #include <QuartzCore/CACFLayer.h>
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/ChangeLog (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/ChangeLog        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/ChangeLog        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -1,5 +1,108 @@
</span><span class="cx"> 2014-04-04 Lucas Forschler <lforschler@apple.com>
</span><span class="cx">
</span><ins>+ Merge r166542
+
+ 2014-03-31 Simon Fraser <simon.fraser@apple.com>
+
+ [UI-side compositing] Proxy animations to the UI process
+ https://bugs.webkit.org/show_bug.cgi?id=130946
+
+ Reviewed by Tim Horton.
+
+ Add encoding/decoding of TimingFunctions. Add encoding support
+ for HashSet.
+
+ Add PlatformCAAnimationRemote and have PlatformCALayerRemote allow
+ animations now. PlatformCALayerRemote's properties are defined in the class,
+ as is the encoding/decoding (much cleaner than having them in the transaction
+ class I think).
+
+ Add support for the "animationDidStart" callback and sending this back to the
+ web process. This involves a HashMap of layerID->WKAnimationDelegate stored
+ on the RemoteLayerTreeHost, and a message send via the DrawingArea. On the
+ other side, RemoteLayerTreeContext stores a HashMap of layerID->PlatformCALayerRemote*
+ for layers which have just started animations, which is used to get the
+ PlatformCALayer* to call animationDidStart() on.
+
+ This requires that the RemoteLayerTreeHost* be passed down into property application,
+ and that the RemoteLayerTreeHost have a reference to the drawing area.
+
+ To every CALayer in the UI process we -setValue:forKey: to track the PlatformLayerID,
+ so we can get back to it in order to dispatch "animationDidStart".
+
+ Replace some "using namespace WebKit" with "namespace WebKit { }".
+
+ * Platform/IPC/ArgumentCoders.h:
+ * Shared/WebCoreArgumentCoders.cpp:
+ (IPC::ArgumentCoder<LinearTimingFunction>::encode):
+ (IPC::ArgumentCoder<LinearTimingFunction>::decode):
+ (IPC::ArgumentCoder<CubicBezierTimingFunction>::encode):
+ (IPC::ArgumentCoder<CubicBezierTimingFunction>::decode):
+ (IPC::ArgumentCoder<StepsTimingFunction>::encode):
+ (IPC::ArgumentCoder<StepsTimingFunction>::decode):
+ * Shared/WebCoreArgumentCoders.h:
+ * Shared/mac/RemoteLayerBackingStore.mm:
+ * Shared/mac/RemoteLayerTreePropertyApplier.h:
+ * Shared/mac/RemoteLayerTreePropertyApplier.mm:
+ (WebKit::applyPropertiesToLayer):
+ (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
+ * Shared/mac/RemoteLayerTreeTransaction.h:
+ * Shared/mac/RemoteLayerTreeTransaction.mm:
+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
+ (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
+ (WebKit::dumpChangedLayers):
+ * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
+ (WebKit::RemoteLayerTreeHost::layerID):
+ (WebKit::RemoteLayerTreeHost::createLayer):
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
+ * UIProcess/mac/RemoteLayerTreeHost.h:
+ (WebKit::RemoteLayerTreeHost::animationDelegates):
+ * UIProcess/mac/RemoteLayerTreeHost.mm:
+ (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
+ (WebKit::RemoteLayerTreeHost::updateLayerTree):
+ (WebKit::RemoteLayerTreeHost::layerWillBeRemoved):
+ (WebKit::RemoteLayerTreeHost::animationDidStart):
+ (WebKit::RemoteLayerTreeHost::layerID):
+ (WebKit::RemoteLayerTreeHost::createLayer):
+ * WebKit2.xcodeproj/project.pbxproj:
+ * WebProcess/WebPage/DrawingArea.h:
+ (WebKit::DrawingArea::acceleratedAnimationDidStart):
+ * WebProcess/WebPage/DrawingArea.messages.in:
+ * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
+ (WebKit::GraphicsLayerCARemote::createPlatformCAAnimation):
+ * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
+ * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h: Added.
+ * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: Added.
+ * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+ (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
+ (WebKit::PlatformCALayerRemote::animationStarted):
+ (WebKit::PlatformCALayerRemote::addAnimationForKey):
+ (WebKit::PlatformCALayerRemote::removeAnimationForKey):
+ (WebKit::PlatformCALayerRemote::animationForKey):
+ (PlatformCALayerRemote::recursiveBuildTransaction): Deleted.
+ (PlatformCALayerRemote::addAnimationForKey): Deleted.
+ (PlatformCALayerRemote::removeAnimationForKey): Deleted.
+ (PlatformCALayerRemote::animationForKey): Deleted.
+ * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
+ * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
+ * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
+ * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
+ (WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
+ (WebKit::RemoteLayerTreeContext::willStartAnimationOnLayer):
+ (WebKit::RemoteLayerTreeContext::animationDidStart):
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
+
+2014-04-04 Lucas Forschler <lforschler@apple.com>
+
</ins><span class="cx"> Merge r166516
</span><span class="cx">
</span><span class="cx"> 2014-03-31 Tim Horton <timothy_horton@apple.com>
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2PlatformIPCArgumentCodersh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/Platform/IPC/ArgumentCoders.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/Platform/IPC/ArgumentCoders.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/Platform/IPC/ArgumentCoders.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include <utility>
</span><span class="cx"> #include <wtf/Forward.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><ins>+#include <wtf/HashSet.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace IPC {
</span><span class="lines">@@ -193,6 +194,40 @@
</span><span class="cx"> }
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+template<typename KeyArg, typename HashArg, typename KeyTraitsArg> struct ArgumentCoder<HashSet<KeyArg, HashArg, KeyTraitsArg>> {
+ typedef HashSet<KeyArg, HashArg, KeyTraitsArg> HashSetType;
+
+ static void encode(ArgumentEncoder& encoder, const HashSetType& hashSet)
+ {
+ encoder << static_cast<uint64_t>(hashSet.size());
+ for (typename HashSetType::const_iterator it = hashSet.begin(), end = hashSet.end(); it != end; ++it)
+ encoder << *it;
+ }
+
+ static bool decode(ArgumentDecoder& decoder, HashSetType& hashSet)
+ {
+ uint64_t hashSetSize;
+ if (!decoder.decode(hashSetSize))
+ return false;
+
+ HashSetType tempHashSet;
+ for (uint64_t i = 0; i < hashSetSize; ++i) {
+ KeyArg key;
+ if (!decoder.decode(key))
+ return false;
+
+ if (!tempHashSet.add(key).isNewEntry) {
+ // The hash map already has the specified key, bail.
+ decoder.markInvalid();
+ return false;
+ }
+ }
+
+ hashSet.swap(tempHashSet);
+ return true;
+ }
+};
+
</ins><span class="cx"> template<> struct ArgumentCoder<AtomicString> {
</span><span class="cx"> static void encode(ArgumentEncoder&, const AtomicString&);
</span><span class="cx"> static bool decode(ArgumentDecoder&, AtomicString&);
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx"> #include <WebCore/ScrollingCoordinator.h>
</span><span class="cx"> #include <WebCore/SessionID.h>
</span><span class="cx"> #include <WebCore/TextCheckerClient.h>
</span><ins>+#include <WebCore/TimingFunction.h>
</ins><span class="cx"> #include <WebCore/TransformationMatrix.h>
</span><span class="cx"> #include <WebCore/URL.h>
</span><span class="cx"> #include <WebCore/UserScript.h>
</span><span class="lines">@@ -90,7 +91,6 @@
</span><span class="cx"> return SimpleArgumentCoder<AffineTransform>::decode(decoder, affineTransform);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> void ArgumentCoder<TransformationMatrix>::encode(ArgumentEncoder& encoder, const TransformationMatrix& transformationMatrix)
</span><span class="cx"> {
</span><span class="cx"> SimpleArgumentCoder<TransformationMatrix>::encode(encoder, transformationMatrix);
</span><span class="lines">@@ -101,6 +101,83 @@
</span><span class="cx"> return SimpleArgumentCoder<TransformationMatrix>::decode(decoder, transformationMatrix);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void ArgumentCoder<LinearTimingFunction>::encode(ArgumentEncoder& encoder, const LinearTimingFunction& timingFunction)
+{
+ encoder.encodeEnum(timingFunction.type());
+}
+
+bool ArgumentCoder<LinearTimingFunction>::decode(ArgumentDecoder& decoder, LinearTimingFunction& timingFunction)
+{
+ // Type is decoded by the caller. Nothing else to decode.
+ return true;
+}
+
+void ArgumentCoder<CubicBezierTimingFunction>::encode(ArgumentEncoder& encoder, const CubicBezierTimingFunction& timingFunction)
+{
+ encoder.encodeEnum(timingFunction.type());
+
+ encoder << timingFunction.x1();
+ encoder << timingFunction.y1();
+ encoder << timingFunction.x2();
+ encoder << timingFunction.y2();
+
+ encoder.encodeEnum(timingFunction.timingFunctionPreset());
+}
+
+bool ArgumentCoder<CubicBezierTimingFunction>::decode(ArgumentDecoder& decoder, CubicBezierTimingFunction& timingFunction)
+{
+ // Type is decoded by the caller.
+ double x1;
+ if (!decoder.decode(x1))
+ return false;
+
+ double y1;
+ if (!decoder.decode(y1))
+ return false;
+
+ double x2;
+ if (!decoder.decode(x2))
+ return false;
+
+ double y2;
+ if (!decoder.decode(y2))
+ return false;
+
+ CubicBezierTimingFunction::TimingFunctionPreset preset;
+ if (!decoder.decodeEnum(preset))
+ return false;
+
+ timingFunction.setValues(x1, y1, x2, y2);
+ timingFunction.setTimingFunctionPreset(preset);
+
+ return true;
+}
+
+void ArgumentCoder<StepsTimingFunction>::encode(ArgumentEncoder& encoder, const StepsTimingFunction& timingFunction)
+{
+ encoder.encodeEnum(timingFunction.type());
+
+ encoder << timingFunction.numberOfSteps();
+ encoder << timingFunction.stepAtStart();
+}
+
+bool ArgumentCoder<StepsTimingFunction>::decode(ArgumentDecoder& decoder, StepsTimingFunction& timingFunction)
+{
+ // Type is decoded by the caller.
+ int numSteps;
+ if (!decoder.decode(numSteps))
+ return false;
+
+ bool stepAtStart;
+ if (!decoder.decode(stepAtStart))
+ return false;
+
+ timingFunction.setNumberOfSteps(numSteps);
+ timingFunction.setStepAtStart(stepAtStart);
+
+ return true;
+}
+
</ins><span class="cx"> void ArgumentCoder<FloatPoint>::encode(ArgumentEncoder& encoder, const FloatPoint& floatPoint)
</span><span class="cx"> {
</span><span class="cx"> SimpleArgumentCoder<FloatPoint>::encode(encoder, floatPoint);
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2SharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/Shared/WebCoreArgumentCoders.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> class CertificateInfo;
</span><span class="cx"> class Color;
</span><span class="cx"> class Credential;
</span><ins>+class CubicBezierTimingFunction;
</ins><span class="cx"> class Cursor;
</span><span class="cx"> class DatabaseDetails;
</span><span class="cx"> class FilterOperations;
</span><span class="lines">@@ -48,7 +49,7 @@
</span><span class="cx"> class IntRect;
</span><span class="cx"> class IntSize;
</span><span class="cx"> class KeyframeValueList;
</span><del>-class URL;
</del><ins>+class LinearTimingFunction;
</ins><span class="cx"> class Notification;
</span><span class="cx"> class ProtectionSpace;
</span><span class="cx"> class Region;
</span><span class="lines">@@ -56,11 +57,13 @@
</span><span class="cx"> class ResourceRequest;
</span><span class="cx"> class ResourceResponse;
</span><span class="cx"> class SessionID;
</span><ins>+class StepsTimingFunction;
</ins><span class="cx"> class StickyPositionViewportConstraints;
</span><span class="cx"> class TextCheckingRequestData;
</span><span class="cx"> class TransformationMatrix;
</span><span class="cx"> class UserStyleSheet;
</span><span class="cx"> class UserScript;
</span><ins>+class URL;
</ins><span class="cx"> struct CompositionUnderline;
</span><span class="cx"> struct Cookie;
</span><span class="cx"> struct DictationAlternative;
</span><span class="lines">@@ -112,6 +115,21 @@
</span><span class="cx"> static bool decode(ArgumentDecoder&, WebCore::TransformationMatrix&);
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+template<> struct ArgumentCoder<WebCore::LinearTimingFunction> {
+ static void encode(ArgumentEncoder&, const WebCore::LinearTimingFunction&);
+ static bool decode(ArgumentDecoder&, WebCore::LinearTimingFunction&);
+};
+
+template<> struct ArgumentCoder<WebCore::CubicBezierTimingFunction> {
+ static void encode(ArgumentEncoder&, const WebCore::CubicBezierTimingFunction&);
+ static bool decode(ArgumentDecoder&, WebCore::CubicBezierTimingFunction&);
+};
+
+template<> struct ArgumentCoder<WebCore::StepsTimingFunction> {
+ static void encode(ArgumentEncoder&, const WebCore::StepsTimingFunction&);
+ static bool decode(ArgumentDecoder&, WebCore::StepsTimingFunction&);
+};
+
</ins><span class="cx"> template<> struct ArgumentCoder<WebCore::CertificateInfo> {
</span><span class="cx"> static void encode(ArgumentEncoder&, const WebCore::CertificateInfo&);
</span><span class="cx"> static bool decode(ArgumentDecoder&, WebCore::CertificateInfo&);
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2SharedmacRemoteLayerBackingStoremm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerBackingStore.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -49,8 +49,9 @@
</span><span class="cx"> @end
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><del>-using namespace WebKit;
</del><span class="cx">
</span><ins>+namespace WebKit {
+
</ins><span class="cx"> RemoteLayerBackingStore::RemoteLayerBackingStore()
</span><span class="cx"> : m_layer(nullptr)
</span><span class="cx"> , m_isOpaque(false)
</span><span class="lines">@@ -321,3 +322,5 @@
</span><span class="cx">
</span><span class="cx"> layer.contentsOpaque = m_isOpaque;
</span><span class="cx"> }
</span><ins>+
+} // namespace WebKit
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebKit2SharedmacRemoteLayerTreePropertyApplierh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -32,12 +32,14 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+class RemoteLayerTreeHost;
+
</ins><span class="cx"> class RemoteLayerTreePropertyApplier {
</span><span class="cx"> public:
</span><span class="cx"> typedef HashMap<WebCore::GraphicsLayer::PlatformLayerID, LayerOrView *> RelatedLayerMap;
</span><del>- static void applyProperties(CALayer *, const RemoteLayerTreeTransaction::LayerProperties&, const RelatedLayerMap&);
</del><ins>+ static void applyProperties(CALayer *, RemoteLayerTreeHost*, const RemoteLayerTreeTransaction::LayerProperties&, const RelatedLayerMap&);
</ins><span class="cx"> #if PLATFORM(IOS)
</span><del>- static void applyProperties(UIView *, const RemoteLayerTreeTransaction::LayerProperties&, const RelatedLayerMap&);
</del><ins>+ static void applyProperties(UIView *, RemoteLayerTreeHost*, const RemoteLayerTreeTransaction::LayerProperties&, const RelatedLayerMap&);
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2SharedmacRemoteLayerTreePropertyAppliermm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -26,7 +26,9 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "RemoteLayerTreePropertyApplier.h"
</span><span class="cx">
</span><ins>+#import "PlatformCAAnimationRemote.h"
</ins><span class="cx"> #import "PlatformCALayerRemote.h"
</span><ins>+#import "RemoteLayerTreeHost.h"
</ins><span class="cx"> #import <QuartzCore/CALayer.h>
</span><span class="cx"> #import <WebCore/BlockExceptions.h>
</span><span class="cx"> #import <WebCore/PlatformCAFilters.h>
</span><span class="lines">@@ -111,7 +113,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static void applyPropertiesToLayer(CALayer *layer, const RemoteLayerTreeTransaction::LayerProperties& properties)
</del><ins>+static void applyPropertiesToLayer(CALayer *layer, RemoteLayerTreeHost* layerTreeHost, const RemoteLayerTreeTransaction::LayerProperties& properties)
</ins><span class="cx"> {
</span><span class="cx"> if (properties.changedProperties & RemoteLayerTreeTransaction::NameChanged)
</span><span class="cx"> layer.name = properties.name;
</span><span class="lines">@@ -128,7 +130,7 @@
</span><span class="cx">
</span><span class="cx"> if (properties.changedProperties & RemoteLayerTreeTransaction::SizeChanged)
</span><span class="cx"> layer.bounds = FloatRect(FloatPoint(), properties.size);
</span><del>-
</del><ins>+
</ins><span class="cx"> if (properties.changedProperties & RemoteLayerTreeTransaction::BackgroundColorChanged)
</span><span class="cx"> layer.backgroundColor = cgColorFromColor(properties.backgroundColor).get();
</span><span class="cx">
</span><span class="lines">@@ -192,6 +194,9 @@
</span><span class="cx"> if (properties.changedProperties & RemoteLayerTreeTransaction::FiltersChanged)
</span><span class="cx"> PlatformCAFilters::setFiltersOnLayer(layer, properties.filters ? *properties.filters : FilterOperations());
</span><span class="cx">
</span><ins>+ if (properties.changedProperties & RemoteLayerTreeTransaction::AnimationsChanged)
+ PlatformCAAnimationRemote::updateLayerAnimations(layer, layerTreeHost, properties.addedAnimations, properties.keyPathsOfAnimationsToRemove);
+
</ins><span class="cx"> if (properties.changedProperties & RemoteLayerTreeTransaction::EdgeAntialiasingMaskChanged)
</span><span class="cx"> layer.edgeAntialiasingMask = properties.edgeAntialiasingMask;
</span><span class="cx">
</span><span class="lines">@@ -199,10 +204,10 @@
</span><span class="cx"> updateCustomAppearance(layer, properties.customAppearance);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void RemoteLayerTreePropertyApplier::applyProperties(CALayer *layer, const RemoteLayerTreeTransaction::LayerProperties& properties, const RelatedLayerMap& relatedLayers)
</del><ins>+void RemoteLayerTreePropertyApplier::applyProperties(CALayer *layer, RemoteLayerTreeHost* layerTreeHost, const RemoteLayerTreeTransaction::LayerProperties& properties, const RelatedLayerMap& relatedLayers)
</ins><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span><del>- applyPropertiesToLayer(layer, properties);
</del><ins>+ applyPropertiesToLayer(layer, layerTreeHost, properties);
</ins><span class="cx">
</span><span class="cx"> if (properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) {
</span><span class="cx"> RetainPtr<NSMutableArray> children = adoptNS([[NSMutableArray alloc] initWithCapacity:properties.children.size()]);
</span><span class="lines">@@ -236,10 +241,10 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-void RemoteLayerTreePropertyApplier::applyProperties(UIView *view, const RemoteLayerTreeTransaction::LayerProperties& properties, const RelatedLayerMap& relatedLayers)
</del><ins>+void RemoteLayerTreePropertyApplier::applyProperties(UIView *view, RemoteLayerTreeHost* layerTreeHost, const RemoteLayerTreeTransaction::LayerProperties& properties, const RelatedLayerMap& relatedLayers)
</ins><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span><del>- applyPropertiesToLayer(view.layer, properties);
</del><ins>+ applyPropertiesToLayer(view.layer, layerTreeHost, properties);
</ins><span class="cx">
</span><span class="cx"> if (properties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged) {
</span><span class="cx"> RetainPtr<NSMutableArray> children = adoptNS([[NSMutableArray alloc] initWithCapacity:properties.children.size()]);
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2SharedmacRemoteLayerTreeTransactionh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #ifndef RemoteLayerTreeTransaction_h
</span><span class="cx"> #define RemoteLayerTreeTransaction_h
</span><span class="cx">
</span><ins>+#include "PlatformCAAnimationRemote.h"
</ins><span class="cx"> #include "RemoteLayerBackingStore.h"
</span><span class="cx"> #include <WebCore/Color.h>
</span><span class="cx"> #include <WebCore/FilterOperations.h>
</span><span class="lines">@@ -34,6 +35,7 @@
</span><span class="cx"> #include <WebCore/PlatformCALayer.h>
</span><span class="cx"> #include <WebCore/TransformationMatrix.h>
</span><span class="cx"> #include <wtf/HashMap.h>
</span><ins>+#include <wtf/HashSet.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx">
</span><span class="cx"> namespace IPC {
</span><span class="lines">@@ -74,9 +76,10 @@
</span><span class="cx"> TimeOffsetChanged = 1 << 23,
</span><span class="cx"> BackingStoreChanged = 1 << 24,
</span><span class="cx"> FiltersChanged = 1 << 25,
</span><del>- EdgeAntialiasingMaskChanged = 1 << 26,
- CustomAppearanceChanged = 1 << 27,
- CustomBehaviorChanged = 1 << 28
</del><ins>+ AnimationsChanged = 1 << 26,
+ EdgeAntialiasingMaskChanged = 1 << 27,
+ CustomAppearanceChanged = 1 << 28,
+ CustomBehaviorChanged = 1 << 29
</ins><span class="cx"> };
</span><span class="cx"> typedef unsigned LayerChange;
</span><span class="cx">
</span><span class="lines">@@ -112,6 +115,10 @@
</span><span class="cx"> std::unique_ptr<WebCore::TransformationMatrix> transform;
</span><span class="cx"> std::unique_ptr<WebCore::TransformationMatrix> sublayerTransform;
</span><span class="cx"> Vector<WebCore::GraphicsLayer::PlatformLayerID> children;
</span><ins>+
+ HashMap<String, PlatformCAAnimationRemote::Properties> addedAnimations;
+ HashSet<String> keyPathsOfAnimationsToRemove;
+
</ins><span class="cx"> WebCore::FloatPoint3D position;
</span><span class="cx"> WebCore::FloatPoint3D anchorPoint;
</span><span class="cx"> WebCore::FloatSize size;
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2SharedmacRemoteLayerTreeTransactionmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -103,6 +103,8 @@
</span><span class="cx"> , everChangedProperties(other.everChangedProperties)
</span><span class="cx"> , name(other.name)
</span><span class="cx"> , children(other.children)
</span><ins>+ , addedAnimations(other.addedAnimations)
+ , keyPathsOfAnimationsToRemove(other.keyPathsOfAnimationsToRemove)
</ins><span class="cx"> , position(other.position)
</span><span class="cx"> , anchorPoint(other.anchorPoint)
</span><span class="cx"> , size(other.size)
</span><span class="lines">@@ -149,6 +151,11 @@
</span><span class="cx"> if (changedProperties & ChildrenChanged)
</span><span class="cx"> encoder << children;
</span><span class="cx">
</span><ins>+ if (changedProperties & AnimationsChanged) {
+ encoder << addedAnimations;
+ encoder << keyPathsOfAnimationsToRemove;
+ }
+
</ins><span class="cx"> if (changedProperties & PositionChanged)
</span><span class="cx"> encoder << position;
</span><span class="cx">
</span><span class="lines">@@ -251,6 +258,14 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (result.changedProperties & AnimationsChanged) {
+ if (!decoder.decode(result.addedAnimations))
+ return false;
+
+ if (!decoder.decode(result.keyPathsOfAnimationsToRemove))
+ return false;
+ }
+
</ins><span class="cx"> if (result.changedProperties & PositionChanged) {
</span><span class="cx"> if (!decoder.decode(result.position))
</span><span class="cx"> return false;
</span><span class="lines">@@ -736,6 +751,8 @@
</span><span class="cx"> if (layerProperties.changedProperties & RemoteLayerTreeTransaction::ChildrenChanged)
</span><span class="cx"> dumpProperty<Vector<GraphicsLayer::PlatformLayerID>>(ts, "children", layerProperties.children);
</span><span class="cx">
</span><ins>+// FIXME: dump animations
+
</ins><span class="cx"> if (layerProperties.changedProperties & RemoteLayerTreeTransaction::PositionChanged)
</span><span class="cx"> dumpProperty<FloatPoint3D>(ts, "position", layerProperties.position);
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2UIProcessiosRemoteLayerTreeHostIOSmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -37,10 +37,6 @@
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><del>-@interface UIView(WKViewInternals)
-- (void)_createLayerWithFrame:(CGRect)frame;
-@end
-
</del><span class="cx"> @interface CALayer(WKLayerInternal)
</span><span class="cx"> - (void)setContextId:(uint32_t)contextID;
</span><span class="cx"> @end
</span><span class="lines">@@ -76,6 +72,13 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+static NSString* const WKLayerIDPropertyKey = @"WKLayerID";
+
+WebCore::GraphicsLayer::PlatformLayerID RemoteLayerTreeHost::layerID(LayerOrView* layer)
+{
+ return [[layer valueForKey:WKLayerIDPropertyKey] unsignedLongLongValue];
+}
+
</ins><span class="cx"> LayerOrView *RemoteLayerTreeHost::createLayer(const RemoteLayerTreeTransaction::LayerCreationProperties& properties, const RemoteLayerTreeTransaction::LayerProperties* layerProperties)
</span><span class="cx"> {
</span><span class="cx"> RetainPtr<LayerOrView>& layerOrView = m_layers.add(properties.layerID, nullptr).iterator->value;
</span><span class="lines">@@ -110,6 +113,7 @@
</span><span class="cx">
</span><span class="cx"> // FIXME: Do through the view.
</span><span class="cx"> [[layerOrView layer] web_disableAllActions];
</span><ins>+ [[layerOrView layer] setValue:[NSNumber numberWithUnsignedLongLong:properties.layerID] forKey:WKLayerIDPropertyKey];
</ins><span class="cx">
</span><span class="cx"> return layerOrView.get();
</span><span class="cx"> }
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -44,6 +44,8 @@
</span><span class="cx">
</span><span class="cx"> const RemoteLayerTreeHost& remoteLayerTreeHost() const { return m_remoteLayerTreeHost; }
</span><span class="cx">
</span><ins>+ void acceleratedAnimationDidStart(uint64_t layerID, double startTime);
+
</ins><span class="cx"> private:
</span><span class="cx"> virtual void sizeDidChange() override;
</span><span class="cx"> virtual void deviceScaleFactorDidChange() override;
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">
</span><span class="cx"> RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy(WebPageProxy* webPageProxy)
</span><span class="cx"> : DrawingAreaProxy(DrawingAreaTypeRemoteLayerTree, webPageProxy)
</span><del>- , m_remoteLayerTreeHost()
</del><ins>+ , m_remoteLayerTreeHost(*this)
</ins><span class="cx"> , m_isWaitingForDidUpdateGeometry(false)
</span><span class="cx"> {
</span><span class="cx"> m_webPageProxy->process().addMessageReceiver(Messages::RemoteLayerTreeDrawingAreaProxy::messageReceiverName(), m_webPageProxy->pageID(), *this);
</span><span class="lines">@@ -131,6 +131,11 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart(uint64_t layerID, double startTime)
+{
+ m_webPageProxy->process().send(Messages::DrawingArea::AcceleratedAnimationDidStart(layerID, startTime), m_webPageProxy->pageID());
+}
+
</ins><span class="cx"> static const float indicatorInset = 10;
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -236,7 +241,7 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- m_debugIndicatorLayerTreeHost = std::make_unique<RemoteLayerTreeHost>();
</del><ins>+ m_debugIndicatorLayerTreeHost = std::make_unique<RemoteLayerTreeHost>(*this);
</ins><span class="cx"> m_debugIndicatorLayerTreeHost->setIsDebugLayerTreeHost(true);
</span><span class="cx">
</span><span class="cx"> m_tileMapHostLayer = adoptNS([[CALayer alloc] init]);
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2UIProcessmacRemoteLayerTreeHosth"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -32,29 +32,43 @@
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/RetainPtr.h>
</span><span class="cx">
</span><ins>+OBJC_CLASS WKAnimationDelegate;
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><ins>+class RemoteLayerTreeDrawingAreaProxy;
</ins><span class="cx"> class WebPageProxy;
</span><span class="cx">
</span><span class="cx"> class RemoteLayerTreeHost {
</span><span class="cx"> public:
</span><del>- explicit RemoteLayerTreeHost();
</del><ins>+ explicit RemoteLayerTreeHost(RemoteLayerTreeDrawingAreaProxy&);
</ins><span class="cx"> virtual ~RemoteLayerTreeHost();
</span><span class="cx">
</span><span class="cx"> LayerOrView *getLayer(WebCore::GraphicsLayer::PlatformLayerID) const;
</span><span class="cx"> LayerOrView *rootLayer() const { return m_rootLayer; }
</span><span class="cx">
</span><ins>+ static WebCore::GraphicsLayer::PlatformLayerID layerID(LayerOrView*);
+
</ins><span class="cx"> // Returns true if the root layer changed.
</span><span class="cx"> bool updateLayerTree(const RemoteLayerTreeTransaction&, float indicatorScaleFactor = 1);
</span><span class="cx">
</span><span class="cx"> void setIsDebugLayerTreeHost(bool flag) { m_isDebugLayerTreeHost = flag; }
</span><span class="cx"> bool isDebugLayerTreeHost() const { return m_isDebugLayerTreeHost; }
</span><span class="cx">
</span><ins>+ typedef HashMap<WebCore::GraphicsLayer::PlatformLayerID, RetainPtr<WKAnimationDelegate>> LayerAnimationDelegateMap;
+ LayerAnimationDelegateMap& animationDelegates() { return m_animationDelegates; }
+
+ void animationDidStart(WebCore::GraphicsLayer::PlatformLayerID, double startTime);
+
</ins><span class="cx"> private:
</span><span class="cx"> LayerOrView *createLayer(const RemoteLayerTreeTransaction::LayerCreationProperties&, const RemoteLayerTreeTransaction::LayerProperties*);
</span><span class="cx">
</span><ins>+ void layerWillBeRemoved(WebCore::GraphicsLayer::PlatformLayerID);
+
+ RemoteLayerTreeDrawingAreaProxy& m_drawingArea;
</ins><span class="cx"> LayerOrView *m_rootLayer;
</span><span class="cx"> HashMap<WebCore::GraphicsLayer::PlatformLayerID, RetainPtr<LayerOrView>> m_layers;
</span><ins>+ HashMap<WebCore::GraphicsLayer::PlatformLayerID, RetainPtr<WKAnimationDelegate>> m_animationDelegates;
</ins><span class="cx"> bool m_isDebugLayerTreeHost;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2UIProcessmacRemoteLayerTreeHostmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> #import "RemoteLayerTreeHost.h"
</span><span class="cx">
</span><ins>+#import "RemoteLayerTreeDrawingAreaProxy.h"
</ins><span class="cx"> #import "RemoteLayerTreePropertyApplier.h"
</span><span class="cx"> #import "RemoteLayerTreeTransaction.h"
</span><span class="cx"> #import "ShareableBitmap.h"
</span><span class="lines">@@ -41,8 +42,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-RemoteLayerTreeHost::RemoteLayerTreeHost()
- : m_rootLayer(nullptr)
</del><ins>+RemoteLayerTreeHost::RemoteLayerTreeHost(RemoteLayerTreeDrawingAreaProxy& drawingArea)
+ : m_drawingArea(drawingArea)
+ , m_rootLayer(nullptr)
</ins><span class="cx"> , m_isDebugLayerTreeHost(false)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -87,13 +89,13 @@
</span><span class="cx"> if (propertiesCopy.changedProperties & RemoteLayerTreeTransaction::BorderWidthChanged)
</span><span class="cx"> propertiesCopy.borderWidth *= 1 / indicatorScaleFactor;
</span><span class="cx">
</span><del>- RemoteLayerTreePropertyApplier::applyProperties(layer, propertiesCopy, relatedLayers);
</del><ins>+ RemoteLayerTreePropertyApplier::applyProperties(layer, this, propertiesCopy, relatedLayers);
</ins><span class="cx"> } else
</span><del>- RemoteLayerTreePropertyApplier::applyProperties(layer, properties, relatedLayers);
</del><ins>+ RemoteLayerTreePropertyApplier::applyProperties(layer, this, properties, relatedLayers);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> for (auto& destroyedLayer : transaction.destroyedLayers())
</span><del>- m_layers.remove(destroyedLayer);
</del><ins>+ layerWillBeRemoved(destroyedLayer);
</ins><span class="cx">
</span><span class="cx"> return rootLayerChanged;
</span><span class="cx"> }
</span><span class="lines">@@ -106,7 +108,25 @@
</span><span class="cx"> return m_layers.get(layerID).get();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void RemoteLayerTreeHost::layerWillBeRemoved(WebCore::GraphicsLayer::PlatformLayerID layerID)
+{
+ m_animationDelegates.remove(layerID);
+ m_layers.remove(layerID);
+}
+
+void RemoteLayerTreeHost::animationDidStart(WebCore::GraphicsLayer::PlatformLayerID layerID, double startTime)
+{
+ m_drawingArea.acceleratedAnimationDidStart(layerID, startTime);
+}
+
</ins><span class="cx"> #if !PLATFORM(IOS)
</span><ins>+static NSString* const WKLayerIDPropertyKey = @"WKLayerID";
+
+WebCore::GraphicsLayer::PlatformLayerID RemoteLayerTreeHost::layerID(LayerOrView* layer)
+{
+ return [[layer valueForKey:WKLayerIDPropertyKey] unsignedLongLongValue];
+}
+
</ins><span class="cx"> LayerOrView *RemoteLayerTreeHost::createLayer(const RemoteLayerTreeTransaction::LayerCreationProperties& properties, const RemoteLayerTreeTransaction::LayerProperties*)
</span><span class="cx"> {
</span><span class="cx"> RetainPtr<CALayer>& layer = m_layers.add(properties.layerID, nullptr).iterator->value;
</span><span class="lines">@@ -137,6 +157,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> [layer web_disableAllActions];
</span><ins>+ [layer setValue:[NSNumber numberWithUnsignedLongLong:properties.layerID] forKey:WKLayerIDPropertyKey];
</ins><span class="cx">
</span><span class="cx"> return layer.get();
</span><span class="cx"> }
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -63,6 +63,8 @@
</span><span class="cx">                 0F5947A4187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5947A2187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h */; };
</span><span class="cx">                 0F5947A7187B517600437857 /* RemoteScrollingCoordinatorMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5947A5187B517600437857 /* RemoteScrollingCoordinatorMessageReceiver.cpp */; };
</span><span class="cx">                 0F5947A8187B517600437857 /* RemoteScrollingCoordinatorMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5947A6187B517600437857 /* RemoteScrollingCoordinatorMessages.h */; };
</span><ins>+                0F5E200318E77051003EC3E5 /* PlatformCAAnimationRemote.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F5E200118E77051003EC3E5 /* PlatformCAAnimationRemote.mm */; };
+                0F5E200418E77051003EC3E5 /* PlatformCAAnimationRemote.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5E200218E77051003EC3E5 /* PlatformCAAnimationRemote.h */; };
</ins><span class="cx">                 0F931C1C18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F931C1A18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h */; };
</span><span class="cx">                 0F931C1D18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F931C1B18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.mm */; };
</span><span class="cx">                 0FB659231208B4DB0044816C /* DrawingAreaInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB659221208B4DB0044816C /* DrawingAreaInfo.h */; };
</span><span class="lines">@@ -1799,6 +1801,8 @@
</span><span class="cx">                 0F5947A2187B3B7D00437857 /* RemoteScrollingCoordinatorTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteScrollingCoordinatorTransaction.h; path = Scrolling/RemoteScrollingCoordinatorTransaction.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F5947A5187B517600437857 /* RemoteScrollingCoordinatorMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteScrollingCoordinatorMessageReceiver.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0F5947A6187B517600437857 /* RemoteScrollingCoordinatorMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteScrollingCoordinatorMessages.h; sourceTree = "<group>"; };
</span><ins>+                0F5E200118E77051003EC3E5 /* PlatformCAAnimationRemote.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformCAAnimationRemote.mm; sourceTree = "<group>"; };
+                0F5E200218E77051003EC3E5 /* PlatformCAAnimationRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCAAnimationRemote.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0F931C1A18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScrollingTreeOverflowScrollingNodeIOS.h; path = Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F931C1B18C5711900DBA7C3 /* ScrollingTreeOverflowScrollingNodeIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScrollingTreeOverflowScrollingNodeIOS.mm; path = Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm; sourceTree = "<group>"; };
</span><span class="cx">                 0FB659221208B4DB0044816C /* DrawingAreaInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingAreaInfo.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -6020,6 +6024,8 @@
</span><span class="cx">                                 7C6D37FA172F555F009D2847 /* PageBannerMac.mm */,
</span><span class="cx">                                 2DA049B5180CCD0A00AAFA9E /* GraphicsLayerCARemote.cpp */,
</span><span class="cx">                                 2DA049B6180CCD0A00AAFA9E /* GraphicsLayerCARemote.h */,
</span><ins>+                                0F5E200118E77051003EC3E5 /* PlatformCAAnimationRemote.mm */,
+                                0F5E200218E77051003EC3E5 /* PlatformCAAnimationRemote.h */,
</ins><span class="cx">                                 2DA049B1180CCCD300AAFA9E /* PlatformCALayerRemote.cpp */,
</span><span class="cx">                                 2DA049B2180CCCD300AAFA9E /* PlatformCALayerRemote.h */,
</span><span class="cx">                                 2D8710141828415D0018FA01 /* PlatformCALayerRemoteCustom.mm */,
</span><span class="lines">@@ -6921,6 +6927,7 @@
</span><span class="cx">                                 BC4A62A814744EC7006C681A /* WebConnectionToWebProcess.h in Headers */,
</span><span class="cx">                                 BCB9E2431120DACA00A137E0 /* WebContext.h in Headers */,
</span><span class="cx">                                 31A505FA1680025500A930EB /* WebContextClient.h in Headers */,
</span><ins>+                                0F5E200418E77051003EC3E5 /* PlatformCAAnimationRemote.h in Headers */,
</ins><span class="cx">                                 512A9761180E031D0039A149 /* DatabaseProcessMessages.h in Headers */,
</span><span class="cx">                                 BC09B8F9147460F7005F5625 /* WebContextConnectionClient.h in Headers */,
</span><span class="cx">                                 BCDE059B11CDA8AE00E41AF1 /* WebContextInjectedBundleClient.h in Headers */,
</span><span class="lines">@@ -8662,6 +8669,7 @@
</span><span class="cx">                                 1AC86FF3130B46D3002C1257 /* WKPluginSiteDataManager.cpp in Sources */,
</span><span class="cx">                                 BCD597D1112B56AC00EC8C23 /* WKPreferences.cpp in Sources */,
</span><span class="cx">                                 BCBAACEC145225E30053F82F /* WKProcessGroup.mm in Sources */,
</span><ins>+                                0F5E200318E77051003EC3E5 /* PlatformCAAnimationRemote.mm in Sources */,
</ins><span class="cx">                                 512F58FB12A88A5400629530 /* WKProtectionSpace.cpp in Sources */,
</span><span class="cx">                                 37948408150C4B9700E52CE9 /* WKRenderLayer.cpp in Sources */,
</span><span class="cx">                                 2D1B5D5D185869C8006C6596 /* ViewGestureControllerMessageReceiver.cpp in Sources */,
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -91,6 +91,7 @@
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> virtual void setExposedRect(const WebCore::FloatRect&) = 0;
</span><span class="cx"> virtual WebCore::FloatRect exposedRect() const = 0;
</span><ins>+ virtual void acceleratedAnimationDidStart(uint64_t /*layerID*/, double /*startTime*/) { }
</ins><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> virtual void setExposedContentRect(const WebCore::FloatRect&) = 0;
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPageDrawingAreamessagesin"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -33,5 +33,7 @@
</span><span class="cx">
</span><span class="cx"> AdjustTransientZoom(double scale, WebCore::FloatPoint origin)
</span><span class="cx"> CommitTransientZoom(double scale, WebCore::FloatPoint origin)
</span><ins>+
+ AcceleratedAnimationDidStart(uint64_t layerID, double startTime)
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacGraphicsLayerCARemotecpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -25,6 +25,7 @@
</span><span class="cx">
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "GraphicsLayerCARemote.h"
</span><ins>+#include "PlatformCAAnimationRemote.h"
</ins><span class="cx"> #include "PlatformCALayerRemote.h"
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="lines">@@ -52,4 +53,22 @@
</span><span class="cx"> return PlatformCALayerRemote::create(platformLayer, owner, m_context);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+PassRefPtr<PlatformCAAnimation> GraphicsLayerCARemote::createPlatformCAAnimation(PlatformCAAnimation::AnimationType type, const String& keyPath)
+{
+ return PlatformCAAnimationRemote::create(type, keyPath);
</ins><span class="cx"> }
</span><ins>+
+bool GraphicsLayerCARemote::addAnimation(const KeyframeValueList& valueList, const FloatSize&, const Animation* anim, const String&, double)
+{
+ if (!animationCanBeAccelerated(valueList, anim))
+ return false;
+
+#if ENABLE(CSS_FILTERS)
+ if (valueList.property() == AnimatedPropertyWebkitFilter)
+ return false;
+#endif
+
+ return true;
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -52,13 +52,13 @@
</span><span class="cx">
</span><span class="cx"> virtual PassRefPtr<WebCore::PlatformCALayer> createPlatformCALayer(WebCore::PlatformCALayer::LayerType, WebCore::PlatformCALayerClient* owner) override;
</span><span class="cx"> virtual PassRefPtr<WebCore::PlatformCALayer> createPlatformCALayer(PlatformLayer*, WebCore::PlatformCALayerClient* owner) override;
</span><ins>+ virtual PassRefPtr<WebCore::PlatformCAAnimation> createPlatformCAAnimation(WebCore::PlatformCAAnimation::AnimationType, const String& keyPath) override;
</ins><span class="cx">
</span><del>- // No accelerated animations for now.
- virtual bool addAnimation(const WebCore::KeyframeValueList&, const WebCore::FloatSize&, const WebCore::Animation*, const String&, double) override { return false; }
-
</del><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><del>-
</del><ins>+
+ virtual bool addAnimation(const WebCore::KeyframeValueList&, const WebCore::FloatSize&, const WebCore::Animation*, const String&, double);
+
</ins><span class="cx"> RemoteLayerTreeContext* m_context;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemotehfromrev166542trunkSourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemoteh"></a>
<div class="copfile"><h4>Copied: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h (from rev 166542, trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h) (0 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h         (rev 0)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -0,0 +1,284 @@
</span><ins>+/*
+ * Copyright (C) 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 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 PlatformCAAnimationRemote_h
+#define PlatformCAAnimationRemote_h
+
+#include <WebCore/PlatformCAAnimation.h>
+#include <wtf/HashMap.h>
+#include <wtf/HashSet.h>
+
+namespace IPC {
+class ArgumentEncoder;
+class ArgumentDecoder;
+};
+
+OBJC_CLASS CALayer;
+
+namespace WebKit {
+
+class RemoteLayerTreeHost;
+
+class PlatformCAAnimationRemote final : public WebCore::PlatformCAAnimation {
+public:
+ static PassRefPtr<PlatformCAAnimation> create(AnimationType, const String& keyPath);
+
+ virtual ~PlatformCAAnimationRemote() { }
+
+ virtual bool isPlatformCAAnimationRemote() const override { return true; }
+
+ virtual PassRefPtr<PlatformCAAnimation> copy() const override;
+
+ virtual String keyPath() const override;
+
+ virtual CFTimeInterval beginTime() const override;
+ virtual void setBeginTime(CFTimeInterval) override;
+
+ virtual CFTimeInterval duration() const override;
+ virtual void setDuration(CFTimeInterval) override;
+
+ virtual float speed() const override;
+ virtual void setSpeed(float) override;
+
+ virtual CFTimeInterval timeOffset() const override;
+ virtual void setTimeOffset(CFTimeInterval) override;
+
+ virtual float repeatCount() const override;
+ virtual void setRepeatCount(float) override;
+
+ virtual bool autoreverses() const override;
+ virtual void setAutoreverses(bool) override;
+
+ virtual FillModeType fillMode() const override;
+ virtual void setFillMode(FillModeType) override;
+
+ virtual void setTimingFunction(const WebCore::TimingFunction*, bool reverse = false) override;
+ void copyTimingFunctionFrom(const WebCore::PlatformCAAnimation*) override;
+
+ virtual bool isRemovedOnCompletion() const override;
+ virtual void setRemovedOnCompletion(bool) override;
+
+ virtual bool isAdditive() const override;
+ virtual void setAdditive(bool) override;
+
+ virtual ValueFunctionType valueFunction() const override;
+ virtual void setValueFunction(ValueFunctionType) override;
+
+ // Basic-animation properties.
+ virtual void setFromValue(float) override;
+ virtual void setFromValue(const WebCore::TransformationMatrix&) override;
+ virtual void setFromValue(const WebCore::FloatPoint3D&) override;
+ virtual void setFromValue(const WebCore::Color&) override;
+#if ENABLE(CSS_FILTERS)
+ virtual void setFromValue(const WebCore::FilterOperation*, int internalFilterPropertyIndex) override;
+#endif
+ virtual void copyFromValueFrom(const WebCore::PlatformCAAnimation*) override;
+
+ virtual void setToValue(float) override;
+ virtual void setToValue(const WebCore::TransformationMatrix&) override;
+ virtual void setToValue(const WebCore::FloatPoint3D&) override;
+ virtual void setToValue(const WebCore::Color&) override;
+#if ENABLE(CSS_FILTERS)
+ virtual void setToValue(const WebCore::FilterOperation*, int internalFilterPropertyIndex) override;
+#endif
+ virtual void copyToValueFrom(const WebCore::PlatformCAAnimation*) override;
+
+ // Keyframe-animation properties.
+ virtual void setValues(const Vector<float>&) override;
+ virtual void setValues(const Vector<WebCore::TransformationMatrix>&) override;
+ virtual void setValues(const Vector<WebCore::FloatPoint3D>&) override;
+ virtual void setValues(const Vector<WebCore::Color>&) override;
+#if ENABLE(CSS_FILTERS)
+ virtual void setValues(const Vector<RefPtr<WebCore::FilterOperation>>&, int internalFilterPropertyIndex) override;
+#endif
+ virtual void copyValuesFrom(const WebCore::PlatformCAAnimation*) override;
+
+ virtual void setKeyTimes(const Vector<float>&) override;
+ virtual void copyKeyTimesFrom(const WebCore::PlatformCAAnimation*) override;
+
+ virtual void setTimingFunctions(const Vector<const WebCore::TimingFunction*>&, bool reverse = false) override;
+ virtual void copyTimingFunctionsFrom(const WebCore::PlatformCAAnimation*) override;
+
+ class KeyframeValue {
+ public:
+ enum KeyframeType {
+ NumberKeyType,
+ ColorKeyType,
+ PointKeyType,
+ TransformKeyType,
+ };
+
+ KeyframeValue(float value = 0)
+ : keyType(NumberKeyType)
+ , number(value)
+ {
+ }
+
+ KeyframeValue(WebCore::Color value)
+ : keyType(ColorKeyType)
+ , color(value)
+ {
+ }
+
+ KeyframeValue(const WebCore::FloatPoint3D& value)
+ : keyType(PointKeyType)
+ , point(value)
+ {
+ }
+
+ KeyframeValue(const WebCore::TransformationMatrix& value)
+ : keyType(TransformKeyType)
+ , transform(value)
+ {
+ }
+
+ KeyframeValue(const KeyframeValue& other)
+ {
+ *this = other;
+ }
+
+ KeyframeValue& operator=(const KeyframeValue& other)
+ {
+ keyType = other.keyType;
+ switch (keyType) {
+ case NumberKeyType:
+ number = other.number;
+ break;
+ case ColorKeyType:
+ color = other.color;
+ break;
+ case PointKeyType:
+ point = other.point;
+ break;
+ case TransformKeyType:
+ transform = other.transform;
+ break;
+ }
+
+ return *this;
+ }
+
+ KeyframeType keyframeType() const { return keyType; }
+
+ float numberValue() const
+ {
+ ASSERT(keyType == NumberKeyType);
+ return number;
+ }
+
+ WebCore::Color colorValue() const
+ {
+ ASSERT(keyType == ColorKeyType);
+ return color;
+ }
+
+ const WebCore::FloatPoint3D& pointValue() const
+ {
+ ASSERT(keyType == PointKeyType);
+ return point;
+ }
+
+ const WebCore::TransformationMatrix& transformValue() const
+ {
+ ASSERT(keyType == TransformKeyType);
+ return transform;
+ }
+
+ void encode(IPC::ArgumentEncoder&) const;
+ static bool decode(IPC::ArgumentDecoder&, KeyframeValue&);
+
+ private:
+ KeyframeType keyType;
+ union {
+ float number;
+ WebCore::Color color;
+ WebCore::FloatPoint3D point;
+ WebCore::TransformationMatrix transform;
+ };
+ };
+
+ struct Properties {
+ Properties()
+ : animationType(Basic)
+ , beginTime(0)
+ , duration(0)
+ , timeOffset(0)
+ , repeatCount(1)
+ , speed(1)
+ , fillMode(NoFillMode)
+ , valueFunction(NoValueFunction)
+ , autoReverses(false)
+ , removedOnCompletion(true)
+ , additive(false)
+ , reverseTimingFunctions(false)
+ , hasNonZeroBeginTime(false)
+
+ {
+ }
+
+ void encode(IPC::ArgumentEncoder&) const;
+ static bool decode(IPC::ArgumentDecoder&, Properties&);
+
+ String keyPath;
+ PlatformCAAnimation::AnimationType animationType;
+
+ double beginTime;
+ double duration;
+ double timeOffset;
+ float repeatCount;
+ float speed;
+
+ PlatformCAAnimation::FillModeType fillMode;
+ PlatformCAAnimation::ValueFunctionType valueFunction;
+
+ bool autoReverses;
+ bool removedOnCompletion;
+ bool additive;
+ bool reverseTimingFunctions;
+ bool hasNonZeroBeginTime;
+
+ // For basic animations, these vectors have two entries. For keyframe animations, two or more.
+ // timingFunctions has n-1 entries.
+ Vector<KeyframeValue> keyValues;
+ Vector<float> keyTimes;
+ Vector<RefPtr<WebCore::TimingFunction>> timingFunctions;
+ };
+
+ const Properties& properties() const { return m_properties; }
+
+ typedef HashMap<String, Properties> AnimationsMap;
+ static void updateLayerAnimations(CALayer *, RemoteLayerTreeHost*, const AnimationsMap& animationsToAdd, const HashSet<String>& animationsToRemove);
+
+private:
+ PlatformCAAnimationRemote(AnimationType, const String& keyPath);
+
+ Properties m_properties;
+};
+
+PLATFORM_CAANIMATION_TYPE_CASTS(PlatformCAAnimationRemote, isPlatformCAAnimationRemote())
+
+} // namespace WebKit
+
+#endif // PlatformCAAnimationRemote_h
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemotemmfromrev166542trunkSourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemotemm"></a>
<div class="copfile"><h4>Copied: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm (from rev 166542, trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm) (0 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm         (rev 0)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -0,0 +1,719 @@
</span><ins>+/*
+ * Copyright (C) 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 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 "config.h"
+#import "PlatformCAAnimationRemote.h"
+
+#import "ArgumentCoders.h"
+#import "RemoteLayerTreeHost.h"
+#import "WebCoreArgumentCoders.h"
+#import <WebCore/BlockExceptions.h>
+#import <WebCore/GraphicsLayer.h>
+#import <WebCore/PlatformCAAnimationMac.h>
+#import <WebCore/TimingFunction.h>
+#import <wtf/CurrentTime.h>
+#import <wtf/RetainPtr.h>
+#import <QuartzCore/QuartzCore.h>
+
+using namespace WTF;
+using namespace WebCore;
+
+static double mediaTimeToCurrentTime(CFTimeInterval t)
+{
+ return monotonicallyIncreasingTime() + t - CACurrentMediaTime();
+}
+
+static NSString * const WKNonZeroBeginTimeFlag = @"WKPlatformCAAnimationNonZeroBeginTimeFlag";
+
+@interface WKAnimationDelegate : NSObject {
+ GraphicsLayer::PlatformLayerID _layerID;
+ WebKit::RemoteLayerTreeHost* _layerTreeHost;
+}
+
+- (instancetype)initWithLayerID:(GraphicsLayer::PlatformLayerID)layerID layerTreeHost:(WebKit::RemoteLayerTreeHost*)layerTreeHost;
+@end
+
+@implementation WKAnimationDelegate
+
+- (instancetype)initWithLayerID:(GraphicsLayer::PlatformLayerID)layerID layerTreeHost:(WebKit::RemoteLayerTreeHost*)layerTreeHost
+{
+ if ((self = [super init])) {
+ _layerID = layerID;
+ _layerTreeHost = layerTreeHost;
+ }
+ return self;
+}
+
+- (void)animationDidStart:(CAAnimation *)animation
+{
+ bool hasNonZeroBeginTime = [[animation valueForKey:WKNonZeroBeginTimeFlag] boolValue];
+ CFTimeInterval startTime;
+
+ if (hasNonZeroBeginTime) {
+ // We don't know what time CA used to commit the animation, so just use the current time
+ // (even though this will be slightly off).
+ startTime = mediaTimeToCurrentTime(CACurrentMediaTime());
+ } else
+ startTime = mediaTimeToCurrentTime([animation beginTime]);
+
+ _layerTreeHost->animationDidStart(_layerID, startTime);
+}
+@end
+
+namespace WebKit {
+
+void PlatformCAAnimationRemote::KeyframeValue::encode(IPC::ArgumentEncoder& encoder) const
+{
+ encoder.encodeEnum(keyType);
+
+ switch (keyType) {
+ case NumberKeyType:
+ encoder << number;
+ break;
+ case ColorKeyType:
+ encoder << color;
+ break;
+ case PointKeyType:
+ encoder << point;
+ break;
+ case TransformKeyType:
+ encoder << transform;
+ break;
+ }
+}
+
+bool PlatformCAAnimationRemote::KeyframeValue::decode(IPC::ArgumentDecoder& decoder, PlatformCAAnimationRemote::KeyframeValue& value)
+{
+ if (!decoder.decodeEnum(value.keyType))
+ return false;
+
+ switch (value.keyType) {
+ case NumberKeyType:
+ if (!decoder.decode(value.number))
+ return false;
+ break;
+ case ColorKeyType:
+ if (!decoder.decode(value.color))
+ return false;
+ break;
+ case PointKeyType:
+ if (!decoder.decode(value.point))
+ return false;
+ break;
+ case TransformKeyType:
+ if (!decoder.decode(value.transform))
+ return false;
+ break;
+ }
+
+ return true;
+}
+
+void PlatformCAAnimationRemote::Properties::encode(IPC::ArgumentEncoder& encoder) const
+{
+ encoder << keyPath;
+ encoder.encodeEnum(animationType);
+
+ encoder << beginTime;
+ encoder << duration;
+ encoder << timeOffset;
+ encoder << repeatCount;
+ encoder << speed;
+
+ encoder.encodeEnum(fillMode);
+ encoder.encodeEnum(valueFunction);
+
+ encoder << autoReverses;
+ encoder << removedOnCompletion;
+ encoder << additive;
+ encoder << reverseTimingFunctions;
+ encoder << hasNonZeroBeginTime;
+
+ encoder << keyValues;
+ encoder << keyTimes;
+
+ encoder << static_cast<uint64_t>(timingFunctions.size());
+ for (const auto& timingFunction : timingFunctions) {
+ switch (timingFunction->type()) {
+ case TimingFunction::LinearFunction:
+ encoder << *static_cast<LinearTimingFunction*>(timingFunction.get());
+ break;
+
+ case TimingFunction::CubicBezierFunction:
+ encoder << *static_cast<CubicBezierTimingFunction*>(timingFunction.get());
+ break;
+
+ case TimingFunction::StepsFunction:
+ encoder << *static_cast<StepsTimingFunction*>(timingFunction.get());
+ break;
+ }
+ }
+}
+
+bool PlatformCAAnimationRemote::Properties::decode(IPC::ArgumentDecoder& decoder, PlatformCAAnimationRemote::Properties& properties)
+{
+ if (!decoder.decode(properties.keyPath))
+ return false;
+
+ if (!decoder.decodeEnum(properties.animationType))
+ return false;
+
+ if (!decoder.decode(properties.beginTime))
+ return false;
+
+ if (!decoder.decode(properties.duration))
+ return false;
+
+ if (!decoder.decode(properties.timeOffset))
+ return false;
+
+ if (!decoder.decode(properties.repeatCount))
+ return false;
+
+ if (!decoder.decode(properties.speed))
+ return false;
+
+ if (!decoder.decodeEnum(properties.fillMode))
+ return false;
+
+ if (!decoder.decodeEnum(properties.valueFunction))
+ return false;
+
+ if (!decoder.decode(properties.autoReverses))
+ return false;
+
+ if (!decoder.decode(properties.removedOnCompletion))
+ return false;
+
+ if (!decoder.decode(properties.additive))
+ return false;
+
+ if (!decoder.decode(properties.reverseTimingFunctions))
+ return false;
+
+ if (!decoder.decode(properties.hasNonZeroBeginTime))
+ return false;
+
+ if (!decoder.decode(properties.keyValues))
+ return false;
+
+ if (!decoder.decode(properties.keyTimes))
+ return false;
+
+ uint64_t numTimingFunctions;
+ if (!decoder.decode(numTimingFunctions))
+ return false;
+
+ if (numTimingFunctions) {
+ properties.timingFunctions.reserveInitialCapacity(numTimingFunctions);
+
+ for (size_t i = 0; i < numTimingFunctions; ++i) {
+
+ TimingFunction::TimingFunctionType type;
+ if (!decoder.decodeEnum(type))
+ return false;
+
+ RefPtr<TimingFunction> timingFunction;
+ switch (type) {
+ case TimingFunction::LinearFunction:
+ timingFunction = LinearTimingFunction::create();
+ if (!decoder.decode(*static_cast<LinearTimingFunction*>(timingFunction.get())))
+ return false;
+ break;
+
+ case TimingFunction::CubicBezierFunction:
+ timingFunction = CubicBezierTimingFunction::create();
+ if (!decoder.decode(*static_cast<CubicBezierTimingFunction*>(timingFunction.get())))
+ return false;
+ break;
+
+ case TimingFunction::StepsFunction:
+ timingFunction = StepsTimingFunction::create();
+ if (!decoder.decode(*static_cast<StepsTimingFunction*>(timingFunction.get())))
+ return false;
+ break;
+ }
+
+ properties.timingFunctions.uncheckedAppend(timingFunction.release());
+ }
+ }
+
+ return true;
+}
+
+PassRefPtr<PlatformCAAnimation> PlatformCAAnimationRemote::create(PlatformCAAnimation::AnimationType type, const String& keyPath)
+{
+ return adoptRef(new PlatformCAAnimationRemote(type, keyPath));
+}
+
+PassRefPtr<PlatformCAAnimation> PlatformCAAnimationRemote::copy() const
+{
+ ASSERT_NOT_REACHED();
+ return nullptr;
+}
+
+PlatformCAAnimationRemote::PlatformCAAnimationRemote(AnimationType type, const String& keyPath)
+ : PlatformCAAnimation(type)
+{
+ m_properties.keyPath = keyPath;
+ m_properties.animationType = type;
+}
+
+String PlatformCAAnimationRemote::keyPath() const
+{
+ return m_properties.keyPath;
+}
+
+CFTimeInterval PlatformCAAnimationRemote::beginTime() const
+{
+ return m_properties.beginTime;
+}
+
+void PlatformCAAnimationRemote::setBeginTime(CFTimeInterval value)
+{
+ m_properties.beginTime = value;
+
+ // Also set a flag to tell us if we've passed in a 0 value.
+ // The flag is needed because later beginTime will get changed
+ // to the time at which it fired and we need to know whether
+ // or not it was 0 to begin with.
+ if (value)
+ m_properties.hasNonZeroBeginTime = value;
+}
+
+CFTimeInterval PlatformCAAnimationRemote::duration() const
+{
+ return m_properties.duration;
+}
+
+void PlatformCAAnimationRemote::setDuration(CFTimeInterval value)
+{
+ m_properties.duration = value;
+}
+
+float PlatformCAAnimationRemote::speed() const
+{
+ return m_properties.speed;
+}
+
+void PlatformCAAnimationRemote::setSpeed(float value)
+{
+ m_properties.speed = value;
+}
+
+CFTimeInterval PlatformCAAnimationRemote::timeOffset() const
+{
+ return m_properties.timeOffset;
+}
+
+void PlatformCAAnimationRemote::setTimeOffset(CFTimeInterval value)
+{
+ m_properties.timeOffset = value;
+}
+
+float PlatformCAAnimationRemote::repeatCount() const
+{
+ return m_properties.repeatCount;
+}
+
+void PlatformCAAnimationRemote::setRepeatCount(float value)
+{
+ m_properties.repeatCount = value;
+}
+
+bool PlatformCAAnimationRemote::autoreverses() const
+{
+ return m_properties.autoReverses;
+}
+
+void PlatformCAAnimationRemote::setAutoreverses(bool value)
+{
+ m_properties.autoReverses = value;
+}
+
+PlatformCAAnimation::FillModeType PlatformCAAnimationRemote::fillMode() const
+{
+ return m_properties.fillMode;
+}
+
+void PlatformCAAnimationRemote::setFillMode(FillModeType value)
+{
+ m_properties.fillMode = value;
+}
+
+void PlatformCAAnimationRemote::setTimingFunction(const TimingFunction* value, bool reverse)
+{
+ Vector<RefPtr<TimingFunction>> timingFunctions;
+ timingFunctions.append(value->clone());
+
+ m_properties.timingFunctions = std::move(timingFunctions);
+ m_properties.reverseTimingFunctions = reverse;
+}
+
+void PlatformCAAnimationRemote::copyTimingFunctionFrom(const PlatformCAAnimation* value)
+{
+ ASSERT_NOT_REACHED();
+}
+
+bool PlatformCAAnimationRemote::isRemovedOnCompletion() const
+{
+ return m_properties.removedOnCompletion;
+}
+
+void PlatformCAAnimationRemote::setRemovedOnCompletion(bool value)
+{
+ m_properties.removedOnCompletion = value;
+}
+
+bool PlatformCAAnimationRemote::isAdditive() const
+{
+ return m_properties.additive;
+}
+
+void PlatformCAAnimationRemote::setAdditive(bool value)
+{
+ m_properties.additive = value;
+}
+
+PlatformCAAnimation::ValueFunctionType PlatformCAAnimationRemote::valueFunction() const
+{
+ return m_properties.valueFunction;
+}
+
+void PlatformCAAnimationRemote::setValueFunction(ValueFunctionType value)
+{
+ m_properties.valueFunction = value;
+}
+
+void PlatformCAAnimationRemote::setFromValue(float value)
+{
+ if (animationType() != Basic)
+ return;
+
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[0] = KeyframeValue(value);
+}
+
+void PlatformCAAnimationRemote::setFromValue(const TransformationMatrix& value)
+{
+ if (animationType() != Basic)
+ return;
+
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[0] = KeyframeValue(value);
+}
+
+void PlatformCAAnimationRemote::setFromValue(const FloatPoint3D& value)
+{
+ if (animationType() != Basic)
+ return;
+
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[0] = KeyframeValue(value);
+}
+
+void PlatformCAAnimationRemote::setFromValue(const Color& value)
+{
+ if (animationType() != Basic)
+ return;
+
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[0] = KeyframeValue(value);
+}
+
+#if ENABLE(CSS_FILTERS)
+void PlatformCAAnimationRemote::setFromValue(const FilterOperation* operation, int internalFilterPropertyIndex)
+{
+ ASSERT_NOT_REACHED();
+}
+#endif
+
+void PlatformCAAnimationRemote::copyFromValueFrom(const PlatformCAAnimation* value)
+{
+ ASSERT_NOT_REACHED();
+}
+
+void PlatformCAAnimationRemote::setToValue(float value)
+{
+ if (animationType() != Basic)
+ return;
+
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[1] = KeyframeValue(value);
+}
+
+void PlatformCAAnimationRemote::setToValue(const TransformationMatrix& value)
+{
+ if (animationType() != Basic)
+ return;
+
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[1] = KeyframeValue(value);
+}
+
+void PlatformCAAnimationRemote::setToValue(const FloatPoint3D& value)
+{
+ if (animationType() != Basic)
+ return;
+
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[1] = KeyframeValue(value);
+}
+
+void PlatformCAAnimationRemote::setToValue(const Color& value)
+{
+ if (animationType() != Basic)
+ return;
+
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[1] = KeyframeValue(value);
+}
+
+#if ENABLE(CSS_FILTERS)
+void PlatformCAAnimationRemote::setToValue(const FilterOperation* operation, int internalFilterPropertyIndex)
+{
+ ASSERT_NOT_REACHED();
+}
+#endif
+
+void PlatformCAAnimationRemote::copyToValueFrom(const PlatformCAAnimation* value)
+{
+ ASSERT_NOT_REACHED();
+}
+
+// Keyframe-animation properties.
+void PlatformCAAnimationRemote::setValues(const Vector<float>& values)
+{
+ if (animationType() != Keyframe)
+ return;
+
+ Vector<KeyframeValue> keyframes;
+ keyframes.reserveInitialCapacity(values.size());
+
+ for (size_t i = 0; i < values.size(); ++i)
+ keyframes.uncheckedAppend(KeyframeValue(values[i]));
+
+ m_properties.keyValues = std::move(keyframes);
+}
+
+void PlatformCAAnimationRemote::setValues(const Vector<TransformationMatrix>& values)
+{
+ if (animationType() != Keyframe)
+ return;
+
+ Vector<KeyframeValue> keyframes;
+ keyframes.reserveInitialCapacity(values.size());
+
+ for (size_t i = 0; i < values.size(); ++i)
+ keyframes.uncheckedAppend(KeyframeValue(values[i]));
+
+ m_properties.keyValues = std::move(keyframes);
+}
+
+void PlatformCAAnimationRemote::setValues(const Vector<FloatPoint3D>& values)
+{
+ if (animationType() != Keyframe)
+ return;
+
+ Vector<KeyframeValue> keyframes;
+ keyframes.reserveInitialCapacity(values.size());
+
+ for (size_t i = 0; i < values.size(); ++i)
+ keyframes.uncheckedAppend(KeyframeValue(values[i]));
+
+ m_properties.keyValues = std::move(keyframes);
+}
+
+void PlatformCAAnimationRemote::setValues(const Vector<Color>& values)
+{
+ if (animationType() != Keyframe)
+ return;
+
+ Vector<KeyframeValue> keyframes;
+ keyframes.reserveInitialCapacity(values.size());
+
+ for (size_t i = 0; i < values.size(); ++i)
+ keyframes.uncheckedAppend(KeyframeValue(values[i]));
+
+ m_properties.keyValues = std::move(keyframes);
+}
+
+#if ENABLE(CSS_FILTERS)
+void PlatformCAAnimationRemote::setValues(const Vector<RefPtr<FilterOperation>>&, int internalFilterPropertyIndex)
+{
+ UNUSED_PARAM(internalFilterPropertyIndex);
+ ASSERT_NOT_REACHED();
+}
+#endif
+
+void PlatformCAAnimationRemote::copyValuesFrom(const PlatformCAAnimation* value)
+{
+ ASSERT_NOT_REACHED();
+}
+
+void PlatformCAAnimationRemote::setKeyTimes(const Vector<float>& keyTimes)
+{
+ m_properties.keyTimes = keyTimes;
+}
+
+void PlatformCAAnimationRemote::copyKeyTimesFrom(const PlatformCAAnimation* value)
+{
+ ASSERT_NOT_REACHED();
+}
+
+void PlatformCAAnimationRemote::setTimingFunctions(const Vector<const TimingFunction*>& values, bool reverse)
+{
+ Vector<RefPtr<WebCore::TimingFunction>> timingFunctions;
+ timingFunctions.reserveInitialCapacity(values.size());
+
+ for (size_t i = 0; i < values.size(); ++i)
+ timingFunctions.uncheckedAppend(values[i]->clone());
+
+ m_properties.timingFunctions = std::move(timingFunctions);
+ m_properties.reverseTimingFunctions = reverse;
+}
+
+void PlatformCAAnimationRemote::copyTimingFunctionsFrom(const PlatformCAAnimation* value)
+{
+ ASSERT_NOT_REACHED();
+}
+
+static NSObject* animationValueFromKeyframeValue(const PlatformCAAnimationRemote::KeyframeValue& keyframeValue)
+{
+ switch (keyframeValue.keyframeType()) {
+ case PlatformCAAnimationRemote::KeyframeValue::NumberKeyType:
+ return @(keyframeValue.numberValue());
+
+ case PlatformCAAnimationRemote::KeyframeValue::ColorKeyType: {
+ Color color = keyframeValue.colorValue();
+ return @[ @(color.red()), @(color.green()), @(color.blue()), @(color.alpha()) ];
+ }
+
+ case PlatformCAAnimationRemote::KeyframeValue::PointKeyType: {
+ FloatPoint3D point = keyframeValue.pointValue();
+ return @[ @(point.x()), @(point.y()), @(point.z()) ];
+ }
+ case PlatformCAAnimationRemote::KeyframeValue::TransformKeyType:
+ return [NSValue valueWithCATransform3D:keyframeValue.transformValue()];
+ }
+}
+
+static void addAnimationToLayer(CALayer *layer, RemoteLayerTreeHost* layerTreeHost, const String& key, const PlatformCAAnimationRemote::Properties& properties)
+{
+ RetainPtr<CAPropertyAnimation> caAnimation;
+ switch (properties.animationType) {
+ case PlatformCAAnimation::Basic: {
+ RetainPtr<CABasicAnimation> basicAnimation;
+ basicAnimation = [CABasicAnimation animationWithKeyPath:properties.keyPath];
+
+ if (properties.keyValues.size() > 1) {
+ [basicAnimation setFromValue:animationValueFromKeyframeValue(properties.keyValues[0])];
+ [basicAnimation setToValue:animationValueFromKeyframeValue(properties.keyValues[1])];
+ }
+
+ if (properties.timingFunctions.size())
+ [basicAnimation setTimingFunction:toCAMediaTimingFunction(properties.timingFunctions[0].get(), properties.reverseTimingFunctions)];
+
+ caAnimation = basicAnimation;
+ break;
+ }
+ case PlatformCAAnimation::Keyframe: {
+ RetainPtr<CAKeyframeAnimation> keyframeAnimation;
+ keyframeAnimation = [CAKeyframeAnimation animationWithKeyPath:properties.keyPath];
+
+ if (properties.keyValues.size()) {
+ RetainPtr<NSMutableArray> keyframes = adoptNS([[NSMutableArray alloc] initWithCapacity:properties.keyValues.size()]);
+ for (const auto& value : properties.keyValues)
+ [keyframes addObject:animationValueFromKeyframeValue(value)];
+
+ [keyframeAnimation setValues:keyframes.get()];
+ }
+
+ if (properties.keyTimes.size()) {
+ RetainPtr<NSMutableArray> keyTimes = adoptNS([[NSMutableArray alloc] initWithCapacity:properties.keyTimes.size()]);
+ for (auto keyTime : properties.keyTimes)
+ [keyTimes addObject:@(keyTime)];
+
+ [keyframeAnimation setKeyTimes:keyTimes.get()];
+ }
+
+ if (properties.timingFunctions.size()) {
+ RetainPtr<NSMutableArray> timingFunctions = adoptNS([[NSMutableArray alloc] initWithCapacity:properties.timingFunctions.size()]);
+ for (const auto& timingFunction : properties.timingFunctions)
+ [timingFunctions addObject:toCAMediaTimingFunction(timingFunction.get(), properties.reverseTimingFunctions)];
+
+ [keyframeAnimation setTimingFunctions:timingFunctions.get()];
+ }
+
+ caAnimation = keyframeAnimation;
+ break;
+ }
+ }
+
+ [caAnimation setBeginTime:properties.beginTime];
+ [caAnimation setDuration:properties.duration];
+ [caAnimation setTimeOffset:properties.timeOffset];
+ [caAnimation setRepeatCount:properties.repeatCount];
+ [caAnimation setSpeed:properties.speed];
+ [caAnimation setAutoreverses:properties.autoReverses];
+ [caAnimation setRemovedOnCompletion:properties.removedOnCompletion];
+ [caAnimation setAdditive:properties.additive];
+
+ if (properties.fillMode != PlatformCAAnimation::NoFillMode)
+ [caAnimation setFillMode:toCAFillModeType(properties.fillMode)];
+
+ if (properties.valueFunction != PlatformCAAnimation::NoValueFunction)
+ [caAnimation setValueFunction:[CAValueFunction functionWithName:toCAValueFunctionType(properties.valueFunction)]];
+
+ if (properties.hasNonZeroBeginTime)
+ [caAnimation.get() setValue:@YES forKey:WKNonZeroBeginTimeFlag];
+
+ if (layerTreeHost) {
+ GraphicsLayer::PlatformLayerID layerID = RemoteLayerTreeHost::layerID(layer);
+
+ RetainPtr<WKAnimationDelegate>& delegate = layerTreeHost->animationDelegates().add(layerID, nullptr).iterator->value;
+ if (!delegate)
+ delegate = adoptNS([[WKAnimationDelegate alloc] initWithLayerID:layerID layerTreeHost:layerTreeHost]);
+
+ [caAnimation setDelegate:delegate.get()];
+ }
+
+ [layer addAnimation:caAnimation.get() forKey:key];
+}
+
+void PlatformCAAnimationRemote::updateLayerAnimations(CALayer *layer, RemoteLayerTreeHost* layerTreeHost, const AnimationsMap& animationsToAdd, const HashSet<String>& animationsToRemove)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+ for (const auto& value : animationsToRemove)
+ [layer removeAnimationForKey:value];
+
+ for (const auto& keyValuePair : animationsToAdd)
+ addAnimationToLayer(layer, layerTreeHost, keyValuePair.key, keyValuePair.value);
+
+ END_BLOCK_OBJC_EXCEPTIONS;
+}
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCALayerRemotecpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -42,8 +42,9 @@
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><del>-using namespace WebKit;
</del><span class="cx">
</span><ins>+namespace WebKit {
+
</ins><span class="cx"> PassRefPtr<PlatformCALayerRemote> PlatformCALayerRemote::create(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<PlatformCALayerRemote> layer;
</span><span class="lines">@@ -124,7 +125,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_layerType == LayerTypeCustom) {
</span><del>- RemoteLayerTreePropertyApplier::applyProperties(platformLayer(), m_properties, RemoteLayerTreePropertyApplier::RelatedLayerMap());
</del><ins>+ RemoteLayerTreePropertyApplier::applyProperties(platformLayer(), nullptr, m_properties, RemoteLayerTreePropertyApplier::RelatedLayerMap());
</ins><span class="cx"> m_properties.changedProperties = RemoteLayerTreeTransaction::NoChange;
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="lines">@@ -145,6 +146,8 @@
</span><span class="cx">
</span><span class="cx"> void PlatformCALayerRemote::animationStarted(CFTimeInterval beginTime)
</span><span class="cx"> {
</span><ins>+ if (m_owner)
+ m_owner->platformCALayerAnimationStarted(beginTime);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlatformCALayerRemote::ensureBackingStore()
</span><span class="lines">@@ -267,18 +270,22 @@
</span><span class="cx">
</span><span class="cx"> void PlatformCALayerRemote::addAnimationForKey(const String& key, PlatformCAAnimation* animation)
</span><span class="cx"> {
</span><del>- ASSERT_NOT_REACHED();
</del><ins>+ m_properties.addedAnimations.set(key, toPlatformCAAnimationRemote(animation)->properties());
+ m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged);
+
+ m_context->willStartAnimationOnLayer(this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlatformCALayerRemote::removeAnimationForKey(const String& key)
</span><span class="cx"> {
</span><del>- ASSERT_NOT_REACHED();
</del><ins>+ // FIXME: remove from m_properties.addedAnimations ?
+ m_properties.keyPathsOfAnimationsToRemove.add(key);
+ m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::AnimationsChanged);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PassRefPtr<PlatformCAAnimation> PlatformCALayerRemote::animationForKey(const String& key)
</span><span class="cx"> {
</span><del>- ASSERT_NOT_REACHED();
-
</del><ins>+ // FIXME: implement.
</ins><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -589,3 +596,5 @@
</span><span class="cx"> ASSERT_NOT_REACHED();
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><ins>+
+} // namespace WebKit
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteCustommm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -37,8 +37,9 @@
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><del>-using namespace WebKit;
</del><span class="cx">
</span><ins>+namespace WebKit {
+
</ins><span class="cx"> static NSString * const platformCALayerPointer = @"WKPlatformCALayer";
</span><span class="cx"> PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom(PlatformLayer* customLayer, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</span><span class="cx"> : PlatformCALayerRemote(LayerTypeCustom, owner, context)
</span><span class="lines">@@ -83,3 +84,5 @@
</span><span class="cx"> } else
</span><span class="cx"> PlatformCALayerRemote::setNeedsDisplay(rect);
</span><span class="cx"> }
</span><ins>+
+} // namespace WebKit
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteTiledBackingcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -33,8 +33,9 @@
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><del>-using namespace WebKit;
</del><span class="cx">
</span><ins>+namespace WebKit {
+
</ins><span class="cx"> PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking(LayerType layerType, PlatformCALayerClient* owner, RemoteLayerTreeContext* context)
</span><span class="cx"> : PlatformCALayerRemote(layerType, owner, context)
</span><span class="cx"> {
</span><span class="lines">@@ -102,3 +103,5 @@
</span><span class="cx"> {
</span><span class="cx"> m_tileController->setTileDebugBorderColor(color);
</span><span class="cx"> }
</span><ins>+
+} // namespace WebKit
</ins></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacRemoteLayerTreeContexth"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -55,6 +55,11 @@
</span><span class="cx"> void flushOutOfTreeLayers();
</span><span class="cx"> void buildTransaction(RemoteLayerTreeTransaction&, WebCore::PlatformCALayer& rootLayer);
</span><span class="cx">
</span><ins>+ // From the UI process
+ void animationDidStart(WebCore::GraphicsLayer::PlatformLayerID, double startTime);
+
+ void willStartAnimationOnLayer(PlatformCALayerRemote*);
+
</ins><span class="cx"> private:
</span><span class="cx"> // WebCore::GraphicsLayerFactory
</span><span class="cx"> virtual std::unique_ptr<WebCore::GraphicsLayer> createGraphicsLayer(WebCore::GraphicsLayerClient*) override;
</span><span class="lines">@@ -66,6 +71,8 @@
</span><span class="cx">
</span><span class="cx"> Vector<RemoteLayerTreeTransaction::LayerCreationProperties> m_createdLayers;
</span><span class="cx"> Vector<WebCore::GraphicsLayer::PlatformLayerID> m_destroyedLayers;
</span><ins>+
+ HashMap<WebCore::GraphicsLayer::PlatformLayerID, PlatformCALayerRemote*> m_layersAwaitingAnimationStart;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacRemoteLayerTreeContextmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -65,6 +65,8 @@
</span><span class="cx"> {
</span><span class="cx"> ASSERT(!m_destroyedLayers.contains(layer->layerID()));
</span><span class="cx"> m_destroyedLayers.append(layer->layerID());
</span><ins>+
+ m_layersAwaitingAnimationStart.remove(layer->layerID());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RemoteLayerTreeContext::outOfTreeLayerWasAdded(GraphicsLayer* layer)
</span><span class="lines">@@ -102,4 +104,16 @@
</span><span class="cx"> transaction.setDestroyedLayerIDs(std::move(m_destroyedLayers));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void RemoteLayerTreeContext::willStartAnimationOnLayer(PlatformCALayerRemote* layer)
+{
+ m_layersAwaitingAnimationStart.add(layer->layerID(), layer);
+}
+
+void RemoteLayerTreeContext::animationDidStart(WebCore::GraphicsLayer::PlatformLayerID layerID, double startTime)
+{
+ auto it = m_layersAwaitingAnimationStart.find(layerID);
+ if (it != m_layersAwaitingAnimationStart.end())
+ it->value->animationStarted(startTime);
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -75,6 +75,8 @@
</span><span class="cx"> virtual void setExposedRect(const WebCore::FloatRect&) override;
</span><span class="cx"> virtual WebCore::FloatRect exposedRect() const override { return m_scrolledExposedRect; }
</span><span class="cx">
</span><ins>+ virtual void acceleratedAnimationDidStart(uint64_t layerID, double startTime) override;
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> virtual void setExposedContentRect(const WebCore::FloatRect&) override;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -240,6 +240,11 @@
</span><span class="cx"> flushLayers();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart(uint64_t layerID, double startTime)
+{
+ m_remoteLayerTreeContext->animationDidStart(layerID, startTime);
+}
+
</ins><span class="cx"> void RemoteLayerTreeDrawingArea::setExposedRect(const FloatRect& exposedRect)
</span><span class="cx"> {
</span><span class="cx"> m_exposedRect = exposedRect;
</span></span></pre></div>
<a id="tagsSafari538263SourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (166803 => 166804)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-04-04 22:08:47 UTC (rev 166803)
+++ tags/Safari-538.26.3/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-04-04 22:13:54 UTC (rev 166804)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx"> #import <WebCore/GraphicsLayerCA.h>
</span><span class="cx"> #import <WebCore/MainFrame.h>
</span><span class="cx"> #import <WebCore/Page.h>
</span><ins>+#import <WebCore/PlatformCAAnimationMac.h>
</ins><span class="cx"> #import <WebCore/RenderLayerBacking.h>
</span><span class="cx"> #import <WebCore/RenderLayerCompositor.h>
</span><span class="cx"> #import <WebCore/RenderView.h>
</span><span class="lines">@@ -754,7 +755,7 @@
</span><span class="cx"> transform.scale(scale);
</span><span class="cx">
</span><span class="cx"> RetainPtr<CABasicAnimation> renderViewAnimationCA = transientZoomSnapAnimationForKeyPath("transform");
</span><del>- RefPtr<PlatformCAAnimation> renderViewAnimation = PlatformCAAnimation::create(renderViewAnimationCA.get());
</del><ins>+ RefPtr<PlatformCAAnimation> renderViewAnimation = PlatformCAAnimationMac::create(renderViewAnimationCA.get());
</ins><span class="cx"> renderViewAnimation->setToValue(transform);
</span><span class="cx">
</span><span class="cx"> RetainPtr<CALayer> shadowLayer;
</span></span></pre>
</div>
</div>
</body>
</html>