<!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>[167266] 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/167266">167266</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-04-14 13:46:26 -0700 (Mon, 14 Apr 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Run filter animations in the UI process with UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=131199
<rdar://problem/16479487>
Source/WebCore:
Reviewed by Sam Weinig.
Add FilterOperation::clone() which is used during decoding.
Export some things.
* WebCore.exp.in:
* platform/graphics/filters/FilterOperation.h:
Source/WebKit2:
Reviewed by Sam Weinig.
* Shared/WebCoreArgumentCoders.cpp: Removed lots of WebCore::
(IPC::ArgumentCoder<SelectionRect>::decode):
(IPC::ArgumentCoder<PasteboardWebContent>::encode):
(IPC::ArgumentCoder<PasteboardWebContent>::decode):
(IPC::ArgumentCoder<PasteboardImage>::encode):
(IPC::ArgumentCoder<PasteboardImage>::decode):
(IPC::ArgumentCoder<URL>::decode):
(IPC::ArgumentCoder<UserStyleSheet>::encode):
(IPC::ArgumentCoder<UserStyleSheet>::decode):
(IPC::ArgumentCoder<UserScript>::encode):
(IPC::ArgumentCoder<UserScript>::decode):
(IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
(IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
(IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
(IPC::ArgumentCoder<FixedPositionViewportConstraints>::decode):
(IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
(IPC::ArgumentCoder<StickyPositionViewportConstraints>::decode):
(IPC::ArgumentCoder<FilterOperation>::encode):
(IPC::decodeFilterOperation):
(IPC::ArgumentCoder<FilterOperations>::encode):
(IPC::ArgumentCoder<WebCore::UserStyleSheet>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::UserStyleSheet>::decode): Deleted.
(IPC::ArgumentCoder<WebCore::UserScript>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::UserScript>::decode): Deleted.
(IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::decode): Deleted.
(IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode): Deleted.
(IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode): Deleted.
(IPC::encodeFilterOperation): Deleted.
Add encoding/decoding support for FilterOperation.
decodeFilterOperation() has to be a bare function because of the RefPtr
out parameter.
REFERENCE filters should never be encoded, since they have CachedSVGDocumentReferences.
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
Add logging for filter animations to the RemoteLayerTree log output.
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::addAnimation): Deleted. We can run
filter animations now.
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
KeyValues have a RefPtr<WebCore::FilterOperation> now (which can't be part of
the union because we need its constructor to get called).
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::KeyframeValue::encode): Encode the filter.
(WebKit::PlatformCAAnimationRemote::KeyframeValue::decode): Decode the filter.
(WebKit::PlatformCAAnimationRemote::setFromValue): Implement.
(WebKit::PlatformCAAnimationRemote::setToValue): Implement.
(WebKit::PlatformCAAnimationRemote::setValues): Implement.
(WebKit::animationValueFromKeyframeValue): Handle filters.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFilterOperationh">trunk/Source/WebCore/platform/graphics/filters/FilterOperation.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCodersh">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemotecpp">trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh">trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h</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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebCore/ChangeLog        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-04-14 Simon Fraser <simon.fraser@apple.com>
+
+ Run filter animations in the UI process with UI-side compositing
+ https://bugs.webkit.org/show_bug.cgi?id=131199
+ <rdar://problem/16479487>
+
+ Reviewed by Sam Weinig.
+
+ Add FilterOperation::clone() which is used during decoding.
+ Export some things.
+
+ * WebCore.exp.in:
+ * platform/graphics/filters/FilterOperation.h:
+
</ins><span class="cx"> 2014-04-14 Jer Noble <jer.noble@apple.com>
</span><span class="cx">
</span><span class="cx"> Use after free in WebCore::CachedResourceHandleBase::~CachedResourceHandleBase / WebCore::removeDetachedChildrenInContainer
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -105,6 +105,7 @@
</span><span class="cx"> __ZN7WebCore10TextStreamlsEPKc
</span><span class="cx"> __ZN7WebCore10TextStreamlsEPKv
</span><span class="cx"> __ZN7WebCore10TextStreamlsERKN3WTF6StringE
</span><ins>+__ZN7WebCore10TextStreamlsERKNS_8IntPointE
</ins><span class="cx"> __ZN7WebCore10TextStreamlsERKNS_9FloatSizeE
</span><span class="cx"> __ZN7WebCore10TextStreamlsEb
</span><span class="cx"> __ZN7WebCore10TextStreamlsEd
</span><span class="lines">@@ -735,6 +736,7 @@
</span><span class="cx"> __ZN7WebCore17MouseRelatedEvent7offsetXEv
</span><span class="cx"> __ZN7WebCore17MouseRelatedEvent7offsetYEv
</span><span class="cx"> __ZN7WebCore17PlatformCAFilters17setFiltersOnLayerEP7CALayerRKNS_16FilterOperationsE
</span><ins>+__ZN7WebCore17PlatformCAFilters23filterValueForOperationEPKNS_15FilterOperationEi
</ins><span class="cx"> __ZN7WebCore17SQLiteTransaction5beginEv
</span><span class="cx"> __ZN7WebCore17SQLiteTransaction6commitEv
</span><span class="cx"> __ZN7WebCore17SQLiteTransaction8rollbackEv
</span><span class="lines">@@ -814,6 +816,7 @@
</span><span class="cx"> __ZN7WebCore19TextResourceDecoderC1ERKN3WTF6StringERKNS_12TextEncodingEb
</span><span class="cx"> __ZN7WebCore19TextResourceDecoderD1Ev
</span><span class="cx"> __ZN7WebCore19enclosingLayoutRectERKNS_9FloatRectE
</span><ins>+__ZN7WebCore19floatValueForLengthERKNS_6LengthEfPNS_10RenderViewE
</ins><span class="cx"> __ZN7WebCore19getFileCreationTimeERKN3WTF6StringERl
</span><span class="cx"> __ZN7WebCore19toInt32EnforceRangeEPN3JSC9ExecStateENS0_7JSValueE
</span><span class="cx"> __ZN7WebCore20ApplicationCacheHost17maybeLoadResourceEPNS_14ResourceLoaderERKNS_15ResourceRequestERKNS_3URLE
</span><span class="lines">@@ -962,7 +965,6 @@
</span><span class="cx"> __ZN7WebCore24FrameDestructionObserverC2EPNS_5FrameE
</span><span class="cx"> __ZN7WebCore24FrameDestructionObserverD2Ev
</span><span class="cx"> __ZN7WebCore24ImmutableStylePropertiesD1Ev
</span><del>-__ZN7WebCore24ReferenceFilterOperationC1ERKN3WTF6StringES4_
</del><span class="cx"> __ZN7WebCore24createFragmentFromMarkupERNS_8DocumentERKN3WTF6StringES5_NS_19ParserContentPolicyE
</span><span class="cx"> __ZN7WebCore24decodeURLEscapeSequencesERKN3WTF6StringE
</span><span class="cx"> __ZN7WebCore24deleteCookiesForHostnameERKNS_21NetworkStorageSessionERKN3WTF6StringE
</span><span class="lines">@@ -1968,6 +1970,7 @@
</span><span class="cx"> __ZTVN7WebCore16IconDatabaseBaseE
</span><span class="cx"> __ZTVN7WebCore17FrameLoaderClientE
</span><span class="cx"> __ZTVN7WebCore19BlurFilterOperationE
</span><ins>+__ZTVN7WebCore22DefaultFilterOperationE
</ins><span class="cx"> __ZTVN7WebCore25DropShadowFilterOperationE
</span><span class="cx"> __ZTVN7WebCore28InspectorFrontendClientLocal8SettingsE
</span><span class="cx"> __ZTVN7WebCore31BasicColorMatrixFilterOperationE
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFilterOperationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FilterOperation.h (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FilterOperation.h        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterOperation.h        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -69,6 +69,8 @@
</span><span class="cx">
</span><span class="cx"> virtual ~FilterOperation() { }
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<FilterOperation> clone() const = 0;
+
</ins><span class="cx"> virtual bool operator==(const FilterOperation&) const = 0;
</span><span class="cx"> bool operator!=(const FilterOperation& o) const { return !(*this == o); }
</span><span class="cx">
</span><span class="lines">@@ -124,6 +126,11 @@
</span><span class="cx"> return adoptRef(new DefaultFilterOperation(representedType));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<FilterOperation> clone() const override
+ {
+ return adoptRef(new DefaultFilterOperation(representedType()));
+ }
+
</ins><span class="cx"> OperationType representedType() const { return m_representedType; }
</span><span class="cx">
</span><span class="cx"> private:
</span><span class="lines">@@ -148,6 +155,11 @@
</span><span class="cx"> return adoptRef(new PassthroughFilterOperation());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<FilterOperation> clone() const override
+ {
+ return adoptRef(new PassthroughFilterOperation());
+ }
+
</ins><span class="cx"> private:
</span><span class="cx"> virtual bool operator==(const FilterOperation& o) const override
</span><span class="cx"> {
</span><span class="lines">@@ -170,6 +182,13 @@
</span><span class="cx"> }
</span><span class="cx"> virtual ~ReferenceFilterOperation();
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<FilterOperation> clone() const override
+ {
+ // Reference filters cannot be cloned.
+ ASSERT_NOT_REACHED();
+ return nullptr;
+ }
+
</ins><span class="cx"> virtual bool affectsOpacity() const override { return true; }
</span><span class="cx"> virtual bool movesPixels() const override { return true; }
</span><span class="cx">
</span><span class="lines">@@ -204,6 +223,11 @@
</span><span class="cx"> return adoptRef(new BasicColorMatrixFilterOperation(amount, type));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<FilterOperation> clone() const override
+ {
+ return adoptRef(new BasicColorMatrixFilterOperation(amount(), type()));
+ }
+
</ins><span class="cx"> double amount() const { return m_amount; }
</span><span class="cx">
</span><span class="cx"> virtual PassRefPtr<FilterOperation> blend(const FilterOperation* from, double progress, bool blendToPassthrough = false) override;
</span><span class="lines">@@ -232,6 +256,11 @@
</span><span class="cx"> return adoptRef(new BasicComponentTransferFilterOperation(amount, type));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<FilterOperation> clone() const override
+ {
+ return adoptRef(new BasicComponentTransferFilterOperation(amount(), type()));
+ }
+
</ins><span class="cx"> double amount() const { return m_amount; }
</span><span class="cx">
</span><span class="cx"> virtual bool affectsOpacity() const override { return m_type == OPACITY; }
</span><span class="lines">@@ -261,6 +290,11 @@
</span><span class="cx"> return adoptRef(new BlurFilterOperation(std::move(stdDeviation)));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<FilterOperation> clone() const override
+ {
+ return adoptRef(new BlurFilterOperation(stdDeviation()));
+ }
+
</ins><span class="cx"> const Length& stdDeviation() const { return m_stdDeviation; }
</span><span class="cx">
</span><span class="cx"> virtual bool affectsOpacity() const override { return true; }
</span><span class="lines">@@ -289,6 +323,11 @@
</span><span class="cx"> return adoptRef(new DropShadowFilterOperation(location, stdDeviation, color));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual PassRefPtr<FilterOperation> clone() const override
+ {
+ return adoptRef(new DropShadowFilterOperation(location(), stdDeviation(), color()));
+ }
+
</ins><span class="cx"> int x() const { return m_location.x(); }
</span><span class="cx"> int y() const { return m_location.y(); }
</span><span class="cx"> IntPoint location() const { return m_location; }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebKit2/ChangeLog        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -1,5 +1,71 @@
</span><span class="cx"> 2014-04-14 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><ins>+ Run filter animations in the UI process with UI-side compositing
+ https://bugs.webkit.org/show_bug.cgi?id=131199
+ <rdar://problem/16479487>
+
+ Reviewed by Sam Weinig.
+
+ * Shared/WebCoreArgumentCoders.cpp: Removed lots of WebCore::
+ (IPC::ArgumentCoder<SelectionRect>::decode):
+ (IPC::ArgumentCoder<PasteboardWebContent>::encode):
+ (IPC::ArgumentCoder<PasteboardWebContent>::decode):
+ (IPC::ArgumentCoder<PasteboardImage>::encode):
+ (IPC::ArgumentCoder<PasteboardImage>::decode):
+ (IPC::ArgumentCoder<URL>::decode):
+ (IPC::ArgumentCoder<UserStyleSheet>::encode):
+ (IPC::ArgumentCoder<UserStyleSheet>::decode):
+ (IPC::ArgumentCoder<UserScript>::encode):
+ (IPC::ArgumentCoder<UserScript>::decode):
+ (IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
+ (IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
+ (IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
+ (IPC::ArgumentCoder<FixedPositionViewportConstraints>::decode):
+ (IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
+ (IPC::ArgumentCoder<StickyPositionViewportConstraints>::decode):
+ (IPC::ArgumentCoder<FilterOperation>::encode):
+ (IPC::decodeFilterOperation):
+ (IPC::ArgumentCoder<FilterOperations>::encode):
+ (IPC::ArgumentCoder<WebCore::UserStyleSheet>::encode): Deleted.
+ (IPC::ArgumentCoder<WebCore::UserStyleSheet>::decode): Deleted.
+ (IPC::ArgumentCoder<WebCore::UserScript>::encode): Deleted.
+ (IPC::ArgumentCoder<WebCore::UserScript>::decode): Deleted.
+ (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode): Deleted.
+ (IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::decode): Deleted.
+ (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode): Deleted.
+ (IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode): Deleted.
+ (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode): Deleted.
+ (IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode): Deleted.
+ (IPC::encodeFilterOperation): Deleted.
+ Add encoding/decoding support for FilterOperation.
+ decodeFilterOperation() has to be a bare function because of the RefPtr
+ out parameter.
+ REFERENCE filters should never be encoded, since they have CachedSVGDocumentReferences.
+
+ * Shared/WebCoreArgumentCoders.h:
+
+ * Shared/mac/RemoteLayerTreeTransaction.mm:
+ (WebKit::RemoteLayerTreeTextStream::operator<<):
+ Add logging for filter animations to the RemoteLayerTree log output.
+
+ * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
+ * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
+ (WebKit::GraphicsLayerCARemote::addAnimation): Deleted. We can run
+ filter animations now.
+
+ * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
+ KeyValues have a RefPtr<WebCore::FilterOperation> now (which can't be part of
+ the union because we need its constructor to get called).
+ * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
+ (WebKit::PlatformCAAnimationRemote::KeyframeValue::encode): Encode the filter.
+ (WebKit::PlatformCAAnimationRemote::KeyframeValue::decode): Decode the filter.
+ (WebKit::PlatformCAAnimationRemote::setFromValue): Implement.
+ (WebKit::PlatformCAAnimationRemote::setToValue): Implement.
+ (WebKit::PlatformCAAnimationRemote::setValues): Implement.
+ (WebKit::animationValueFromKeyframeValue): Handle filters.
+
+2014-04-14 Simon Fraser <simon.fraser@apple.com>
+
</ins><span class="cx"> Fix the build.
</span><span class="cx">
</span><span class="cx"> * UIProcess/mac/PageClientImpl.h:
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -276,9 +276,9 @@
</span><span class="cx"> return SimpleArgumentCoder<IntSize>::decode(decoder, intSize);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<> struct ArgumentCoder<WebCore::Region::Span> {
- static void encode(ArgumentEncoder&, const WebCore::Region::Span&);
- static bool decode(ArgumentDecoder&, WebCore::Region::Span&);
</del><ins>+template<> struct ArgumentCoder<Region::Span> {
+ static void encode(ArgumentEncoder&, const Region::Span&);
+ static bool decode(ArgumentDecoder&, Region::Span&);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> void ArgumentCoder<Region::Span>::encode(ArgumentEncoder& encoder, const Region::Span& span)
</span><span class="lines">@@ -842,7 +842,7 @@
</span><span class="cx">
</span><span class="cx"> bool ArgumentCoder<SelectionRect>::decode(ArgumentDecoder& decoder, SelectionRect& selectionRect)
</span><span class="cx"> {
</span><del>- WebCore::IntRect rect;
</del><ins>+ IntRect rect;
</ins><span class="cx"> if (!decoder.decode(rect))
</span><span class="cx"> return false;
</span><span class="cx"> selectionRect.setRect(rect);
</span><span class="lines">@@ -850,7 +850,7 @@
</span><span class="cx"> uint32_t direction;
</span><span class="cx"> if (!decoder.decode(direction))
</span><span class="cx"> return false;
</span><del>- selectionRect.setDirection((WebCore::TextDirection)direction);
</del><ins>+ selectionRect.setDirection((TextDirection)direction);
</ins><span class="cx">
</span><span class="cx"> int intValue;
</span><span class="cx"> if (!decoder.decode(intValue))
</span><span class="lines">@@ -1121,7 +1121,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ArgumentCoder<PasteboardWebContent>::encode(ArgumentEncoder& encoder, const WebCore::PasteboardWebContent& content)
</del><ins>+void ArgumentCoder<PasteboardWebContent>::encode(ArgumentEncoder& encoder, const PasteboardWebContent& content)
</ins><span class="cx"> {
</span><span class="cx"> encoder << content.canSmartCopyOrDelete;
</span><span class="cx"> encoder << content.dataInStringFormat;
</span><span class="lines">@@ -1136,7 +1136,7 @@
</span><span class="cx"> encodeSharedBuffer(encoder, content.clientData[i].get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ArgumentCoder<PasteboardWebContent>::decode(ArgumentDecoder& decoder, WebCore::PasteboardWebContent& content)
</del><ins>+bool ArgumentCoder<PasteboardWebContent>::decode(ArgumentDecoder& decoder, PasteboardWebContent& content)
</ins><span class="cx"> {
</span><span class="cx"> if (!decoder.decode(content.canSmartCopyOrDelete))
</span><span class="cx"> return false;
</span><span class="lines">@@ -1160,7 +1160,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ArgumentCoder<PasteboardImage>::encode(ArgumentEncoder& encoder, const WebCore::PasteboardImage& pasteboardImage)
</del><ins>+void ArgumentCoder<PasteboardImage>::encode(ArgumentEncoder& encoder, const PasteboardImage& pasteboardImage)
</ins><span class="cx"> {
</span><span class="cx"> encodeImage(encoder, pasteboardImage.image.get());
</span><span class="cx"> encoder << pasteboardImage.url.url;
</span><span class="lines">@@ -1170,7 +1170,7 @@
</span><span class="cx"> encodeSharedBuffer(encoder, pasteboardImage.resourceData.get());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ArgumentCoder<PasteboardImage>::decode(ArgumentDecoder& decoder, WebCore::PasteboardImage& pasteboardImage)
</del><ins>+bool ArgumentCoder<PasteboardImage>::decode(ArgumentDecoder& decoder, PasteboardImage& pasteboardImage)
</ins><span class="cx"> {
</span><span class="cx"> if (!decodeImage(decoder, pasteboardImage.image))
</span><span class="cx"> return false;
</span><span class="lines">@@ -1319,11 +1319,11 @@
</span><span class="cx"> String urlAsString;
</span><span class="cx"> if (!decoder.decode(urlAsString))
</span><span class="cx"> return false;
</span><del>- result = URL(WebCore::ParsedURLString, urlAsString);
</del><ins>+ result = URL(ParsedURLString, urlAsString);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ArgumentCoder<WebCore::UserStyleSheet>::encode(ArgumentEncoder& encoder, const WebCore::UserStyleSheet& userStyleSheet)
</del><ins>+void ArgumentCoder<UserStyleSheet>::encode(ArgumentEncoder& encoder, const UserStyleSheet& userStyleSheet)
</ins><span class="cx"> {
</span><span class="cx"> encoder << userStyleSheet.source();
</span><span class="cx"> encoder << userStyleSheet.url();
</span><span class="lines">@@ -1333,7 +1333,7 @@
</span><span class="cx"> encoder.encodeEnum(userStyleSheet.level());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ArgumentCoder<WebCore::UserStyleSheet>::decode(ArgumentDecoder& decoder, WebCore::UserStyleSheet& userStyleSheet)
</del><ins>+bool ArgumentCoder<UserStyleSheet>::decode(ArgumentDecoder& decoder, UserStyleSheet& userStyleSheet)
</ins><span class="cx"> {
</span><span class="cx"> String source;
</span><span class="cx"> if (!decoder.decode(source))
</span><span class="lines">@@ -1351,19 +1351,19 @@
</span><span class="cx"> if (!decoder.decode(blacklist))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- WebCore::UserContentInjectedFrames injectedFrames;
</del><ins>+ UserContentInjectedFrames injectedFrames;
</ins><span class="cx"> if (!decoder.decodeEnum(injectedFrames))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- WebCore::UserStyleLevel level;
</del><ins>+ UserStyleLevel level;
</ins><span class="cx"> if (!decoder.decodeEnum(level))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- userStyleSheet = WebCore::UserStyleSheet(source, url, whitelist, blacklist, injectedFrames, level);
</del><ins>+ userStyleSheet = UserStyleSheet(source, url, whitelist, blacklist, injectedFrames, level);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ArgumentCoder<WebCore::UserScript>::encode(ArgumentEncoder& encoder, const WebCore::UserScript& userScript)
</del><ins>+void ArgumentCoder<UserScript>::encode(ArgumentEncoder& encoder, const UserScript& userScript)
</ins><span class="cx"> {
</span><span class="cx"> encoder << userScript.source();
</span><span class="cx"> encoder << userScript.url();
</span><span class="lines">@@ -1373,7 +1373,7 @@
</span><span class="cx"> encoder.encodeEnum(userScript.injectedFrames());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ArgumentCoder<WebCore::UserScript>::decode(ArgumentDecoder& decoder, WebCore::UserScript& userScript)
</del><ins>+bool ArgumentCoder<UserScript>::decode(ArgumentDecoder& decoder, UserScript& userScript)
</ins><span class="cx"> {
</span><span class="cx"> String source;
</span><span class="cx"> if (!decoder.decode(source))
</span><span class="lines">@@ -1391,19 +1391,19 @@
</span><span class="cx"> if (!decoder.decode(blacklist))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- WebCore::UserScriptInjectionTime injectionTime;
</del><ins>+ UserScriptInjectionTime injectionTime;
</ins><span class="cx"> if (!decoder.decodeEnum(injectionTime))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- WebCore::UserContentInjectedFrames injectedFrames;
</del><ins>+ UserContentInjectedFrames injectedFrames;
</ins><span class="cx"> if (!decoder.decodeEnum(injectedFrames))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- userScript = WebCore::UserScript(source, url, whitelist, blacklist, injectionTime, injectedFrames);
</del><ins>+ userScript = UserScript(source, url, whitelist, blacklist, injectionTime, injectedFrames);
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ArgumentCoder<WebCore::ScrollableAreaParameters>::encode(ArgumentEncoder& encoder, const WebCore::ScrollableAreaParameters& parameters)
</del><ins>+void ArgumentCoder<ScrollableAreaParameters>::encode(ArgumentEncoder& encoder, const ScrollableAreaParameters& parameters)
</ins><span class="cx"> {
</span><span class="cx"> encoder.encodeEnum(parameters.horizontalScrollElasticity);
</span><span class="cx"> encoder.encodeEnum(parameters.verticalScrollElasticity);
</span><span class="lines">@@ -1415,7 +1415,7 @@
</span><span class="cx"> encoder << parameters.hasEnabledVerticalScrollbar;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ArgumentCoder<WebCore::ScrollableAreaParameters>::decode(ArgumentDecoder& decoder, WebCore::ScrollableAreaParameters& params)
</del><ins>+bool ArgumentCoder<ScrollableAreaParameters>::decode(ArgumentDecoder& decoder, ScrollableAreaParameters& params)
</ins><span class="cx"> {
</span><span class="cx"> if (!decoder.decodeEnum(params.horizontalScrollElasticity))
</span><span class="cx"> return false;
</span><span class="lines">@@ -1435,7 +1435,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode(ArgumentEncoder& encoder, const WebCore::FixedPositionViewportConstraints& viewportConstraints)
</del><ins>+void ArgumentCoder<FixedPositionViewportConstraints>::encode(ArgumentEncoder& encoder, const FixedPositionViewportConstraints& viewportConstraints)
</ins><span class="cx"> {
</span><span class="cx"> encoder << viewportConstraints.alignmentOffset();
</span><span class="cx"> encoder << viewportConstraints.anchorEdges();
</span><span class="lines">@@ -1444,7 +1444,7 @@
</span><span class="cx"> encoder << viewportConstraints.layerPositionAtLastLayout();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode(ArgumentDecoder& decoder, WebCore::FixedPositionViewportConstraints& viewportConstraints)
</del><ins>+bool ArgumentCoder<FixedPositionViewportConstraints>::decode(ArgumentDecoder& decoder, FixedPositionViewportConstraints& viewportConstraints)
</ins><span class="cx"> {
</span><span class="cx"> FloatSize alignmentOffset;
</span><span class="cx"> if (!decoder.decode(alignmentOffset))
</span><span class="lines">@@ -1462,7 +1462,7 @@
</span><span class="cx"> if (!decoder.decode(layerPositionAtLastLayout))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- viewportConstraints = WebCore::FixedPositionViewportConstraints();
</del><ins>+ viewportConstraints = FixedPositionViewportConstraints();
</ins><span class="cx"> viewportConstraints.setAlignmentOffset(alignmentOffset);
</span><span class="cx"> viewportConstraints.setAnchorEdges(anchorEdges);
</span><span class="cx">
</span><span class="lines">@@ -1472,7 +1472,7 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode(ArgumentEncoder& encoder, const WebCore::StickyPositionViewportConstraints& viewportConstraints)
</del><ins>+void ArgumentCoder<StickyPositionViewportConstraints>::encode(ArgumentEncoder& encoder, const StickyPositionViewportConstraints& viewportConstraints)
</ins><span class="cx"> {
</span><span class="cx"> encoder << viewportConstraints.alignmentOffset();
</span><span class="cx"> encoder << viewportConstraints.anchorEdges();
</span><span class="lines">@@ -1490,7 +1490,7 @@
</span><span class="cx"> encoder << viewportConstraints.layerPositionAtLastLayout();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode(ArgumentDecoder& decoder, WebCore::StickyPositionViewportConstraints& viewportConstraints)
</del><ins>+bool ArgumentCoder<StickyPositionViewportConstraints>::decode(ArgumentDecoder& decoder, StickyPositionViewportConstraints& viewportConstraints)
</ins><span class="cx"> {
</span><span class="cx"> FloatSize alignmentOffset;
</span><span class="cx"> if (!decoder.decode(alignmentOffset))
</span><span class="lines">@@ -1536,7 +1536,7 @@
</span><span class="cx"> if (!decoder.decode(layerPositionAtLastLayout))
</span><span class="cx"> return false;
</span><span class="cx">
</span><del>- viewportConstraints = WebCore::StickyPositionViewportConstraints();
</del><ins>+ viewportConstraints = StickyPositionViewportConstraints();
</ins><span class="cx"> viewportConstraints.setAlignmentOffset(alignmentOffset);
</span><span class="cx"> viewportConstraints.setAnchorEdges(anchorEdges);
</span><span class="cx">
</span><span class="lines">@@ -1556,63 +1556,58 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS) && !USE(COORDINATED_GRAPHICS)
</span><del>-static void encodeFilterOperation(ArgumentEncoder& encoder, const FilterOperation& filter)
</del><ins>+void ArgumentCoder<FilterOperation>::encode(ArgumentEncoder& encoder, const FilterOperation& filter)
</ins><span class="cx"> {
</span><span class="cx"> encoder.encodeEnum(filter.type());
</span><span class="cx">
</span><span class="cx"> switch (filter.type()) {
</span><span class="cx"> case FilterOperation::REFERENCE: {
</span><del>- const auto& referenceFilter = static_cast<const ReferenceFilterOperation&>(filter);
- encoder << referenceFilter.url();
- encoder << referenceFilter.fragment();
</del><ins>+ ASSERT_NOT_REACHED();
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case FilterOperation::GRAYSCALE:
</span><span class="cx"> case FilterOperation::SEPIA:
</span><span class="cx"> case FilterOperation::SATURATE:
</span><span class="cx"> case FilterOperation::HUE_ROTATE:
</span><del>- encoder << static_cast<const BasicColorMatrixFilterOperation&>(filter).amount();
</del><ins>+ encoder << toBasicColorMatrixFilterOperation(filter).amount();
</ins><span class="cx"> break;
</span><span class="cx"> case FilterOperation::INVERT:
</span><span class="cx"> case FilterOperation::OPACITY:
</span><span class="cx"> case FilterOperation::BRIGHTNESS:
</span><span class="cx"> case FilterOperation::CONTRAST:
</span><del>- encoder << static_cast<const BasicComponentTransferFilterOperation&>(filter).amount();
</del><ins>+ encoder << toBasicComponentTransferFilterOperation(filter).amount();
</ins><span class="cx"> break;
</span><span class="cx"> case FilterOperation::BLUR:
</span><del>- encoder << static_cast<const BlurFilterOperation&>(filter).stdDeviation();
</del><ins>+ encoder << toBlurFilterOperation(filter).stdDeviation();
</ins><span class="cx"> break;
</span><span class="cx"> case FilterOperation::DROP_SHADOW: {
</span><del>- const auto& dropShadowFilter = static_cast<const DropShadowFilterOperation&>(filter);
</del><ins>+ const auto& dropShadowFilter = toDropShadowFilterOperation(filter);
</ins><span class="cx"> encoder << dropShadowFilter.location();
</span><span class="cx"> encoder << dropShadowFilter.stdDeviation();
</span><span class="cx"> encoder << dropShadowFilter.color();
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case FilterOperation::DEFAULT:
</span><ins>+ encoder.encodeEnum(toDefaultFilterOperation(filter).representedType());
+ break;
</ins><span class="cx"> case FilterOperation::PASSTHROUGH:
</span><span class="cx"> case FilterOperation::NONE:
</span><span class="cx"> break;
</span><del>- };
</del><ins>+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-static bool decodeFilterOperation(ArgumentDecoder& decoder, RefPtr<FilterOperation>& filter)
</del><ins>+bool decodeFilterOperation(ArgumentDecoder& decoder, RefPtr<FilterOperation>& filter)
</ins><span class="cx"> {
</span><span class="cx"> FilterOperation::OperationType type;
</span><span class="cx"> if (!decoder.decodeEnum(type))
</span><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> switch (type) {
</span><del>- case FilterOperation::REFERENCE: {
- String url;
- String fragment;
- if (!decoder.decode(url))
- return false;
- if (!decoder.decode(fragment))
- return false;
- filter = ReferenceFilterOperation::create(url, fragment);
</del><ins>+ case FilterOperation::PASSTHROUGH:
+ case FilterOperation::NONE:
+ case FilterOperation::REFERENCE:
+ ASSERT_NOT_REACHED();
</ins><span class="cx"> break;
</span><del>- }
</del><span class="cx"> case FilterOperation::GRAYSCALE:
</span><span class="cx"> case FilterOperation::SEPIA:
</span><span class="cx"> case FilterOperation::SATURATE:
</span><span class="lines">@@ -1653,12 +1648,15 @@
</span><span class="cx"> filter = DropShadowFilterOperation::create(location, stdDeviation, color);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><del>- case FilterOperation::DEFAULT:
- case FilterOperation::PASSTHROUGH:
- case FilterOperation::NONE:
</del><ins>+ case FilterOperation::DEFAULT: {
+ FilterOperation::OperationType representedType;
+ if (!decoder.decodeEnum(representedType))
+ return false;
+ filter = DefaultFilterOperation::create(representedType);
</ins><span class="cx"> break;
</span><del>- };
-
</del><ins>+ }
+ }
+
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1668,7 +1666,7 @@
</span><span class="cx"> encoder << static_cast<uint64_t>(filters.size());
</span><span class="cx">
</span><span class="cx"> for (const auto& filter : filters.operations())
</span><del>- encodeFilterOperation(encoder, *filter);
</del><ins>+ encoder << *filter;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool ArgumentCoder<FilterOperations>::decode(ArgumentDecoder& decoder, FilterOperations& filters)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> class CubicBezierTimingFunction;
</span><span class="cx"> class Cursor;
</span><span class="cx"> class DatabaseDetails;
</span><ins>+class FilterOperation;
</ins><span class="cx"> class FilterOperations;
</span><span class="cx"> class FloatPoint;
</span><span class="cx"> class FloatPoint3D;
</span><span class="lines">@@ -373,6 +374,11 @@
</span><span class="cx"> static void encode(ArgumentEncoder&, const WebCore::FilterOperations&);
</span><span class="cx"> static bool decode(ArgumentDecoder&, WebCore::FilterOperations&);
</span><span class="cx"> };
</span><ins>+
+template<> struct ArgumentCoder<WebCore::FilterOperation> {
+ static void encode(ArgumentEncoder&, const WebCore::FilterOperation&);
+};
+bool decodeFilterOperation(ArgumentDecoder&, RefPtr<WebCore::FilterOperation>&);
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(INDEXED_DATABASE)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #import "PlatformCALayerRemote.h"
</span><span class="cx"> #import "WebCoreArgumentCoders.h"
</span><span class="cx"> #import <QuartzCore/QuartzCore.h>
</span><ins>+#import <WebCore/LengthFunctions.h>
</ins><span class="cx"> #import <WebCore/TextStream.h>
</span><span class="cx"> #import <WebCore/TimingFunction.h>
</span><span class="cx"> #import <wtf/text/CString.h>
</span><span class="lines">@@ -562,6 +563,7 @@
</span><span class="cx"> RemoteLayerTreeTextStream& operator<<(Color);
</span><span class="cx"> RemoteLayerTreeTextStream& operator<<(FloatRect);
</span><span class="cx"> RemoteLayerTreeTextStream& operator<<(const Vector<WebCore::GraphicsLayer::PlatformLayerID>&);
</span><ins>+ RemoteLayerTreeTextStream& operator<<(const FilterOperation&);
</ins><span class="cx"> RemoteLayerTreeTextStream& operator<<(const FilterOperations&);
</span><span class="cx"> RemoteLayerTreeTextStream& operator<<(const PlatformCAAnimationRemote::Properties&);
</span><span class="cx"> RemoteLayerTreeTextStream& operator<<(const RemoteLayerBackingStore&);
</span><span class="lines">@@ -633,57 +635,86 @@
</span><span class="cx"> RemoteLayerTreeTextStream& ts = *this;
</span><span class="cx"> for (size_t i = 0; i < filters.size(); ++i) {
</span><span class="cx"> const auto filter = filters.at(i);
</span><del>- switch (filter->type()) {
- case FilterOperation::DEFAULT:
- ts << "default";
- break;
- case FilterOperation::REFERENCE:
- ts << "reference";
- break;
- case FilterOperation::GRAYSCALE:
- ts << "grayscale";
- break;
- case FilterOperation::SEPIA:
- ts << "sepia";
- break;
- case FilterOperation::SATURATE:
- ts << "saturate";
- break;
- case FilterOperation::HUE_ROTATE:
- ts << "hue rotate";
- break;
- case FilterOperation::INVERT:
- ts << "invert";
- break;
- case FilterOperation::OPACITY:
- ts << "opacity";
- break;
- case FilterOperation::BRIGHTNESS:
- ts << "brightness";
- break;
- case FilterOperation::CONTRAST:
- ts << "contrast";
- break;
- case FilterOperation::BLUR:
- ts << "blur";
- break;
- case FilterOperation::DROP_SHADOW:
- ts << "drop shadow";
- break;
- case FilterOperation::PASSTHROUGH:
- ts << "passthrough";
- break;
- case FilterOperation::NONE:
- ts << "none";
- break;
- }
-
</del><ins>+ ts << *filter;
</ins><span class="cx"> if (i < filters.size() - 1)
</span><span class="cx"> ts << " ";
</span><span class="cx"> }
</span><span class="cx"> return ts;
</span><span class="cx"> }
</span><del>-
</del><ins>+
+RemoteLayerTreeTextStream& RemoteLayerTreeTextStream::operator<<(const FilterOperation& filter)
+{
+ RemoteLayerTreeTextStream& ts = *this;
+ switch (filter.type()) {
+ case FilterOperation::REFERENCE:
+ ts << "reference";
+ break;
+ case FilterOperation::GRAYSCALE: {
+ const BasicColorMatrixFilterOperation& colorMatrixFilter = toBasicColorMatrixFilterOperation(filter);
+ ts << "grayscale(" << colorMatrixFilter.amount() << ")";
+ break;
+ }
+ case FilterOperation::SEPIA: {
+ const BasicColorMatrixFilterOperation& colorMatrixFilter = toBasicColorMatrixFilterOperation(filter);
+ ts << "sepia(" << colorMatrixFilter.amount() << ")";
+ break;
+ }
+ case FilterOperation::SATURATE: {
+ const BasicColorMatrixFilterOperation& colorMatrixFilter = toBasicColorMatrixFilterOperation(filter);
+ ts << "saturate(" << colorMatrixFilter.amount() << ")";
+ break;
+ }
+ case FilterOperation::HUE_ROTATE: {
+ const BasicColorMatrixFilterOperation& colorMatrixFilter = toBasicColorMatrixFilterOperation(filter);
+ ts << "hue-rotate(" << colorMatrixFilter.amount() << ")";
+ break;
+ }
+ case FilterOperation::INVERT: {
+ const BasicComponentTransferFilterOperation& componentTransferFilter = toBasicComponentTransferFilterOperation(filter);
+ ts << "invert(" << componentTransferFilter.amount() << ")";
+ break;
+ }
+ case FilterOperation::OPACITY: {
+ const BasicComponentTransferFilterOperation& componentTransferFilter = toBasicComponentTransferFilterOperation(filter);
+ ts << "opacity(" << componentTransferFilter.amount() << ")";
+ break;
+ }
+ case FilterOperation::BRIGHTNESS: {
+ const BasicComponentTransferFilterOperation& componentTransferFilter = toBasicComponentTransferFilterOperation(filter);
+ ts << "brightness(" << componentTransferFilter.amount() << ")";
+ break;
+ }
+ case FilterOperation::CONTRAST: {
+ const BasicComponentTransferFilterOperation& componentTransferFilter = toBasicComponentTransferFilterOperation(filter);
+ ts << "contrast(" << componentTransferFilter.amount() << ")";
+ break;
+ }
+ case FilterOperation::BLUR: {
+ const BlurFilterOperation& blurFilter = toBlurFilterOperation(filter);
+ ts << "blur(" << floatValueForLength(blurFilter.stdDeviation(), 0) << ")";
+ break;
+ }
+ case FilterOperation::DROP_SHADOW: {
+ const DropShadowFilterOperation& dropShadowFilter = toDropShadowFilterOperation(filter);
+ ts << "drop-shadow(" << dropShadowFilter.x() << " " << dropShadowFilter.y() << " " << dropShadowFilter.location() << " ";
+ ts << dropShadowFilter.color() << ")";
+ break;
+ }
+ case FilterOperation::PASSTHROUGH:
+ ts << "passthrough";
+ break;
+ case FilterOperation::DEFAULT: {
+ const DefaultFilterOperation& defaultFilter = toDefaultFilterOperation(filter);
+ ts << "default type=" << (int)defaultFilter.representedType();
+ break;
+ }
+ case FilterOperation::NONE:
+ ts << "none";
+ break;
+ }
+ return ts;
+}
+
</ins><span class="cx"> RemoteLayerTreeTextStream& RemoteLayerTreeTextStream::operator<<(PlatformCAAnimation::AnimationType type)
</span><span class="cx"> {
</span><span class="cx"> RemoteLayerTreeTextStream& ts = *this;
</span><span class="lines">@@ -746,6 +777,13 @@
</span><span class="cx"> ts << "transform=";
</span><span class="cx"> ts << value.transformValue();
</span><span class="cx"> break;
</span><ins>+ case PlatformCAAnimationRemote::KeyframeValue::FilterKeyType:
+ ts << "filter=";
+ if (value.filterValue())
+ ts << *value.filterValue();
+ else
+ ts << "null";
+ break;
</ins><span class="cx"> }
</span><span class="cx"> return ts;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemotecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -58,14 +58,4 @@
</span><span class="cx"> return PlatformCAAnimationRemote::create(type, keyPath);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool GraphicsLayerCARemote::addAnimation(const KeyframeValueList& valueList, const FloatSize& boxSize, const Animation* anim, const String& animationName, double timeOffset)
-{
-#if ENABLE(CSS_FILTERS)
- if (valueList.property() == AnimatedPropertyWebkitFilter)
- return false;
-#endif
-
- return GraphicsLayerCA::addAnimation(valueList, boxSize, anim, animationName, timeOffset);
-}
-
</del><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacGraphicsLayerCARemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -57,8 +57,6 @@
</span><span class="cx"> // PlatformCALayerRemote can't currently proxy directly composited image contents, so opt out of this optimization.
</span><span class="cx"> virtual bool shouldDirectlyCompositeImage(WebCore::Image*) const override { return false; }
</span><span class="cx">
</span><del>- virtual bool addAnimation(const WebCore::KeyframeValueList&, const WebCore::FloatSize&, const WebCore::Animation*, const String&, double);
-
</del><span class="cx"> RemoteLayerTreeContext* m_context;
</span><span class="cx"> };
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemoteh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.h        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -50,15 +50,15 @@
</span><span class="cx"> virtual bool isPlatformCAAnimationRemote() const override { return true; }
</span><span class="cx">
</span><span class="cx"> virtual PassRefPtr<PlatformCAAnimation> copy() const override;
</span><del>-
</del><ins>+
</ins><span class="cx"> virtual String keyPath() const override;
</span><del>-
</del><ins>+
</ins><span class="cx"> virtual CFTimeInterval beginTime() const override;
</span><span class="cx"> virtual void setBeginTime(CFTimeInterval) override;
</span><del>-
</del><ins>+
</ins><span class="cx"> virtual CFTimeInterval duration() const override;
</span><span class="cx"> virtual void setDuration(CFTimeInterval) override;
</span><del>-
</del><ins>+
</ins><span class="cx"> virtual float speed() const override;
</span><span class="cx"> virtual void setSpeed(float) override;
</span><span class="cx">
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx">
</span><span class="cx"> virtual FillModeType fillMode() const override;
</span><span class="cx"> virtual void setFillMode(FillModeType) override;
</span><del>-
</del><ins>+
</ins><span class="cx"> virtual void setTimingFunction(const WebCore::TimingFunction*, bool reverse = false) override;
</span><span class="cx"> void copyTimingFunctionFrom(const WebCore::PlatformCAAnimation*) override;
</span><span class="cx">
</span><span class="lines">@@ -128,8 +128,13 @@
</span><span class="cx"> ColorKeyType,
</span><span class="cx"> PointKeyType,
</span><span class="cx"> TransformKeyType,
</span><ins>+ FilterKeyType,
</ins><span class="cx"> };
</span><span class="cx">
</span><ins>+ ~KeyframeValue()
+ {
+ }
+
</ins><span class="cx"> KeyframeValue(float value = 0)
</span><span class="cx"> : keyType(NumberKeyType)
</span><span class="cx"> , number(value)
</span><span class="lines">@@ -153,7 +158,13 @@
</span><span class="cx"> , transform(value)
</span><span class="cx"> {
</span><span class="cx"> }
</span><del>-
</del><ins>+
+ KeyframeValue(PassRefPtr<WebCore::FilterOperation> value)
+ : keyType(FilterKeyType)
+ , filter(value)
+ {
+ }
+
</ins><span class="cx"> KeyframeValue(const KeyframeValue& other)
</span><span class="cx"> {
</span><span class="cx"> *this = other;
</span><span class="lines">@@ -175,11 +186,14 @@
</span><span class="cx"> case TransformKeyType:
</span><span class="cx"> transform = other.transform;
</span><span class="cx"> break;
</span><ins>+ case FilterKeyType:
+ filter = other.filter;
+ break;
</ins><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> return *this;
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> KeyframeType keyframeType() const { return keyType; }
</span><span class="cx">
</span><span class="cx"> float numberValue() const
</span><span class="lines">@@ -206,6 +220,12 @@
</span><span class="cx"> return transform;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ const WebCore::FilterOperation* filterValue() const
+ {
+ ASSERT(keyType == FilterKeyType);
+ return filter.get();
+ }
+
</ins><span class="cx"> void encode(IPC::ArgumentEncoder&) const;
</span><span class="cx"> static bool decode(IPC::ArgumentDecoder&, KeyframeValue&);
</span><span class="cx">
</span><span class="lines">@@ -217,6 +237,7 @@
</span><span class="cx"> WebCore::FloatPoint3D point;
</span><span class="cx"> WebCore::TransformationMatrix transform;
</span><span class="cx"> };
</span><ins>+ RefPtr<WebCore::FilterOperation> filter;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> struct Properties {
</span><span class="lines">@@ -234,10 +255,9 @@
</span><span class="cx"> , additive(false)
</span><span class="cx"> , reverseTimingFunctions(false)
</span><span class="cx"> , hasNonZeroBeginTime(false)
</span><del>-
</del><span class="cx"> {
</span><span class="cx"> }
</span><del>-
</del><ins>+
</ins><span class="cx"> void encode(IPC::ArgumentEncoder&) const;
</span><span class="cx"> static bool decode(IPC::ArgumentDecoder&, Properties&);
</span><span class="cx">
</span><span class="lines">@@ -249,10 +269,10 @@
</span><span class="cx"> double timeOffset;
</span><span class="cx"> float repeatCount;
</span><span class="cx"> float speed;
</span><del>-
</del><ins>+
</ins><span class="cx"> PlatformCAAnimation::FillModeType fillMode;
</span><span class="cx"> PlatformCAAnimation::ValueFunctionType valueFunction;
</span><del>-
</del><ins>+
</ins><span class="cx"> bool autoReverses;
</span><span class="cx"> bool removedOnCompletion;
</span><span class="cx"> bool additive;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacPlatformCAAnimationRemotemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm (167265 => 167266)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm        2014-04-14 20:38:26 UTC (rev 167265)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm        2014-04-14 20:46:26 UTC (rev 167266)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #import <WebCore/BlockExceptions.h>
</span><span class="cx"> #import <WebCore/GraphicsLayer.h>
</span><span class="cx"> #import <WebCore/PlatformCAAnimationMac.h>
</span><ins>+#import <WebCore/PlatformCAFilters.h>
</ins><span class="cx"> #import <WebCore/TimingFunction.h>
</span><span class="cx"> #import <wtf/CurrentTime.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="lines">@@ -101,6 +102,9 @@
</span><span class="cx"> case TransformKeyType:
</span><span class="cx"> encoder << transform;
</span><span class="cx"> break;
</span><ins>+ case FilterKeyType:
+ encoder << *filter.get();
+ break;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -126,6 +130,10 @@
</span><span class="cx"> if (!decoder.decode(value.transform))
</span><span class="cx"> return false;
</span><span class="cx"> break;
</span><ins>+ case FilterKeyType:
+ if (!decodeFilterOperation(decoder, value.filter))
+ return false;
+ break;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return true;
</span><span class="lines">@@ -446,7 +454,11 @@
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><span class="cx"> void PlatformCAAnimationRemote::setFromValue(const FilterOperation* operation, int internalFilterPropertyIndex)
</span><span class="cx"> {
</span><del>- ASSERT_NOT_REACHED();
</del><ins>+ if (animationType() != Basic)
+ return;
+
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[0] = KeyframeValue(operation->clone());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -494,7 +506,13 @@
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><span class="cx"> void PlatformCAAnimationRemote::setToValue(const FilterOperation* operation, int internalFilterPropertyIndex)
</span><span class="cx"> {
</span><del>- ASSERT_NOT_REACHED();
</del><ins>+ if (animationType() != Basic)
+ return;
+
+ UNUSED_PARAM(internalFilterPropertyIndex);
+ ASSERT(operation);
+ m_properties.keyValues.resize(2);
+ m_properties.keyValues[1] = KeyframeValue(operation->clone());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -561,10 +579,20 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span><del>-void PlatformCAAnimationRemote::setValues(const Vector<RefPtr<FilterOperation>>&, int internalFilterPropertyIndex)
</del><ins>+void PlatformCAAnimationRemote::setValues(const Vector<RefPtr<FilterOperation>>& values, int internalFilterPropertyIndex)
</ins><span class="cx"> {
</span><span class="cx"> UNUSED_PARAM(internalFilterPropertyIndex);
</span><del>- ASSERT_NOT_REACHED();
</del><ins>+
+ 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);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -617,6 +645,9 @@
</span><span class="cx"> }
</span><span class="cx"> case PlatformCAAnimationRemote::KeyframeValue::TransformKeyType:
</span><span class="cx"> return [NSValue valueWithCATransform3D:keyframeValue.transformValue()];
</span><ins>+
+ case PlatformCAAnimationRemote::KeyframeValue::FilterKeyType:
+ return [PlatformCAFilters::filterValueForOperation(keyframeValue.filterValue(), 0 /* unused */).leakRef() autorelease];
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>