<!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>[174715] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174715">174715</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-10-14 17:41:01 -0700 (Tue, 14 Oct 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Use is<>() / downcast<>() for PlatformCAAnimation subclasses
https://bugs.webkit.org/show_bug.cgi?id=137722
Reviewed by Simon Fraser.
Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
up the surrounding code.
Source/WebCore:
No new tests, no behavior change.
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::fadeIn):
(WebCore::ServicesOverlayController::Highlight::fadeOut):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
(WebCore::GraphicsLayerCA::updateAnimations):
(WebCore::GraphicsLayerCA::setAnimationOnLayer):
(WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCAAnimation.h:
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.h:
* platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
(PlatformCAAnimationMac::copy):
(PlatformCAAnimationMac::copyTimingFunctionFrom):
(PlatformCAAnimationMac::copyFromValueFrom):
(PlatformCAAnimationMac::copyToValueFrom):
(PlatformCAAnimationMac::copyValuesFrom):
(PlatformCAAnimationMac::copyKeyTimesFrom):
(PlatformCAAnimationMac::copyTimingFunctionsFrom):
* platform/graphics/ca/mac/PlatformCALayerMac.h:
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayerMac::addAnimationForKey):
* platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
(PlatformCAAnimationWin::copy):
(PlatformCAAnimationWin::copyTimingFunctionFrom):
(PlatformCAAnimationWin::copyFromValueFrom):
(PlatformCAAnimationWin::copyToValueFrom):
(PlatformCAAnimationWin::copyValuesFrom):
(PlatformCAAnimationWin::copyKeyTimesFrom):
(PlatformCAAnimationWin::copyTimingFunctionsFrom):
* platform/graphics/ca/win/PlatformCAAnimationWin.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::addAnimationForKey):
* platform/graphics/ca/win/PlatformCALayerWin.h:
Source/WebKit2:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::copy):
(WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
(WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
(WebKit::PlatformCAAnimationRemote::copyToValueFrom):
(WebKit::PlatformCAAnimationRemote::copyValuesFrom):
(WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
(WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::addAnimationForKey):
(WebKit::PlatformCALayerRemote::animationStarted):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagemacServicesOverlayControllermm">trunk/Source/WebCore/page/mac/ServicesOverlayController.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaPlatformCAAnimationh">trunk/Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaPlatformCALayerh">trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscamacPlatformCAAnimationMach">trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscamacPlatformCAAnimationMacmm">trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscamacPlatformCALayerMach">trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscamacPlatformCALayerMacmm">trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscawinPlatformCAAnimationWincpp">trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscawinPlatformCAAnimationWinh">trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscawinPlatformCALayerWincpp">trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscawinPlatformCALayerWinh">trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemotemm">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemotecpp">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/ChangeLog        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -1,5 +1,53 @@
</span><span class="cx"> 2014-10-14 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><ins>+ Use is<>() / downcast<>() for PlatformCAAnimation subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=137722
+
+ Reviewed by Simon Fraser.
+
+ Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
+ up the surrounding code.
+
+ No new tests, no behavior change.
+
+ * page/mac/ServicesOverlayController.mm:
+ (WebCore::ServicesOverlayController::Highlight::fadeIn):
+ (WebCore::ServicesOverlayController::Highlight::fadeOut):
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::moveOrCopyLayerAnimation):
+ (WebCore::GraphicsLayerCA::updateAnimations):
+ (WebCore::GraphicsLayerCA::setAnimationOnLayer):
+ (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer):
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ * platform/graphics/ca/PlatformCAAnimation.h:
+ * platform/graphics/ca/PlatformCALayer.h:
+ * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
+ * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
+ (PlatformCAAnimationMac::copy):
+ (PlatformCAAnimationMac::copyTimingFunctionFrom):
+ (PlatformCAAnimationMac::copyFromValueFrom):
+ (PlatformCAAnimationMac::copyToValueFrom):
+ (PlatformCAAnimationMac::copyValuesFrom):
+ (PlatformCAAnimationMac::copyKeyTimesFrom):
+ (PlatformCAAnimationMac::copyTimingFunctionsFrom):
+ * platform/graphics/ca/mac/PlatformCALayerMac.h:
+ * platform/graphics/ca/mac/PlatformCALayerMac.mm:
+ (PlatformCALayerMac::addAnimationForKey):
+ * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
+ (PlatformCAAnimationWin::copy):
+ (PlatformCAAnimationWin::copyTimingFunctionFrom):
+ (PlatformCAAnimationWin::copyFromValueFrom):
+ (PlatformCAAnimationWin::copyToValueFrom):
+ (PlatformCAAnimationWin::copyValuesFrom):
+ (PlatformCAAnimationWin::copyKeyTimesFrom):
+ (PlatformCAAnimationWin::copyTimingFunctionsFrom):
+ * platform/graphics/ca/win/PlatformCAAnimationWin.h:
+ * platform/graphics/ca/win/PlatformCALayerWin.cpp:
+ (PlatformCALayerWin::addAnimationForKey):
+ * platform/graphics/ca/win/PlatformCALayerWin.h:
+
+2014-10-14 Chris Dumez <cdumez@apple.com>
+
</ins><span class="cx"> Use is<>() / downcast<>() for RenderInline
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=137704
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagemacServicesOverlayControllermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/mac/ServicesOverlayController.mm (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/mac/ServicesOverlayController.mm        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/page/mac/ServicesOverlayController.mm        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -178,7 +178,7 @@
</span><span class="cx"> [animation setToValue:@1];
</span><span class="cx">
</span><span class="cx"> RefPtr<PlatformCAAnimation> platformAnimation = PlatformCAAnimationMac::create(animation.get());
</span><del>- downcast<GraphicsLayerCA>(*layer()).platformCALayer()->addAnimationForKey("FadeHighlightIn", platformAnimation.get());
</del><ins>+ downcast<GraphicsLayerCA>(*layer()).platformCALayer()->addAnimationForKey("FadeHighlightIn", *platformAnimation);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ServicesOverlayController::Highlight::fadeOut()
</span><span class="lines">@@ -196,7 +196,7 @@
</span><span class="cx"> }];
</span><span class="cx">
</span><span class="cx"> RefPtr<PlatformCAAnimation> platformAnimation = PlatformCAAnimationMac::create(animation.get());
</span><del>- downcast<GraphicsLayerCA>(*layer()).platformCALayer()->addAnimationForKey("FadeHighlightOut", platformAnimation.get());
</del><ins>+ downcast<GraphicsLayerCA>(*layer()).platformCALayer()->addAnimationForKey("FadeHighlightOut", *platformAnimation);
</ins><span class="cx"> [CATransaction commit];
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -549,11 +549,11 @@
</span><span class="cx"> switch (operation) {
</span><span class="cx"> case Move:
</span><span class="cx"> fromLayer->removeAnimationForKey(animationIdentifier);
</span><del>- toLayer->addAnimationForKey(animationIdentifier, anim.get());
</del><ins>+ toLayer->addAnimationForKey(animationIdentifier, *anim);
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> case Copy:
</span><del>- toLayer->addAnimationForKey(animationIdentifier, anim.get());
</del><ins>+ toLayer->addAnimationForKey(animationIdentifier, *anim);
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -2109,7 +2109,7 @@
</span><span class="cx"> if ((numAnimations = m_uncomittedAnimations.size())) {
</span><span class="cx"> for (size_t i = 0; i < numAnimations; ++i) {
</span><span class="cx"> const LayerPropertyAnimation& pendingAnimation = m_uncomittedAnimations[i];
</span><del>- setAnimationOnLayer(pendingAnimation.m_animation.get(), pendingAnimation.m_property, pendingAnimation.m_name, pendingAnimation.m_index, pendingAnimation.m_subIndex, pendingAnimation.m_timeOffset);
</del><ins>+ setAnimationOnLayer(*pendingAnimation.m_animation, pendingAnimation.m_property, pendingAnimation.m_name, pendingAnimation.m_index, pendingAnimation.m_subIndex, pendingAnimation.m_timeOffset);
</ins><span class="cx">
</span><span class="cx"> AnimationsMap::iterator it = m_runningAnimations.find(pendingAnimation.m_name);
</span><span class="cx"> if (it == m_runningAnimations.end()) {
</span><span class="lines">@@ -2141,12 +2141,12 @@
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsLayerCA::setAnimationOnLayer(PlatformCAAnimation* caAnim, AnimatedPropertyID property, const String& animationName, int index, int subIndex, double timeOffset)
</del><ins>+void GraphicsLayerCA::setAnimationOnLayer(PlatformCAAnimation& caAnim, AnimatedPropertyID property, const String& animationName, int index, int subIndex, double timeOffset)
</ins><span class="cx"> {
</span><span class="cx"> PlatformCALayer* layer = animatedLayer(property);
</span><span class="cx">
</span><span class="cx"> if (timeOffset)
</span><del>- caAnim->setBeginTime(CACurrentMediaTime() - timeOffset);
</del><ins>+ caAnim.setBeginTime(CACurrentMediaTime() - timeOffset);
</ins><span class="cx">
</span><span class="cx"> String animationID = animationIdentifier(animationName, property, index, subIndex);
</span><span class="cx">
</span><span class="lines">@@ -2221,7 +2221,7 @@
</span><span class="cx"> newAnim->setSpeed(0);
</span><span class="cx"> newAnim->setTimeOffset(timeOffset);
</span><span class="cx">
</span><del>- layer->addAnimationForKey(animationID, newAnim.get()); // This will replace the running animation.
</del><ins>+ layer->addAnimationForKey(animationID, *newAnim); // This will replace the running animation.
</ins><span class="cx">
</span><span class="cx"> // Pause the animations on the clones too.
</span><span class="cx"> if (LayerMap* layerCloneMap = animatedLayerClones(property)) {
</span><span class="lines">@@ -2230,7 +2230,7 @@
</span><span class="cx"> // Skip immediate replicas, since they move with the original.
</span><span class="cx"> if (m_replicaLayer && isReplicatedRootClone(it->key))
</span><span class="cx"> continue;
</span><del>- it->value->addAnimationForKey(animationID, newAnim.get());
</del><ins>+ it->value->addAnimationForKey(animationID, *newAnim);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -388,7 +388,7 @@
</span><span class="cx"> void ensureStructuralLayer(StructuralLayerPurpose);
</span><span class="cx"> StructuralLayerPurpose structuralLayerPurpose() const;
</span><span class="cx">
</span><del>- void setAnimationOnLayer(PlatformCAAnimation*, AnimatedPropertyID, const String& animationName, int index, int subIndex, double timeOffset);
</del><ins>+ void setAnimationOnLayer(PlatformCAAnimation&, AnimatedPropertyID, const String& animationName, int index, int subIndex, double timeOffset);
</ins><span class="cx"> bool removeCAAnimationFromLayer(AnimatedPropertyID, const String& animationName, int index, int subINdex);
</span><span class="cx"> void pauseCAAnimationOnLayer(AnimatedPropertyID, const String& animationName, int index, int subIndex, double timeOffset);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaPlatformCAAnimationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCAAnimation.h        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "FloatPoint3D.h"
</span><span class="cx"> #include "TransformationMatrix.h"
</span><span class="cx"> #include <wtf/RefCounted.h>
</span><ins>+#include <wtf/TypeCasts.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -77,7 +78,7 @@
</span><span class="cx"> virtual void setFillMode(FillModeType) = 0;
</span><span class="cx">
</span><span class="cx"> virtual void setTimingFunction(const TimingFunction*, bool reverse = false) = 0;
</span><del>- virtual void copyTimingFunctionFrom(const PlatformCAAnimation*) = 0;
</del><ins>+ virtual void copyTimingFunctionFrom(const PlatformCAAnimation&) = 0;
</ins><span class="cx">
</span><span class="cx"> virtual bool isRemovedOnCompletion() const = 0;
</span><span class="cx"> virtual void setRemovedOnCompletion(bool) = 0;
</span><span class="lines">@@ -94,14 +95,14 @@
</span><span class="cx"> virtual void setFromValue(const FloatPoint3D&) = 0;
</span><span class="cx"> virtual void setFromValue(const WebCore::Color&) = 0;
</span><span class="cx"> virtual void setFromValue(const FilterOperation*, int internalFilterPropertyIndex) = 0;
</span><del>- virtual void copyFromValueFrom(const PlatformCAAnimation*) = 0;
</del><ins>+ virtual void copyFromValueFrom(const PlatformCAAnimation&) = 0;
</ins><span class="cx">
</span><span class="cx"> virtual void setToValue(float) = 0;
</span><span class="cx"> virtual void setToValue(const WebCore::TransformationMatrix&) = 0;
</span><span class="cx"> virtual void setToValue(const FloatPoint3D&) = 0;
</span><span class="cx"> virtual void setToValue(const WebCore::Color&) = 0;
</span><span class="cx"> virtual void setToValue(const FilterOperation*, int internalFilterPropertyIndex) = 0;
</span><del>- virtual void copyToValueFrom(const PlatformCAAnimation*) = 0;
</del><ins>+ virtual void copyToValueFrom(const PlatformCAAnimation&) = 0;
</ins><span class="cx">
</span><span class="cx"> // Keyframe-animation properties.
</span><span class="cx"> virtual void setValues(const Vector<float>&) = 0;
</span><span class="lines">@@ -109,13 +110,13 @@
</span><span class="cx"> virtual void setValues(const Vector<FloatPoint3D>&) = 0;
</span><span class="cx"> virtual void setValues(const Vector<WebCore::Color>&) = 0;
</span><span class="cx"> virtual void setValues(const Vector<RefPtr<FilterOperation>>&, int internalFilterPropertyIndex) = 0;
</span><del>- virtual void copyValuesFrom(const PlatformCAAnimation*) = 0;
</del><ins>+ virtual void copyValuesFrom(const PlatformCAAnimation&) = 0;
</ins><span class="cx">
</span><span class="cx"> virtual void setKeyTimes(const Vector<float>&) = 0;
</span><del>- virtual void copyKeyTimesFrom(const PlatformCAAnimation*) = 0;
</del><ins>+ virtual void copyKeyTimesFrom(const PlatformCAAnimation&) = 0;
</ins><span class="cx">
</span><span class="cx"> virtual void setTimingFunctions(const Vector<const TimingFunction*>&, bool reverse = false) = 0;
</span><del>- virtual void copyTimingFunctionsFrom(const PlatformCAAnimation*) = 0;
</del><ins>+ virtual void copyTimingFunctionsFrom(const PlatformCAAnimation&) = 0;
</ins><span class="cx">
</span><span class="cx"> void setActualStartTimeIfNeeded(CFTimeInterval t)
</span><span class="cx"> {
</span><span class="lines">@@ -135,9 +136,11 @@
</span><span class="cx"> AnimationType m_type;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-#define PLATFORM_CAANIMATION_TYPE_CASTS(ToValueTypeName, predicate) \
- TYPE_CASTS_BASE(ToValueTypeName, WebCore::PlatformCAAnimation, object, object->predicate, object.predicate)
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-}
</del><ins>+#define SPECIALIZE_TYPE_TRAITS_CAANIMATION(ToValueTypeName, predicate) \
+SPECIALIZE_TYPE_TRAITS_BEGIN(ToValueTypeName) \
+ static bool isType(const WebCore::PlatformCAAnimation& animation) { return animation.predicate; } \
+SPECIALIZE_TYPE_TRAITS_END()
</ins><span class="cx">
</span><span class="cx"> #endif // PlatformCAAnimation_h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaPlatformCALayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -127,7 +127,7 @@
</span><span class="cx"> // Any sublayers previously in the current layer are removed.
</span><span class="cx"> virtual void adoptSublayers(PlatformCALayer& source) = 0;
</span><span class="cx">
</span><del>- virtual void addAnimationForKey(const String& key, PlatformCAAnimation*) = 0;
</del><ins>+ virtual void addAnimationForKey(const String& key, PlatformCAAnimation&) = 0;
</ins><span class="cx"> virtual void removeAnimationForKey(const String& key) = 0;
</span><span class="cx"> virtual PassRefPtr<PlatformCAAnimation> animationForKey(const String& key) = 0;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacPlatformCAAnimationMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> virtual void setFillMode(FillModeType) override;
</span><span class="cx">
</span><span class="cx"> virtual void setTimingFunction(const TimingFunction*, bool reverse = false) override;
</span><del>- void copyTimingFunctionFrom(const PlatformCAAnimation*) override;
</del><ins>+ void copyTimingFunctionFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual bool isRemovedOnCompletion() const override;
</span><span class="cx"> virtual void setRemovedOnCompletion(bool) override;
</span><span class="lines">@@ -100,14 +100,14 @@
</span><span class="cx"> virtual void setFromValue(const FloatPoint3D&) override;
</span><span class="cx"> virtual void setFromValue(const WebCore::Color&) override;
</span><span class="cx"> virtual void setFromValue(const FilterOperation*, int internalFilterPropertyIndex) override;
</span><del>- virtual void copyFromValueFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyFromValueFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void setToValue(float) override;
</span><span class="cx"> virtual void setToValue(const WebCore::TransformationMatrix&) override;
</span><span class="cx"> virtual void setToValue(const FloatPoint3D&) override;
</span><span class="cx"> virtual void setToValue(const WebCore::Color&) override;
</span><span class="cx"> virtual void setToValue(const FilterOperation*, int internalFilterPropertyIndex) override;
</span><del>- virtual void copyToValueFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyToValueFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> // Keyframe-animation properties.
</span><span class="cx"> virtual void setValues(const Vector<float>&) override;
</span><span class="lines">@@ -115,13 +115,13 @@
</span><span class="cx"> virtual void setValues(const Vector<FloatPoint3D>&) override;
</span><span class="cx"> virtual void setValues(const Vector<WebCore::Color>&) override;
</span><span class="cx"> virtual void setValues(const Vector<RefPtr<FilterOperation>>&, int internalFilterPropertyIndex) override;
</span><del>- virtual void copyValuesFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyValuesFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void setKeyTimes(const Vector<float>&) override;
</span><del>- virtual void copyKeyTimesFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyKeyTimesFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void setTimingFunctions(const Vector<const TimingFunction*>&, bool reverse = false) override;
</span><del>- virtual void copyTimingFunctionsFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyTimingFunctionsFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> PlatformCAAnimationMac(AnimationType, const String& keyPath);
</span><span class="lines">@@ -131,8 +131,8 @@
</span><span class="cx"> RetainPtr<CAPropertyAnimation> m_animation;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-PLATFORM_CAANIMATION_TYPE_CASTS(PlatformCAAnimationMac, isPlatformCAAnimationMac())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_CAANIMATION(WebCore::PlatformCAAnimationMac, isPlatformCAAnimationMac())
</ins><span class="cx">
</span><span class="cx"> #endif // PlatformCAAnimationMac_h
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacPlatformCAAnimationMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -199,19 +199,19 @@
</span><span class="cx"> animation->setFillMode(fillMode());
</span><span class="cx"> animation->setRemovedOnCompletion(isRemovedOnCompletion());
</span><span class="cx"> animation->setAdditive(isAdditive());
</span><del>- animation->copyTimingFunctionFrom(this);
</del><ins>+ animation->copyTimingFunctionFrom(*this);
</ins><span class="cx"> animation->setValueFunction(valueFunction());
</span><span class="cx">
</span><del>- setHasExplicitBeginTime(toPlatformCAAnimationMac(animation.get())->platformAnimation(), hasExplicitBeginTime(platformAnimation()));
</del><ins>+ setHasExplicitBeginTime(downcast<PlatformCAAnimationMac>(*animation).platformAnimation(), hasExplicitBeginTime(platformAnimation()));
</ins><span class="cx">
</span><span class="cx"> // Copy the specific Basic or Keyframe values.
</span><span class="cx"> if (animationType() == Keyframe) {
</span><del>- animation->copyValuesFrom(this);
- animation->copyKeyTimesFrom(this);
- animation->copyTimingFunctionsFrom(this);
</del><ins>+ animation->copyValuesFrom(*this);
+ animation->copyKeyTimesFrom(*this);
+ animation->copyTimingFunctionsFrom(*this);
</ins><span class="cx"> } else {
</span><del>- animation->copyFromValueFrom(this);
- animation->copyToValueFrom(this);
</del><ins>+ animation->copyFromValueFrom(*this);
+ animation->copyToValueFrom(*this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return animation;
</span><span class="lines">@@ -309,9 +309,9 @@
</span><span class="cx"> [m_animation setTimingFunction:toCAMediaTimingFunction(value, reverse)];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationMac::copyTimingFunctionFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyTimingFunctionFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- [m_animation setTimingFunction:[toPlatformCAAnimationMac(value)->m_animation.get() timingFunction]];
</del><ins>+ [m_animation setTimingFunction:[downcast<PlatformCAAnimationMac>(value).m_animation.get() timingFunction]];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool PlatformCAAnimationMac::isRemovedOnCompletion() const
</span><span class="lines">@@ -393,12 +393,12 @@
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setFromValue:value.get()];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationMac::copyFromValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyFromValueFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- if (animationType() != Basic || value->animationType() != Basic)
</del><ins>+ if (animationType() != Basic || value.animationType() != Basic)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CABasicAnimation* otherAnimation = static_cast<CABasicAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</del><ins>+ CABasicAnimation* otherAnimation = static_cast<CABasicAnimation*>(downcast<PlatformCAAnimationMac>(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><span class="lines">@@ -450,12 +450,12 @@
</span><span class="cx"> [static_cast<CABasicAnimation*>(m_animation.get()) setToValue:value.get()];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationMac::copyToValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyToValueFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- if (animationType() != Basic || value->animationType() != Basic)
</del><ins>+ if (animationType() != Basic || value.animationType() != Basic)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CABasicAnimation* otherAnimation = static_cast<CABasicAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</del><ins>+ CABasicAnimation* otherAnimation = static_cast<CABasicAnimation*>(downcast<PlatformCAAnimationMac>(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="lines">@@ -536,12 +536,12 @@
</span><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setValues:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationMac::copyValuesFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyValuesFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- if (animationType() != Keyframe || value->animationType() != Keyframe)
</del><ins>+ if (animationType() != Keyframe || value.animationType() != Keyframe)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CAKeyframeAnimation* otherAnimation = static_cast<CAKeyframeAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</del><ins>+ CAKeyframeAnimation* otherAnimation = static_cast<CAKeyframeAnimation*>(downcast<PlatformCAAnimationMac>(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><span class="lines">@@ -555,9 +555,9 @@
</span><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setKeyTimes:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationMac::copyKeyTimesFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyKeyTimesFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- CAKeyframeAnimation* other = static_cast<CAKeyframeAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</del><ins>+ CAKeyframeAnimation* other = static_cast<CAKeyframeAnimation*>(downcast<PlatformCAAnimationMac>(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><span class="lines">@@ -571,8 +571,8 @@
</span><span class="cx"> [static_cast<CAKeyframeAnimation*>(m_animation.get()) setTimingFunctions:array];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationMac::copyTimingFunctionsFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationMac::copyTimingFunctionsFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- CAKeyframeAnimation* other = static_cast<CAKeyframeAnimation*>(toPlatformCAAnimationMac(value)->m_animation.get());
</del><ins>+ CAKeyframeAnimation* other = static_cast<CAKeyframeAnimation*>(downcast<PlatformCAAnimationMac>(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="trunkSourceWebCoreplatformgraphicscamacPlatformCALayerMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx"> virtual const PlatformCALayerList* customSublayers() const override { return m_customSublayers.get(); }
</span><span class="cx"> virtual void adoptSublayers(PlatformCALayer& source) override;
</span><span class="cx">
</span><del>- virtual void addAnimationForKey(const String& key, PlatformCAAnimation*) override;
</del><ins>+ virtual void addAnimationForKey(const String& key, PlatformCAAnimation&) override;
</ins><span class="cx"> virtual void removeAnimationForKey(const String& key) override;
</span><span class="cx"> virtual PassRefPtr<PlatformCAAnimation> animationForKey(const String& key) override;
</span><span class="cx"> virtual void animationStarted(const String& key, CFTimeInterval beginTime) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscamacPlatformCALayerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -453,7 +453,7 @@
</span><span class="cx"> END_BLOCK_OBJC_EXCEPTIONS
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCALayerMac::addAnimationForKey(const String& key, PlatformCAAnimation* animation)
</del><ins>+void PlatformCALayerMac::addAnimationForKey(const String& key, PlatformCAAnimation& animation)
</ins><span class="cx"> {
</span><span class="cx"> // Add the delegate
</span><span class="cx"> if (!m_delegate) {
</span><span class="lines">@@ -462,7 +462,7 @@
</span><span class="cx"> [webAnimationDelegate setOwner:this];
</span><span class="cx"> }
</span><span class="cx">
</span><del>- CAPropertyAnimation* propertyAnimation = static_cast<CAPropertyAnimation*>(toPlatformCAAnimationMac(animation)->platformAnimation());
</del><ins>+ CAPropertyAnimation* propertyAnimation = static_cast<CAPropertyAnimation*>(downcast<PlatformCAAnimationMac>(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></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscawinPlatformCAAnimationWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.cpp (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.cpp        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.cpp        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -190,18 +190,18 @@
</span><span class="cx"> animation->setFillMode(fillMode());
</span><span class="cx"> animation->setRemovedOnCompletion(isRemovedOnCompletion());
</span><span class="cx"> animation->setAdditive(isAdditive());
</span><del>- animation->copyTimingFunctionFrom(this);
</del><ins>+ animation->copyTimingFunctionFrom(*this);
</ins><span class="cx"> if (valueFunction())
</span><span class="cx"> animation->setValueFunction(valueFunction());
</span><span class="cx">
</span><span class="cx"> // Copy the specific Basic or Keyframe values
</span><span class="cx"> if (animationType() == Keyframe) {
</span><del>- animation->copyValuesFrom(this);
- animation->copyKeyTimesFrom(this);
- animation->copyTimingFunctionsFrom(this);
</del><ins>+ animation->copyValuesFrom(*this);
+ animation->copyKeyTimesFrom(*this);
+ animation->copyTimingFunctionsFrom(*this);
</ins><span class="cx"> } else {
</span><del>- animation->copyFromValueFrom(this);
- animation->copyToValueFrom(this);
</del><ins>+ animation->copyFromValueFrom(*this);
+ animation->copyToValueFrom(*this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return animation;
</span><span class="lines">@@ -297,9 +297,9 @@
</span><span class="cx"> CACFAnimationSetTimingFunction(m_animation.get(), toCACFTimingFunction(value, reverse).get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationWin::copyTimingFunctionFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyTimingFunctionFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- CACFTimingFunctionRef timingFunc = CACFAnimationGetTimingFunction(toPlatformCAAnimationWin(value)->m_animation.get());
</del><ins>+ CACFTimingFunctionRef timingFunc = CACFAnimationGetTimingFunction(downcast<PlatformCAAnimationWin>(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="lines">@@ -379,12 +379,12 @@
</span><span class="cx"> // FIXME: Hardware filter animation not implemented on Windows
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationWin::copyFromValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyFromValueFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- if (animationType() != Basic || value->animationType() != Basic)
</del><ins>+ if (animationType() != Basic || value.animationType() != Basic)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CACFAnimationSetFromValue(m_animation.get(), CACFAnimationGetFromValue(toPlatformCAAnimationWin(value)->platformAnimation()));
</del><ins>+ CACFAnimationSetFromValue(m_animation.get(), CACFAnimationGetFromValue(downcast<PlatformCAAnimationWin>(value).platformAnimation()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlatformCAAnimationWin::setToValue(float value)
</span><span class="lines">@@ -430,12 +430,12 @@
</span><span class="cx"> // FIXME: Hardware filter animation not implemented on Windows
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationWin::copyToValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyToValueFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- if (animationType() != Basic || value->animationType() != Basic)
</del><ins>+ if (animationType() != Basic || value.animationType() != Basic)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CACFAnimationSetToValue(m_animation.get(), CACFAnimationGetToValue(toPlatformCAAnimationWin(value)->platformAnimation()));
</del><ins>+ CACFAnimationSetToValue(m_animation.get(), CACFAnimationGetToValue(downcast<PlatformCAAnimationWin>(value).platformAnimation()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Keyframe-animation properties.
</span><span class="lines">@@ -502,12 +502,12 @@
</span><span class="cx"> // FIXME: Hardware filter animation not implemented on Windows
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationWin::copyValuesFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyValuesFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- if (animationType() != Keyframe || value->animationType() != Keyframe)
</del><ins>+ if (animationType() != Keyframe || value.animationType() != Keyframe)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- CACFAnimationSetValues(m_animation.get(), CACFAnimationGetValues(toPlatformCAAnimationWin(value)->platformAnimation()));
</del><ins>+ CACFAnimationSetValues(m_animation.get(), CACFAnimationGetValues(downcast<PlatformCAAnimationWin>(value).platformAnimation()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlatformCAAnimationWin::setKeyTimes(const Vector<float>& value)
</span><span class="lines">@@ -524,12 +524,12 @@
</span><span class="cx"> CACFAnimationSetKeyTimes(m_animation.get(), array.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationWin::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(toPlatformCAAnimationWin(value)->platformAnimation()));
</del><ins>+ CACFAnimationSetKeyTimes(m_animation.get(), CACFAnimationGetKeyTimes(downcast<PlatformCAAnimationWin>(value).platformAnimation()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlatformCAAnimationWin::setTimingFunctions(const Vector<const TimingFunction*>& value, bool reverse)
</span><span class="lines">@@ -547,9 +547,9 @@
</span><span class="cx"> CACFAnimationSetTimingFunctions(m_animation.get(), array.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationWin::copyTimingFunctionsFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationWin::copyTimingFunctionsFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- CACFAnimationSetTimingFunctions(m_animation.get(), CACFAnimationGetTimingFunctions(toPlatformCAAnimationWin(value)->platformAnimation()));
</del><ins>+ CACFAnimationSetTimingFunctions(m_animation.get(), CACFAnimationGetTimingFunctions(downcast<PlatformCAAnimationWin>(value).platformAnimation()));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #endif // PLATFORM(WIN)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscawinPlatformCAAnimationWinh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCAAnimationWin.h        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> virtual void setFillMode(FillModeType) override;
</span><span class="cx">
</span><span class="cx"> virtual void setTimingFunction(const TimingFunction*, bool reverse = false) override;
</span><del>- void copyTimingFunctionFrom(const PlatformCAAnimation*) override;
</del><ins>+ void copyTimingFunctionFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual bool isRemovedOnCompletion() const override;
</span><span class="cx"> virtual void setRemovedOnCompletion(bool) override;
</span><span class="lines">@@ -90,14 +90,14 @@
</span><span class="cx"> virtual void setFromValue(const FloatPoint3D&) override;
</span><span class="cx"> virtual void setFromValue(const WebCore::Color&) override;
</span><span class="cx"> virtual void setFromValue(const FilterOperation*, int internalFilterPropertyIndex) override;
</span><del>- virtual void copyFromValueFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyFromValueFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void setToValue(float) override;
</span><span class="cx"> virtual void setToValue(const WebCore::TransformationMatrix&) override;
</span><span class="cx"> virtual void setToValue(const FloatPoint3D&) override;
</span><span class="cx"> virtual void setToValue(const WebCore::Color&) override;
</span><span class="cx"> virtual void setToValue(const FilterOperation*, int internalFilterPropertyIndex) override;
</span><del>- virtual void copyToValueFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyToValueFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> // Keyframe-animation properties.
</span><span class="cx"> virtual void setValues(const Vector<float>&) override;
</span><span class="lines">@@ -105,13 +105,13 @@
</span><span class="cx"> virtual void setValues(const Vector<FloatPoint3D>&) override;
</span><span class="cx"> virtual void setValues(const Vector<WebCore::Color>&) override;
</span><span class="cx"> virtual void setValues(const Vector<RefPtr<FilterOperation>>&, int internalFilterPropertyIndex) override;
</span><del>- virtual void copyValuesFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyValuesFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void setKeyTimes(const Vector<float>&) override;
</span><del>- virtual void copyKeyTimesFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyKeyTimesFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void setTimingFunctions(const Vector<const TimingFunction*>&, bool reverse = false) override;
</span><del>- virtual void copyTimingFunctionsFrom(const PlatformCAAnimation*) override;
</del><ins>+ virtual void copyTimingFunctionsFrom(const PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> PlatformCAAnimationWin(AnimationType, const String& keyPath);
</span><span class="lines">@@ -121,9 +121,9 @@
</span><span class="cx"> RetainPtr<CACFAnimationRef> m_animation;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-PLATFORM_CAANIMATION_TYPE_CASTS(PlatformCAAnimationWin, isPlatformCAAnimationWin())
</del><ins>+} // namespace WebCore
</ins><span class="cx">
</span><del>-}
</del><ins>+SPECIALIZE_TYPE_TRAITS_CAANIMATION(WebCore::PlatformCAAnimationWin, isPlatformCAAnimationWin())
</ins><span class="cx">
</span><span class="cx"> #endif // PLATFORM(WIN)
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscawinPlatformCALayerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -309,12 +309,12 @@
</span><span class="cx"> setSublayers(sublayers);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCALayerWin::addAnimationForKey(const String& key, PlatformCAAnimation* animation)
</del><ins>+void PlatformCALayerWin::addAnimationForKey(const String& key, PlatformCAAnimation& animation)
</ins><span class="cx"> {
</span><span class="cx"> // Add it to the animation list
</span><del>- m_animations.add(key, animation);
</del><ins>+ m_animations.add(key, &animation);
</ins><span class="cx">
</span><del>- CACFLayerAddAnimation(m_layer.get(), key.createCFString().get(), toPlatformCAAnimationWin(animation)->platformAnimation());
</del><ins>+ CACFLayerAddAnimation(m_layer.get(), key.createCFString().get(), downcast<PlatformCAAnimationWin>(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="trunkSourceWebCoreplatformgraphicscawinPlatformCALayerWinh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -52,7 +52,7 @@
</span><span class="cx"> virtual const PlatformCALayerList* customSublayers() const override { return m_customSublayers.get(); }
</span><span class="cx"> virtual void adoptSublayers(PlatformCALayer& source) override;
</span><span class="cx">
</span><del>- virtual void addAnimationForKey(const String& key, PlatformCAAnimation*) override;
</del><ins>+ virtual void addAnimationForKey(const String& key, PlatformCAAnimation&) override;
</ins><span class="cx"> virtual void removeAnimationForKey(const String& key) override;
</span><span class="cx"> virtual PassRefPtr<PlatformCAAnimation> animationForKey(const String& key) override;
</span><span class="cx"> virtual void animationStarted(const String& key, CFTimeInterval beginTime) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebKit2/ChangeLog        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2014-10-14 Chris Dumez <cdumez@apple.com>
+
+ Use is<>() / downcast<>() for PlatformCAAnimation subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=137722
+
+ Reviewed by Simon Fraser.
+
+ Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
+ up the surrounding code.
+
+ * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
+ * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
+ (WebKit::PlatformCAAnimationRemote::copy):
+ (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
+ (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
+ (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
+ (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
+ (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
+ (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
+ * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+ (WebKit::PlatformCALayerRemote::addAnimationForKey):
+ (WebKit::PlatformCALayerRemote::animationStarted):
+ * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
+
</ins><span class="cx"> 2014-10-14 Alexey Proskuryakov <ap@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r165356): Issues with Japanese text input
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> virtual void setFillMode(FillModeType) override;
</span><span class="cx">
</span><span class="cx"> virtual void setTimingFunction(const WebCore::TimingFunction*, bool reverse = false) override;
</span><del>- void copyTimingFunctionFrom(const WebCore::PlatformCAAnimation*) override;
</del><ins>+ void copyTimingFunctionFrom(const WebCore::PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual bool isRemovedOnCompletion() const override;
</span><span class="cx"> virtual void setRemovedOnCompletion(bool) override;
</span><span class="lines">@@ -92,14 +92,14 @@
</span><span class="cx"> virtual void setFromValue(const WebCore::FloatPoint3D&) override;
</span><span class="cx"> virtual void setFromValue(const WebCore::Color&) override;
</span><span class="cx"> virtual void setFromValue(const WebCore::FilterOperation*, int internalFilterPropertyIndex) override;
</span><del>- virtual void copyFromValueFrom(const WebCore::PlatformCAAnimation*) override;
</del><ins>+ virtual void copyFromValueFrom(const WebCore::PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void setToValue(float) override;
</span><span class="cx"> virtual void setToValue(const WebCore::TransformationMatrix&) override;
</span><span class="cx"> virtual void setToValue(const WebCore::FloatPoint3D&) override;
</span><span class="cx"> virtual void setToValue(const WebCore::Color&) override;
</span><span class="cx"> virtual void setToValue(const WebCore::FilterOperation*, int internalFilterPropertyIndex) override;
</span><del>- virtual void copyToValueFrom(const WebCore::PlatformCAAnimation*) override;
</del><ins>+ virtual void copyToValueFrom(const WebCore::PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> // Keyframe-animation properties.
</span><span class="cx"> virtual void setValues(const Vector<float>&) override;
</span><span class="lines">@@ -107,13 +107,13 @@
</span><span class="cx"> virtual void setValues(const Vector<WebCore::FloatPoint3D>&) override;
</span><span class="cx"> virtual void setValues(const Vector<WebCore::Color>&) override;
</span><span class="cx"> virtual void setValues(const Vector<RefPtr<WebCore::FilterOperation>>&, int internalFilterPropertyIndex) override;
</span><del>- virtual void copyValuesFrom(const WebCore::PlatformCAAnimation*) override;
</del><ins>+ virtual void copyValuesFrom(const WebCore::PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void setKeyTimes(const Vector<float>&) override;
</span><del>- virtual void copyKeyTimesFrom(const WebCore::PlatformCAAnimation*) override;
</del><ins>+ virtual void copyKeyTimesFrom(const WebCore::PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> virtual void setTimingFunctions(const Vector<const WebCore::TimingFunction*>&, bool reverse = false) override;
</span><del>- virtual void copyTimingFunctionsFrom(const WebCore::PlatformCAAnimation*) override;
</del><ins>+ virtual void copyTimingFunctionsFrom(const WebCore::PlatformCAAnimation&) override;
</ins><span class="cx">
</span><span class="cx"> AnimationType animationType() const { return m_properties.animationType; }
</span><span class="cx"> void setHasExplicitBeginTime(bool hasExplicitBeginTime) { m_properties.hasExplicitBeginTime = hasExplicitBeginTime; }
</span><span class="lines">@@ -297,8 +297,8 @@
</span><span class="cx"> Properties m_properties;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-PLATFORM_CAANIMATION_TYPE_CASTS(PlatformCAAnimationRemote, isPlatformCAAnimationRemote())
-
</del><span class="cx"> } // namespace WebKit
</span><span class="cx">
</span><ins>+SPECIALIZE_TYPE_TRAITS_CAANIMATION(WebKit::PlatformCAAnimationRemote, isPlatformCAAnimationRemote())
+
</ins><span class="cx"> #endif // PlatformCAAnimationRemote_h
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemotemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -295,19 +295,19 @@
</span><span class="cx"> animation->setFillMode(fillMode());
</span><span class="cx"> animation->setRemovedOnCompletion(isRemovedOnCompletion());
</span><span class="cx"> animation->setAdditive(isAdditive());
</span><del>- animation->copyTimingFunctionFrom(this);
</del><ins>+ animation->copyTimingFunctionFrom(*this);
</ins><span class="cx"> animation->setValueFunction(valueFunction());
</span><span class="cx">
</span><del>- toPlatformCAAnimationRemote(animation.get())->setHasExplicitBeginTime(hasExplicitBeginTime());
</del><ins>+ downcast<PlatformCAAnimationRemote>(*animation).setHasExplicitBeginTime(hasExplicitBeginTime());
</ins><span class="cx">
</span><span class="cx"> // Copy the specific Basic or Keyframe values.
</span><span class="cx"> if (animationType() == Keyframe) {
</span><del>- animation->copyValuesFrom(this);
- animation->copyKeyTimesFrom(this);
- animation->copyTimingFunctionsFrom(this);
</del><ins>+ animation->copyValuesFrom(*this);
+ animation->copyKeyTimesFrom(*this);
+ animation->copyTimingFunctionsFrom(*this);
</ins><span class="cx"> } else {
</span><del>- animation->copyFromValueFrom(this);
- animation->copyToValueFrom(this);
</del><ins>+ animation->copyFromValueFrom(*this);
+ animation->copyToValueFrom(*this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return animation;
</span><span class="lines">@@ -411,7 +411,7 @@
</span><span class="cx"> m_properties.reverseTimingFunctions = reverse;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationRemote::copyTimingFunctionFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationRemote::copyTimingFunctionFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><span class="cx"> copyTimingFunctionsFrom(value);
</span><span class="cx"> }
</span><span class="lines">@@ -491,15 +491,15 @@
</span><span class="cx"> m_properties.keyValues[0] = KeyframeValue(operation->clone());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationRemote::copyFromValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationRemote::copyFromValueFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- const PlatformCAAnimationRemote* other = toPlatformCAAnimationRemote(value);
</del><ins>+ const PlatformCAAnimationRemote& other = downcast<PlatformCAAnimationRemote>(value);
</ins><span class="cx">
</span><del>- if (other->m_properties.keyValues.isEmpty())
</del><ins>+ if (other.m_properties.keyValues.isEmpty())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> m_properties.keyValues.resize(2);
</span><del>- m_properties.keyValues[0] = other->m_properties.keyValues[0];
</del><ins>+ m_properties.keyValues[0] = other.m_properties.keyValues[0];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlatformCAAnimationRemote::setToValue(float value)
</span><span class="lines">@@ -549,14 +549,14 @@
</span><span class="cx"> m_properties.keyValues[1] = KeyframeValue(operation->clone());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationRemote::copyToValueFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationRemote::copyToValueFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- const PlatformCAAnimationRemote* other = toPlatformCAAnimationRemote(value);
</del><ins>+ const PlatformCAAnimationRemote& other = downcast<PlatformCAAnimationRemote>(value);
</ins><span class="cx">
</span><del>- if (other->m_properties.keyValues.size() < 2)
</del><ins>+ if (other.m_properties.keyValues.size() < 2)
</ins><span class="cx"> return;
</span><span class="cx"> m_properties.keyValues.resize(2);
</span><del>- m_properties.keyValues[1] = other->m_properties.keyValues[1];
</del><ins>+ m_properties.keyValues[1] = other.m_properties.keyValues[1];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Keyframe-animation properties.
</span><span class="lines">@@ -632,10 +632,9 @@
</span><span class="cx"> m_properties.keyValues = WTF::move(keyframes);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationRemote::copyValuesFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationRemote::copyValuesFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- const PlatformCAAnimationRemote* other = toPlatformCAAnimationRemote(value);
- m_properties.keyValues = other->m_properties.keyValues;
</del><ins>+ m_properties.keyValues = downcast<PlatformCAAnimationRemote>(value).m_properties.keyValues;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlatformCAAnimationRemote::setKeyTimes(const Vector<float>& keyTimes)
</span><span class="lines">@@ -643,10 +642,9 @@
</span><span class="cx"> m_properties.keyTimes = keyTimes;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationRemote::copyKeyTimesFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationRemote::copyKeyTimesFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- const PlatformCAAnimationRemote* other = toPlatformCAAnimationRemote(value);
- m_properties.keyTimes = other->m_properties.keyTimes;
</del><ins>+ m_properties.keyTimes = downcast<PlatformCAAnimationRemote>(value).m_properties.keyTimes;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void PlatformCAAnimationRemote::setTimingFunctions(const Vector<const TimingFunction*>& values, bool reverse)
</span><span class="lines">@@ -661,12 +659,12 @@
</span><span class="cx"> m_properties.reverseTimingFunctions = reverse;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCAAnimationRemote::copyTimingFunctionsFrom(const PlatformCAAnimation* value)
</del><ins>+void PlatformCAAnimationRemote::copyTimingFunctionsFrom(const PlatformCAAnimation& value)
</ins><span class="cx"> {
</span><del>- const PlatformCAAnimationRemote* other = toPlatformCAAnimationRemote(value);
</del><ins>+ const PlatformCAAnimationRemote& other = downcast<PlatformCAAnimationRemote>(value);
</ins><span class="cx">
</span><del>- m_properties.timingFunctions = other->m_properties.timingFunctions;
- m_properties.reverseTimingFunctions = other->m_properties.reverseTimingFunctions;
</del><ins>+ m_properties.timingFunctions = other.m_properties.timingFunctions;
+ m_properties.reverseTimingFunctions = other.m_properties.reverseTimingFunctions;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static NSObject* animationValueFromKeyframeValue(const PlatformCAAnimationRemote::KeyframeValue& keyframeValue)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemotecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -321,15 +321,15 @@
</span><span class="cx"> setSublayers(layersToMove);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PlatformCALayerRemote::addAnimationForKey(const String& key, PlatformCAAnimation* animation)
</del><ins>+void PlatformCALayerRemote::addAnimationForKey(const String& key, PlatformCAAnimation& animation)
</ins><span class="cx"> {
</span><del>- auto addResult = m_animations.set(key, animation);
</del><ins>+ auto addResult = m_animations.set(key, &animation);
</ins><span class="cx"> if (addResult.isNewEntry)
</span><del>- m_properties.addedAnimations.append(std::pair<String, PlatformCAAnimationRemote::Properties>(key, toPlatformCAAnimationRemote(animation)->properties()));
</del><ins>+ m_properties.addedAnimations.append(std::pair<String, PlatformCAAnimationRemote::Properties>(key, downcast<PlatformCAAnimationRemote>(animation).properties()));
</ins><span class="cx"> else {
</span><span class="cx"> for (auto& keyAnimationPair : m_properties.addedAnimations) {
</span><span class="cx"> if (keyAnimationPair.first == key) {
</span><del>- keyAnimationPair.second = toPlatformCAAnimationRemote(animation)->properties();
</del><ins>+ keyAnimationPair.second = downcast<PlatformCAAnimationRemote>(animation).properties();
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -364,7 +364,7 @@
</span><span class="cx"> {
</span><span class="cx"> auto it = m_animations.find(key);
</span><span class="cx"> if (it != m_animations.end())
</span><del>- toPlatformCAAnimationRemote(it->value.get())->didStart(beginTime);
</del><ins>+ downcast<PlatformCAAnimationRemote>(*it->value).didStart(beginTime);
</ins><span class="cx">
</span><span class="cx"> if (m_owner)
</span><span class="cx"> m_owner->platformCALayerAnimationStarted(key, beginTime);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCALayerRemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.h        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -66,7 +66,7 @@
</span><span class="cx"> virtual const WebCore::PlatformCALayerList* customSublayers() const override { return nullptr; }
</span><span class="cx"> virtual void adoptSublayers(WebCore::PlatformCALayer& source) override;
</span><span class="cx">
</span><del>- virtual void addAnimationForKey(const String& key, WebCore::PlatformCAAnimation*) override;
</del><ins>+ virtual void addAnimationForKey(const String& key, WebCore::PlatformCAAnimation&) override;
</ins><span class="cx"> virtual void removeAnimationForKey(const String& key) override;
</span><span class="cx"> virtual PassRefPtr<WebCore::PlatformCAAnimation> animationForKey(const String& key) override;
</span><span class="cx"> virtual void animationStarted(const String& key, CFTimeInterval beginTime) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacTiledCoreAnimationDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (174714 => 174715)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-10-15 00:29:51 UTC (rev 174714)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm        2014-10-15 00:41:01 UTC (rev 174715)
</span><span class="lines">@@ -673,7 +673,7 @@
</span><span class="cx"> drawingArea->applyTransientZoomToPage(scale, origin);
</span><span class="cx"> }];
</span><span class="cx">
</span><del>- zoomLayer->addAnimationForKey("transientZoomCommit", renderViewAnimation.get());
</del><ins>+ zoomLayer->addAnimationForKey("transientZoomCommit", *renderViewAnimation);
</ins><span class="cx">
</span><span class="cx"> if (shadowCALayer) {
</span><span class="cx"> FloatRect shadowBounds = shadowLayerBoundsForFrame(frameView, scale);
</span></span></pre>
</div>
</div>
</body>
</html>