<!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>[181602] trunk</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/181602">181602</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2015-03-16 17:33:00 -0700 (Mon, 16 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Parsing and Style Resolution of Container-based Animation Triggers
https://bugs.webkit.org/show_bug.cgi?id=142687
&lt;rdar://problem/20170007&gt;

Reviewed by Simon Fraser.

Source/WebCore:

Take 2 after the previous patch was rolled out.

This is the beginning of a prototype implementation of
CSS Animation Triggers, as described by
https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html

In this patch we parse and resolve the value of a new
CSS property &quot;-webkit-animation-trigger&quot;. At the moment it
only accepts one function value &quot;container-scroll&quot;, which
will trigger the animation at an absolute position within
an element's scrolling container. We expect the syntax to
change in the near future, as the spec is written.

Tests: animations/trigger-computed-style.html
       animations/trigger-parsing.html

* WebCore.xcodeproj/project.pbxproj: Add the new files.

* css/CSSAnimationTriggerScrollValue.cpp: Added.
(WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
(WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
* css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
scroll trigger. This name may change in the future to better represent the
type of trigger, but it is good enough for now.
(WebCore::CSSAnimationTriggerScrollValue::create):
(WebCore::CSSAnimationTriggerScrollValue::startValue):
(WebCore::CSSAnimationTriggerScrollValue::endValue):
(WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
(WebCore::getAnimationTriggerValue): Gets the current computed style.
(WebCore::ComputedStyleExtractor::propertyValue):

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseAnimationTrigger): Parse the &quot;container-scroll&quot; function
and record the value as a CSSAnimationTriggerScrollValue.
(WebCore::CSSParser::parseAnimationProperty): Handle the new property.
* css/CSSParser.h:

* css/CSSPropertyNames.in: Add &quot;-webkit-animation-trigger&quot;.

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
an Animation object.
* css/CSSToStyleMap.h:

* css/CSSValue.cpp: Handle the new CSSValue type.
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isAnimationTriggerScrollValue):

* platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
and use them in the operator==.
* platform/animation/Animation.h: Add AnimationTrigger as a new field.
(WebCore::Animation::isTriggerSet):
(WebCore::Animation::isEmpty):

* platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
&quot;auto&quot; and the scrolling trigger.
(WebCore::AnimationTrigger::~AnimationTrigger):
(WebCore::AnimationTrigger::type):
(WebCore::AnimationTrigger::isAutoAnimationTrigger):
(WebCore::AnimationTrigger::isScrollAnimationTrigger):
(WebCore::AnimationTrigger::AnimationTrigger):
(WebCore::AutoAnimationTrigger::create):
(WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
(WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
(WebCore::ScrollAnimationTrigger::create):
(WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
(WebCore::ScrollAnimationTrigger::startValue):
(WebCore::ScrollAnimationTrigger::setStartValue):
(WebCore::ScrollAnimationTrigger::endValue):
(WebCore::ScrollAnimationTrigger::setEndValue):
(WebCore::ScrollAnimationTrigger::hasEndValue):
(WebCore::ScrollAnimationTrigger::setHasEndValue):
(WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):

LayoutTests:

Take 2.

New tests that exercise the parser and computed style
of -webkit-animation-trigger.

* animations/script-tests/trigger-computed-style.js: Added.
(testComputedTriggerRule):
* animations/script-tests/trigger-parsing.js: Added.
(testTriggerRule):
* animations/trigger-computed-style-expected.txt: Added.
* animations/trigger-computed-style.html: Added.
* animations/trigger-parsing-expected.txt: Added.
* animations/trigger-parsing.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformeflTestExpectations">trunk/LayoutTests/platform/efl/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformwinTestExpectations">trunk/LayoutTests/platform/win/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSToStyleMapcpp">trunk/Source/WebCore/css/CSSToStyleMap.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSToStyleMaph">trunk/Source/WebCore/css/CSSToStyleMap.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSValuecpp">trunk/Source/WebCore/css/CSSValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueh">trunk/Source/WebCore/css/CSSValue.h</a></li>
<li><a href="#trunkSourceWebCoreplatformanimationAnimationcpp">trunk/Source/WebCore/platform/animation/Animation.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformanimationAnimationh">trunk/Source/WebCore/platform/animation/Animation.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsanimationsscriptteststriggercomputedstylejs">trunk/LayoutTests/animations/script-tests/trigger-computed-style.js</a></li>
<li><a href="#trunkLayoutTestsanimationsscriptteststriggerparsingjs">trunk/LayoutTests/animations/script-tests/trigger-parsing.js</a></li>
<li><a href="#trunkLayoutTestsanimationstriggercomputedstyleexpectedtxt">trunk/LayoutTests/animations/trigger-computed-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestsanimationstriggercomputedstylehtml">trunk/LayoutTests/animations/trigger-computed-style.html</a></li>
<li><a href="#trunkLayoutTestsanimationstriggerparsingexpectedtxt">trunk/LayoutTests/animations/trigger-parsing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsanimationstriggerparsinghtml">trunk/LayoutTests/animations/trigger-parsing.html</a></li>
<li><a href="#trunkSourceWebCorecssCSSAnimationTriggerScrollValuecpp">trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSAnimationTriggerScrollValueh">trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.h</a></li>
<li><a href="#trunkSourceWebCoreplatformanimationAnimationTriggerh">trunk/Source/WebCore/platform/animation/AnimationTrigger.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/LayoutTests/ChangeLog        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-03-16  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Parsing and Style Resolution of Container-based Animation Triggers
+        https://bugs.webkit.org/show_bug.cgi?id=142687
+        &lt;rdar://problem/20170007&gt;
+
+        Reviewed by Simon Fraser.
+
+        Take 2.
+
+        New tests that exercise the parser and computed style
+        of -webkit-animation-trigger.
+
+        * animations/script-tests/trigger-computed-style.js: Added.
+        (testComputedTriggerRule):
+        * animations/script-tests/trigger-parsing.js: Added.
+        (testTriggerRule):
+        * animations/trigger-computed-style-expected.txt: Added.
+        * animations/trigger-computed-style.html: Added.
+        * animations/trigger-parsing-expected.txt: Added.
+        * animations/trigger-parsing.html: Added.
+
</ins><span class="cx"> 2015-03-16  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: Crash viewing http://www.last.fm/
</span></span></pre></div>
<a id="trunkLayoutTestsanimationsscriptteststriggercomputedstylejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/script-tests/trigger-computed-style.js (0 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/script-tests/trigger-computed-style.js                                (rev 0)
+++ trunk/LayoutTests/animations/script-tests/trigger-computed-style.js        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -0,0 +1,65 @@
</span><ins>+description(&quot;Test the computed style of the -webkit-animation-trigger property.&quot;);
+
+// These have to be global for the test helpers to see them.
+var stylesheet, triggerStyle, subRule;
+var styleElement = document.createElement(&quot;style&quot;);
+document.head.appendChild(styleElement);
+stylesheet = styleElement.sheet;
+
+function testComputedTriggerRule(description, rule, expectedLength, expectedTexts)
+{
+    debug(&quot;&quot;);
+    debug(description + &quot; : &quot; + rule);
+
+    stylesheet.insertRule(&quot;body { -webkit-animation-trigger: &quot; + rule + &quot;; }&quot;, 0);
+
+    triggerStyle = window.getComputedStyle(document.body).getPropertyCSSValue(&quot;-webkit-animation-trigger&quot;);
+    shouldBe(&quot;triggerStyle.length&quot;, &quot;&quot; + expectedLength);
+    for (var i = 0; i &lt; expectedLength; i++) {
+        subRule = triggerStyle[i];
+        shouldBe(&quot;subRule.cssText&quot;, &quot;'&quot; + expectedTexts[i] + &quot;'&quot;);
+    }
+    stylesheet.deleteRule(0);
+}
+
+testComputedTriggerRule(&quot;Auto&quot;,
+                        &quot;auto&quot;, 1,
+                        [&quot;auto&quot;]);
+
+testComputedTriggerRule(&quot;One container-scroll value&quot;,
+                        &quot;container-scroll(10px)&quot;, 1,
+                        [&quot;container-scroll(10px)&quot;]);
+
+testComputedTriggerRule(&quot;One container-scroll value&quot;,
+                        &quot;container-scroll(2em)&quot;, 1,
+                        [&quot;container-scroll(32px)&quot;]);
+
+testComputedTriggerRule(&quot;One container-scroll value with end value&quot;,
+                        &quot;container-scroll(10px, 20px)&quot;, 1,
+                        [&quot;container-scroll(10px, 20px)&quot;]);
+
+testComputedTriggerRule(&quot;Two container-scroll values&quot;,
+                        &quot;container-scroll(10px), container-scroll(20px)&quot;, 2,
+                        [&quot;container-scroll(10px)&quot;, &quot;container-scroll(20px)&quot;]);
+
+testComputedTriggerRule(&quot;Many container-scroll values&quot;,
+                        &quot;container-scroll(10px), container-scroll(20px), container-scroll(30px), container-scroll(40px), container-scroll(1px)&quot;, 5,
+                        [&quot;container-scroll(10px)&quot;, &quot;container-scroll(20px)&quot;, &quot;container-scroll(30px)&quot;, &quot;container-scroll(40px)&quot;, &quot;container-scroll(1px)&quot;]);
+
+testComputedTriggerRule(&quot;No value&quot;,
+                        &quot;&quot;, 1,
+                        [&quot;auto&quot;]);
+
+testComputedTriggerRule(&quot;Bad value&quot;,
+                        &quot;banana&quot;, 1,
+                        [&quot;auto&quot;]);
+
+testComputedTriggerRule(&quot;Multiple bad values&quot;,
+                        &quot;banana, eggs, bacon&quot;, 1,
+                        [&quot;auto&quot;]);
+
+testComputedTriggerRule(&quot;Some good, some bad values&quot;,
+                        &quot;container-scroll(10), eggs, bacon&quot;, 1,
+                        [&quot;auto&quot;]);
+
+successfullyParsed = true;
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/script-tests/trigger-computed-style.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsanimationsscriptteststriggerparsingjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/script-tests/trigger-parsing.js (0 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/script-tests/trigger-parsing.js                                (rev 0)
+++ trunk/LayoutTests/animations/script-tests/trigger-parsing.js        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+description(&quot;Test the parsing of the -webkit-animation-trigger property.&quot;);
+
+// These have to be global for the test helpers to see them.
+var stylesheet, cssRule, declaration, triggerRule, subRule;
+var styleElement = document.createElement(&quot;style&quot;);
+document.head.appendChild(styleElement);
+stylesheet = styleElement.sheet;
+
+function testTriggerRule(description, rule, expectedLength, expectedValue, expectedTexts)
+{
+    debug(&quot;&quot;);
+    debug(description + &quot; : &quot; + rule);
+
+    stylesheet.insertRule(&quot;body { -webkit-animation-trigger: &quot; + rule + &quot;; }&quot;, 0);
+    cssRule = stylesheet.cssRules.item(0);
+
+    shouldBe(&quot;cssRule.type&quot;, &quot;1&quot;);
+
+    declaration = cssRule.style;
+    if (!expectedLength || !expectedValue) {
+        shouldBe(&quot;declaration.length&quot;, &quot;0&quot;);
+        shouldBe(&quot;declaration.getPropertyValue('-webkit-animation-trigger')&quot;, &quot;null&quot;);
+        return;
+    }
+    shouldBe(&quot;declaration.length&quot;, &quot;1&quot;);
+    shouldBe(&quot;declaration.getPropertyValue('-webkit-animation-trigger')&quot;, &quot;'&quot; + expectedValue + &quot;'&quot;);
+
+    triggerRule = declaration.getPropertyCSSValue(&quot;-webkit-animation-trigger&quot;);
+    if (expectedLength &gt; 1) {
+        shouldBe(&quot;triggerRule.length&quot;, &quot;&quot; + expectedLength);
+        for (var i = 0; i &lt; expectedLength; i++) {
+            subRule = triggerRule[i];
+            shouldBe(&quot;subRule.cssText&quot;, &quot;'&quot; + expectedTexts[i] + &quot;'&quot;);
+        }
+    } else {
+        shouldBe(&quot;triggerRule.cssText&quot;, &quot;'&quot; + expectedValue + &quot;'&quot;);
+    }
+
+    stylesheet.deleteRule(0);
+}
+
+debug(&quot;&quot;)
+debug(&quot;Valid property tests&quot;);
+debug(&quot;&quot;)
+
+testTriggerRule(&quot;Auto&quot;,
+                &quot;auto&quot;, 1, &quot;auto&quot;);
+
+testTriggerRule(&quot;Container Scroll&quot;,
+                &quot;container-scroll(200px)&quot;, 1, &quot;container-scroll(200px)&quot;);
+
+testTriggerRule(&quot;Container Scroll&quot;,
+                &quot;container-scroll(2em)&quot;, 1, &quot;container-scroll(2em)&quot;);
+
+testTriggerRule(&quot;Container Scroll&quot;,
+                &quot;container-scroll(30vw)&quot;, 1, &quot;container-scroll(30vw)&quot;);
+
+testTriggerRule(&quot;Container Scroll with end value&quot;,
+                &quot;container-scroll(200px, 300px)&quot;, 1, &quot;container-scroll(200px, 300px)&quot;);
+
+testTriggerRule(&quot;Two scroll values&quot;,
+                &quot;container-scroll(1px), container-scroll(2px)&quot;, 2, &quot;container-scroll(1px), container-scroll(2px)&quot;, [&quot;container-scroll(1px)&quot;, &quot;container-scroll(2px)&quot;]);
+
+testTriggerRule(&quot;Many scroll values&quot;,
+                &quot;container-scroll(1px), container-scroll(2px), container-scroll(3px), container-scroll(4px), container-scroll(5px), container-scroll(3000px)&quot;,
+                6,
+                &quot;container-scroll(1px), container-scroll(2px), container-scroll(3px), container-scroll(4px), container-scroll(5px), container-scroll(3000px)&quot;,
+                [&quot;container-scroll(1px)&quot;, &quot;container-scroll(2px)&quot;, &quot;container-scroll(3px)&quot;, &quot;container-scroll(4px)&quot;, &quot;container-scroll(5px)&quot;, &quot;container-scroll(3000px)&quot;]);
+
+debug(&quot;&quot;)
+debug(&quot;Invalid property tests&quot;);
+debug(&quot;&quot;)
+
+testTriggerRule(&quot;No value&quot;, &quot;&quot;, 0, null);
+testTriggerRule(&quot;Bad value&quot;, &quot;banana&quot;, 0, null);
+testTriggerRule(&quot;Bad list&quot;, &quot;container-scroll(1px), orange&quot;, 0, null);
+testTriggerRule(&quot;Missing comma&quot;, &quot;container-scroll(1px) container-scroll(2px)&quot;, 0, null);
+testTriggerRule(&quot;Too many values&quot;, &quot;container-scroll(1px, 2px, 3px)&quot;, 0, null);
+
+successfullyParsed = true;
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/script-tests/trigger-parsing.js
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsanimationstriggercomputedstyleexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/trigger-computed-style-expected.txt (0 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/trigger-computed-style-expected.txt                                (rev 0)
+++ trunk/LayoutTests/animations/trigger-computed-style-expected.txt        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+Test the computed style of the -webkit-animation-trigger property.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+Auto : auto
+PASS triggerStyle.length is 1
+PASS subRule.cssText is 'auto'
+
+One container-scroll value : container-scroll(10px)
+PASS triggerStyle.length is 1
+PASS subRule.cssText is 'container-scroll(10px)'
+
+One container-scroll value : container-scroll(2em)
+PASS triggerStyle.length is 1
+PASS subRule.cssText is 'container-scroll(32px)'
+
+One container-scroll value with end value : container-scroll(10px, 20px)
+PASS triggerStyle.length is 1
+PASS subRule.cssText is 'container-scroll(10px, 20px)'
+
+Two container-scroll values : container-scroll(10px), container-scroll(20px)
+PASS triggerStyle.length is 2
+PASS subRule.cssText is 'container-scroll(10px)'
+PASS subRule.cssText is 'container-scroll(20px)'
+
+Many container-scroll values : container-scroll(10px), container-scroll(20px), container-scroll(30px), container-scroll(40px), container-scroll(1px)
+PASS triggerStyle.length is 5
+PASS subRule.cssText is 'container-scroll(10px)'
+PASS subRule.cssText is 'container-scroll(20px)'
+PASS subRule.cssText is 'container-scroll(30px)'
+PASS subRule.cssText is 'container-scroll(40px)'
+PASS subRule.cssText is 'container-scroll(1px)'
+
+No value : 
+PASS triggerStyle.length is 1
+PASS subRule.cssText is 'auto'
+
+Bad value : banana
+PASS triggerStyle.length is 1
+PASS subRule.cssText is 'auto'
+
+Multiple bad values : banana, eggs, bacon
+PASS triggerStyle.length is 1
+PASS subRule.cssText is 'auto'
+
+Some good, some bad values : container-scroll(10), eggs, bacon
+PASS triggerStyle.length is 1
+PASS subRule.cssText is 'auto'
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/trigger-computed-style-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsanimationstriggercomputedstylehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/trigger-computed-style.html (0 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/trigger-computed-style.html                                (rev 0)
+++ trunk/LayoutTests/animations/trigger-computed-style.html        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/trigger-computed-style.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/trigger-computed-style.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsanimationstriggerparsingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/trigger-parsing-expected.txt (0 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/trigger-parsing-expected.txt                                (rev 0)
+++ trunk/LayoutTests/animations/trigger-parsing-expected.txt        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -0,0 +1,90 @@
</span><ins>+Test the parsing of the -webkit-animation-trigger property.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+
+Valid property tests
+
+
+Auto : auto
+PASS cssRule.type is 1
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is 'auto'
+PASS triggerRule.cssText is 'auto'
+
+Container Scroll : container-scroll(200px)
+PASS cssRule.type is 1
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is 'container-scroll(200px)'
+PASS triggerRule.cssText is 'container-scroll(200px)'
+
+Container Scroll : container-scroll(2em)
+PASS cssRule.type is 1
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is 'container-scroll(2em)'
+PASS triggerRule.cssText is 'container-scroll(2em)'
+
+Container Scroll : container-scroll(30vw)
+PASS cssRule.type is 1
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is 'container-scroll(30vw)'
+PASS triggerRule.cssText is 'container-scroll(30vw)'
+
+Container Scroll with end value : container-scroll(200px, 300px)
+PASS cssRule.type is 1
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is 'container-scroll(200px, 300px)'
+PASS triggerRule.cssText is 'container-scroll(200px, 300px)'
+
+Two scroll values : container-scroll(1px), container-scroll(2px)
+PASS cssRule.type is 1
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is 'container-scroll(1px), container-scroll(2px)'
+PASS triggerRule.length is 2
+PASS subRule.cssText is 'container-scroll(1px)'
+PASS subRule.cssText is 'container-scroll(2px)'
+
+Many scroll values : container-scroll(1px), container-scroll(2px), container-scroll(3px), container-scroll(4px), container-scroll(5px), container-scroll(3000px)
+PASS cssRule.type is 1
+PASS declaration.length is 1
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is 'container-scroll(1px), container-scroll(2px), container-scroll(3px), container-scroll(4px), container-scroll(5px), container-scroll(3000px)'
+PASS triggerRule.length is 6
+PASS subRule.cssText is 'container-scroll(1px)'
+PASS subRule.cssText is 'container-scroll(2px)'
+PASS subRule.cssText is 'container-scroll(3px)'
+PASS subRule.cssText is 'container-scroll(4px)'
+PASS subRule.cssText is 'container-scroll(5px)'
+PASS subRule.cssText is 'container-scroll(3000px)'
+
+Invalid property tests
+
+
+No value : 
+PASS cssRule.type is 1
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is null
+
+Bad value : banana
+PASS cssRule.type is 1
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is null
+
+Bad list : container-scroll(1px), orange
+PASS cssRule.type is 1
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is null
+
+Missing comma : container-scroll(1px) container-scroll(2px)
+PASS cssRule.type is 1
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is null
+
+Too many values : container-scroll(1px, 2px, 3px)
+PASS cssRule.type is 1
+PASS declaration.length is 0
+PASS declaration.getPropertyValue('-webkit-animation-trigger') is null
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/trigger-parsing-expected.txt
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsanimationstriggerparsinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/trigger-parsing.html (0 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/trigger-parsing.html                                (rev 0)
+++ trunk/LayoutTests/animations/trigger-parsing.html        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script src=&quot;script-tests/trigger-parsing.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/trigger-parsing.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsplatformeflTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/efl/TestExpectations (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/TestExpectations        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/LayoutTests/platform/efl/TestExpectations        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -62,6 +62,10 @@
</span><span class="cx"> # Need a scroll snap point implementation
</span><span class="cx"> css3/scroll-snap [ Skip ]
</span><span class="cx"> 
</span><ins>+# TODO Animation triggers not supported
+animations/trigger-computed-style.html [ Skip ]
+animations/trigger-parsing.html [ Skip ]
+
</ins><span class="cx"> # ----------------------------------------
</span><span class="cx"> # Tests which also fail in other platforms
</span><span class="cx"> # ----------------------------------------
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -460,6 +460,10 @@
</span><span class="cx"> # ENABLE(CSS_SCROLL_SNAP) is disabled.
</span><span class="cx"> css3/scroll-snap
</span><span class="cx"> 
</span><ins>+# TODO Animation triggers not supported
+animations/trigger-computed-style.html [ Skip ]
+animations/trigger-parsing.html [ Skip ]
+
</ins><span class="cx"> # ENABLE(SHADOW_DOM) is disabled.
</span><span class="cx"> Bug(GTK) fast/dom/shadow [ Skip ]
</span><span class="cx"> Bug(GTK) fast/dom/HTMLTemplateElement/cycles-in-shadow.html [ Skip ]
</span></span></pre></div>
<a id="trunkLayoutTestsplatformwinTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/win/TestExpectations (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/TestExpectations        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/LayoutTests/platform/win/TestExpectations        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -594,6 +594,11 @@
</span><span class="cx"> 
</span><span class="cx"> # TODO APNG is not supported
</span><span class="cx"> webkit.org/b/142731 fast/images/animated-png.html [ Skip ]
</span><ins>+
+# TODO Animation triggers not supported
+animations/trigger-computed-style.html [ Skip ]
+animations/trigger-parsing.html [ Skip ]
+
</ins><span class="cx"> ################################################################################
</span><span class="cx"> ###########    End Missing Functionality Prevents Testing         ##############
</span><span class="cx"> ################################################################################
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/ChangeLog        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -1,3 +1,92 @@
</span><ins>+2015-03-16  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Parsing and Style Resolution of Container-based Animation Triggers
+        https://bugs.webkit.org/show_bug.cgi?id=142687
+        &lt;rdar://problem/20170007&gt;
+
+        Reviewed by Simon Fraser.
+
+        Take 2 after the previous patch was rolled out.
+
+        This is the beginning of a prototype implementation of
+        CSS Animation Triggers, as described by
+        https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
+
+        In this patch we parse and resolve the value of a new
+        CSS property &quot;-webkit-animation-trigger&quot;. At the moment it
+        only accepts one function value &quot;container-scroll&quot;, which
+        will trigger the animation at an absolute position within
+        an element's scrolling container. We expect the syntax to
+        change in the near future, as the spec is written.
+
+        Tests: animations/trigger-computed-style.html
+               animations/trigger-parsing.html
+
+        * WebCore.xcodeproj/project.pbxproj: Add the new files.
+
+        * css/CSSAnimationTriggerScrollValue.cpp: Added.
+        (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
+        (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
+        * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
+        scroll trigger. This name may change in the future to better represent the
+        type of trigger, but it is good enough for now.
+        (WebCore::CSSAnimationTriggerScrollValue::create):
+        (WebCore::CSSAnimationTriggerScrollValue::startValue):
+        (WebCore::CSSAnimationTriggerScrollValue::endValue):
+        (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
+        (WebCore::getAnimationTriggerValue): Gets the current computed style.
+        (WebCore::ComputedStyleExtractor::propertyValue):
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseAnimationTrigger): Parse the &quot;container-scroll&quot; function
+        and record the value as a CSSAnimationTriggerScrollValue.
+        (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
+        * css/CSSParser.h:
+
+        * css/CSSPropertyNames.in: Add &quot;-webkit-animation-trigger&quot;.
+
+        * css/CSSToStyleMap.cpp:
+        (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
+        an Animation object.
+        * css/CSSToStyleMap.h:
+
+        * css/CSSValue.cpp: Handle the new CSSValue type.
+        (WebCore::CSSValue::equals):
+        (WebCore::CSSValue::cssText):
+        (WebCore::CSSValue::destroy):
+        * css/CSSValue.h:
+        (WebCore::CSSValue::isAnimationTriggerScrollValue):
+
+        * platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
+        and use them in the operator==.
+        * platform/animation/Animation.h: Add AnimationTrigger as a new field.
+        (WebCore::Animation::isTriggerSet):
+        (WebCore::Animation::isEmpty):
+
+        * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
+        &quot;auto&quot; and the scrolling trigger.
+        (WebCore::AnimationTrigger::~AnimationTrigger):
+        (WebCore::AnimationTrigger::type):
+        (WebCore::AnimationTrigger::isAutoAnimationTrigger):
+        (WebCore::AnimationTrigger::isScrollAnimationTrigger):
+        (WebCore::AnimationTrigger::AnimationTrigger):
+        (WebCore::AutoAnimationTrigger::create):
+        (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
+        (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
+        (WebCore::ScrollAnimationTrigger::create):
+        (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
+        (WebCore::ScrollAnimationTrigger::startValue):
+        (WebCore::ScrollAnimationTrigger::setStartValue):
+        (WebCore::ScrollAnimationTrigger::endValue):
+        (WebCore::ScrollAnimationTrigger::setEndValue):
+        (WebCore::ScrollAnimationTrigger::hasEndValue):
+        (WebCore::ScrollAnimationTrigger::setHasEndValue):
+        (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
+
</ins><span class="cx"> 2015-03-16  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Progress towards CMake on Mac
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -1280,6 +1280,8 @@
</span><span class="cx">                 31A795C71888BCB200382F90 /* ANGLEInstancedArrays.h in Headers */ = {isa = PBXBuildFile; fileRef = 31A795C21888B72400382F90 /* ANGLEInstancedArrays.h */; };
</span><span class="cx">                 31A795C81888BCB500382F90 /* ANGLEInstancedArrays.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31A795C11888B72400382F90 /* ANGLEInstancedArrays.cpp */; };
</span><span class="cx">                 31AB5000122878A2001A7DB0 /* GraphicsContext3DIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31AB4FFF122878A2001A7DB0 /* GraphicsContext3DIOS.h */; };
</span><ins>+                31BC742D1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31BC742B1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.cpp */; };
+                31BC742E1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 31BC742C1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.h */; };
</ins><span class="cx">                 31C0FF210E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF1B0E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp */; };
</span><span class="cx">                 31C0FF220E4CEB6E007D6FE5 /* WebKitAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF1C0E4CEB6E007D6FE5 /* WebKitAnimationEvent.h */; };
</span><span class="cx">                 31C0FF240E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF1E0E4CEB6E007D6FE5 /* WebKitTransitionEvent.cpp */; };
</span><span class="lines">@@ -1295,6 +1297,7 @@
</span><span class="cx">                 31C0FF4D0E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF470E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm */; };
</span><span class="cx">                 31C0FF4E0E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */; };
</span><span class="cx">                 31D591B316697A6C00E6BF02 /* PlugInClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31D591B116697A6C00E6BF02 /* PlugInClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                31DCD29D1AB4FBDE0072E817 /* AnimationTrigger.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DCD29C1AB4FBDE0072E817 /* AnimationTrigger.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 31EAF97E121435A400E7C1BF /* DeviceMotionClientIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 31EAF97C121435A400E7C1BF /* DeviceMotionClientIOS.h */; };
</span><span class="cx">                 31EAF97F121435A400E7C1BF /* DeviceMotionClientIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31EAF97D121435A400E7C1BF /* DeviceMotionClientIOS.mm */; };
</span><span class="cx">                 31EC1E2814FF60EE00C94662 /* JSNotificationPermissionCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31EC1E2614FF60EE00C94662 /* JSNotificationPermissionCallback.cpp */; };
</span><span class="lines">@@ -8377,6 +8380,8 @@
</span><span class="cx">                 31A795C41888BAD100382F90 /* JSANGLEInstancedArrays.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSANGLEInstancedArrays.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31A795C51888BAD100382F90 /* JSANGLEInstancedArrays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSANGLEInstancedArrays.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31AB4FFF122878A2001A7DB0 /* GraphicsContext3DIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DIOS.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                31BC742B1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSAnimationTriggerScrollValue.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                31BC742C1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSAnimationTriggerScrollValue.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 31C0FF1B0E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitAnimationEvent.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31C0FF1C0E4CEB6E007D6FE5 /* WebKitAnimationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitAnimationEvent.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31C0FF1D0E4CEB6E007D6FE5 /* WebKitAnimationEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitAnimationEvent.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -8394,6 +8399,7 @@
</span><span class="cx">                 31C0FF470E4CEFDD007D6FE5 /* DOMWebKitTransitionEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMWebKitTransitionEvent.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31C0FF480E4CEFDD007D6FE5 /* DOMWebKitTransitionEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWebKitTransitionEventInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31D591B116697A6C00E6BF02 /* PlugInClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlugInClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                31DCD29C1AB4FBDE0072E817 /* AnimationTrigger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationTrigger.h; path = animation/AnimationTrigger.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 31E8D8BA160BC94B004CE8F5 /* RenderSnapshottedPlugIn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSnapshottedPlugIn.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31E8D8BB160BC94C004CE8F5 /* RenderSnapshottedPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSnapshottedPlugIn.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 31EAF97C121435A400E7C1BF /* DeviceMotionClientIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DeviceMotionClientIOS.h; path = ios/DeviceMotionClientIOS.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16070,7 +16076,6 @@
</span><span class="cx">                 498770C11242C50D002226BA /* gpu */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><del>-                                498771161242CD7F002226BA /* mac */,
</del><span class="cx">                                 498770D71242C535002226BA /* Texture.cpp */,
</span><span class="cx">                                 498770D81242C535002226BA /* Texture.h */,
</span><span class="cx">                                 498770D91242C535002226BA /* TilingData.cpp */,
</span><span class="lines">@@ -16145,6 +16150,7 @@
</span><span class="cx">                                 49E912A60EFAC906009D0CAF /* Animation.h */,
</span><span class="cx">                                 49E912A70EFAC906009D0CAF /* AnimationList.cpp */,
</span><span class="cx">                                 49E912A80EFAC906009D0CAF /* AnimationList.h */,
</span><ins>+                                31DCD29C1AB4FBDE0072E817 /* AnimationTrigger.h */,
</ins><span class="cx">                                 0F580FAE149800D400FB5BD8 /* AnimationUtilities.h */,
</span><span class="cx">                                 49E912A90EFAC906009D0CAF /* TimingFunction.h */,
</span><span class="cx">                         );
</span><span class="lines">@@ -22185,6 +22191,8 @@
</span><span class="cx">                 F523D18402DE42E8018635CA /* css */ = {
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><ins>+                                31BC742B1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.cpp */,
+                                31BC742C1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.h */,
</ins><span class="cx">                                 83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */,
</span><span class="cx">                                 FBD6AF8415EF21D4008B7110 /* BasicShapeFunctions.cpp */,
</span><span class="cx">                                 FBD6AF8515EF21D4008B7110 /* BasicShapeFunctions.h */,
</span><span class="lines">@@ -24189,6 +24197,7 @@
</span><span class="cx">                                 85BA4CDD0AA6861B0088052D /* DOMHTMLButtonElement.h in Headers */,
</span><span class="cx">                                 85E711A10AC5D5350053270F /* DOMHTMLButtonElementInternal.h in Headers */,
</span><span class="cx">                                 93D3C1590F97A9D70053C013 /* DOMHTMLCanvasElement.h in Headers */,
</span><ins>+                                31DCD29D1AB4FBDE0072E817 /* AnimationTrigger.h in Headers */,
</ins><span class="cx">                                 93F9B6580BA0F35E00854064 /* DOMHTMLCanvasElementInternal.h in Headers */,
</span><span class="cx">                                 85DF2F8E0AA3C88100AD64C5 /* DOMHTMLCollection.h in Headers */,
</span><span class="cx">                                 85E711A20AC5D5350053270F /* DOMHTMLCollectionInternal.h in Headers */,
</span><span class="lines">@@ -24321,6 +24330,7 @@
</span><span class="cx">                                 8518DD780A9CF31B0091B7A6 /* DOMNamedNodeMap.h in Headers */,
</span><span class="cx">                                 85E711D20AC5D5350053270F /* DOMNamedNodeMapInternal.h in Headers */,
</span><span class="cx">                                 853BF4DB0ABB6B55008647BB /* DOMNode.h in Headers */,
</span><ins>+                                31BC742E1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.h in Headers */,
</ins><span class="cx">                                 854075260AD6C66700620C57 /* DOMNodeFilter.h in Headers */,
</span><span class="cx">                                 85B498FB0ADB340200925CBB /* DOMNodeInternal.h in Headers */,
</span><span class="cx">                                 85526C370AB0A17E000302EA /* DOMNodeIterator.h in Headers */,
</span><span class="lines">@@ -29900,6 +29910,7 @@
</span><span class="cx">                                 B28C6A290D00C44800334AA4 /* SVGImageLoader.cpp in Sources */,
</span><span class="cx">                                 B2227A2F0D00BF220071B782 /* SVGLangSpace.cpp in Sources */,
</span><span class="cx">                                 B2227A320D00BF220071B782 /* SVGLength.cpp in Sources */,
</span><ins>+                                31BC742D1AAFF45C006B4340 /* CSSAnimationTriggerScrollValue.cpp in Sources */,
</ins><span class="cx">                                 7134496D146941B300720312 /* SVGLengthContext.cpp in Sources */,
</span><span class="cx">                                 B2227A350D00BF220071B782 /* SVGLengthList.cpp in Sources */,
</span><span class="cx">                                 B2227A380D00BF220071B782 /* SVGLinearGradientElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSAnimationTriggerScrollValuecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.cpp (0 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.cpp                                (rev 0)
+++ trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.cpp        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;CSSAnimationTriggerScrollValue.h&quot;
+
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+
+#include &lt;wtf/text/StringBuilder.h&gt;
+
+namespace WebCore {
+
+String CSSAnimationTriggerScrollValue::customCSSText() const
+{
+    StringBuilder result;
+    result.append(&quot;container-scroll(&quot;);
+    result.append(m_startValue-&gt;cssText());
+    if (m_endValue) {
+        result.append(&quot;, &quot;);
+        result.append(m_endValue-&gt;cssText());
+    }
+    result.append(')');
+    return result.toString();
+}
+
+bool CSSAnimationTriggerScrollValue::equals(const CSSAnimationTriggerScrollValue&amp; other) const
+{
+    return m_startValue-&gt;equals(*other.m_startValue.get()) &amp;&amp; m_endValue-&gt;equals(*other.m_endValue.get());
+}
+
+} // namespace WebCore
+
+#endif
</ins><span class="cx">Property changes on: trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.cpp
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebCorecssCSSAnimationTriggerScrollValueh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.h (0 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.h                                (rev 0)
+++ trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.h        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef CSSAnimationTriggerScrollValue_h
+#define CSSAnimationTriggerScrollValue_h
+
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+
+#include &quot;CSSValue.h&quot;
+#include &lt;wtf/PassRefPtr.h&gt;
+
+namespace WebCore {
+
+class CSSAnimationTriggerScrollValue : public CSSValue {
+public:
+    static Ref&lt;CSSAnimationTriggerScrollValue&gt; create(PassRefPtr&lt;CSSValue&gt; startValue, PassRefPtr&lt;CSSValue&gt; endValue = nullptr)
+    {
+        return adoptRef(*new CSSAnimationTriggerScrollValue(startValue, endValue));
+    }
+
+    const CSSValue* startValue() const { return m_startValue.get(); }
+    const CSSValue* endValue() const { return m_endValue.get(); }
+    bool hasEndValue() const { return m_endValue; }
+
+    String customCSSText() const;
+
+    bool equals(const CSSAnimationTriggerScrollValue&amp;) const;
+
+private:
+    CSSAnimationTriggerScrollValue(PassRefPtr&lt;CSSValue&gt; startValue, PassRefPtr&lt;CSSValue&gt; endValue)
+        : CSSValue(AnimationTriggerScrollClass)
+        , m_startValue(startValue)
+        , m_endValue(endValue)
+    {
+    }
+
+    RefPtr&lt;CSSValue&gt; m_startValue;
+    RefPtr&lt;CSSValue&gt; m_endValue;
+};
+
+}
+
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSAnimationTriggerScrollValue, isAnimationTriggerScrollValue())
+
+#endif
+
+#endif
</ins><span class="cx">Property changes on: trunk/Source/WebCore/css/CSSAnimationTriggerScrollValue.h
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;AnimationController.h&quot;
</span><span class="cx"> #include &quot;BasicShapeFunctions.h&quot;
</span><span class="cx"> #include &quot;BasicShapes.h&quot;
</span><ins>+#include &quot;CSSAnimationTriggerScrollValue.h&quot;
</ins><span class="cx"> #include &quot;CSSAspectRatioValue.h&quot;
</span><span class="cx"> #include &quot;CSSBasicShapes.h&quot;
</span><span class="cx"> #include &quot;CSSBorderImage.h&quot;
</span><span class="lines">@@ -87,6 +88,10 @@
</span><span class="cx"> #include &quot;StyleScrollSnapPoints.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+#include &quot;AnimationTrigger.h&quot;
+#endif
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> // List of all properties we know how to compute, omitting shorthands.
</span><span class="lines">@@ -1221,6 +1226,37 @@
</span><span class="cx">     return list;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+static Ref&lt;CSSValue&gt; createAnimationTriggerValue(const AnimationTrigger* trigger, const RenderStyle* style)
+{
+    switch (trigger-&gt;type()) {
+    case AnimationTrigger::AnimationTriggerType::ScrollAnimationTriggerType: {
+        const ScrollAnimationTrigger* scrollAnimationTrigger = static_cast&lt;const ScrollAnimationTrigger*&gt;(trigger);
+        if (scrollAnimationTrigger-&gt;endValue().isAuto())
+            return CSSAnimationTriggerScrollValue::create(zoomAdjustedPixelValueForLength(scrollAnimationTrigger-&gt;startValue(), style));
+        else
+            return CSSAnimationTriggerScrollValue::create(zoomAdjustedPixelValueForLength(scrollAnimationTrigger-&gt;startValue(), style),
+                                                          zoomAdjustedPixelValueForLength(scrollAnimationTrigger-&gt;endValue(), style));
+    }
+    default:
+        ASSERT(trigger-&gt;type() == AnimationTrigger::AnimationTriggerType::AutoAnimationTriggerType);
+        return cssValuePool().createIdentifierValue(CSSValueAuto);
+    }
+}
+
+static Ref&lt;CSSValueList&gt; getAnimationTriggerValue(const AnimationList* animList, const RenderStyle* style)
+{
+    auto list = CSSValueList::createCommaSeparated();
+    if (animList) {
+        for (size_t i = 0; i &lt; animList-&gt;size(); ++i)
+            list.get().append(createAnimationTriggerValue(animList-&gt;animation(i).trigger().get(), style));
+    } else
+        list.get().append(createAnimationTriggerValue(Animation::initialTrigger().get(), style));
+
+    return list;
+}
+#endif
+
</ins><span class="cx"> static Ref&lt;CSSValue&gt; createLineBoxContainValue(unsigned lineBoxContain)
</span><span class="cx"> {
</span><span class="cx">     if (!lineBoxContain)
</span><span class="lines">@@ -2720,6 +2756,10 @@
</span><span class="cx">         case CSSPropertyAnimationTimingFunction:
</span><span class="cx">         case CSSPropertyWebkitAnimationTimingFunction:
</span><span class="cx">             return getTimingFunctionValue(style-&gt;animations());
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+        case CSSPropertyWebkitAnimationTrigger:
+            return getAnimationTriggerValue(style-&gt;animations(), style.get());
+#endif
</ins><span class="cx">         case CSSPropertyWebkitAppearance:
</span><span class="cx">             return cssValuePool().createValue(style-&gt;appearance());
</span><span class="cx">         case CSSPropertyWebkitAspectRatio:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CSSParser.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;CSSAnimationTriggerScrollValue.h&quot;
</ins><span class="cx"> #include &quot;CSSAspectRatioValue.h&quot;
</span><span class="cx"> #include &quot;CSSBasicShapes.h&quot;
</span><span class="cx"> #include &quot;CSSBorderImage.h&quot;
</span><span class="lines">@@ -2689,6 +2690,9 @@
</span><span class="cx">     case CSSPropertyWebkitAnimationPlayState:
</span><span class="cx">     case CSSPropertyWebkitAnimationIterationCount:
</span><span class="cx">     case CSSPropertyWebkitAnimationTimingFunction:
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    case CSSPropertyWebkitAnimationTrigger:
+#endif
</ins><span class="cx">     case CSSPropertyTransitionDelay:
</span><span class="cx">     case CSSPropertyTransitionDuration:
</span><span class="cx">     case CSSPropertyTransitionTimingFunction:
</span><span class="lines">@@ -4743,6 +4747,51 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+PassRefPtr&lt;CSSValue&gt; CSSParser::parseAnimationTrigger()
+{
+    CSSParserValue* value = m_valueList-&gt;current();
+    if (value-&gt;id == CSSValueAuto)
+        return cssValuePool().createIdentifierValue(CSSValueAuto);
+
+    if (value-&gt;unit != CSSParserValue::Function)
+        return nullptr;
+
+    CSSParserValueList* args = value-&gt;function-&gt;args.get();
+
+    if (equalIgnoringCase(value-&gt;function-&gt;name, &quot;container-scroll(&quot;)) {
+        if (!args || (args-&gt;size() != 1 &amp;&amp; args-&gt;size() != 3))
+            return nullptr;
+
+        CSSParserValue* argument = args-&gt;current();
+        ValueWithCalculation firstArgumentWithCalculation(*argument);
+        if (!validateUnit(firstArgumentWithCalculation, FLength))
+            return nullptr;
+
+        RefPtr&lt;CSSValue&gt; startValue = createPrimitiveNumericValue(firstArgumentWithCalculation);
+
+        argument = args-&gt;next();
+
+        if (!argument)
+            return CSSAnimationTriggerScrollValue::create(startValue.release());
+
+        if (!isComma(argument))
+            return nullptr;
+
+        argument = args-&gt;next();
+        ValueWithCalculation secondArgumentWithCalculation(*argument);
+        if (!validateUnit(secondArgumentWithCalculation, FLength))
+            return nullptr;
+
+        RefPtr&lt;CSSValue&gt; endValue = createPrimitiveNumericValue(secondArgumentWithCalculation);
+
+        return CSSAnimationTriggerScrollValue::create(startValue.release(), endValue.release());
+    }
+
+    return 0;
+}
+#endif
+
</ins><span class="cx"> PassRefPtr&lt;CSSValue&gt; CSSParser::parseAnimationProperty(AnimationParseContext&amp; context)
</span><span class="cx"> {
</span><span class="cx">     CSSParserValue&amp; value = *m_valueList-&gt;current();
</span><span class="lines">@@ -4980,6 +5029,13 @@
</span><span class="cx">                 if (currValue)
</span><span class="cx">                     m_valueList-&gt;next();
</span><span class="cx">                 break;
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+            case CSSPropertyWebkitAnimationTrigger:
+                currValue = parseAnimationTrigger();
+                if (currValue)
+                    m_valueList-&gt;next();
+                break;
+#endif
</ins><span class="cx">             default:
</span><span class="cx">                 ASSERT_NOT_REACHED();
</span><span class="cx">                 return false;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/css/CSSParser.h        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -181,6 +181,9 @@
</span><span class="cx">     PassRefPtr&lt;CSSValue&gt; parseAnimationPlayState();
</span><span class="cx">     PassRefPtr&lt;CSSValue&gt; parseAnimationProperty(AnimationParseContext&amp;);
</span><span class="cx">     PassRefPtr&lt;CSSValue&gt; parseAnimationTimingFunction();
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    PassRefPtr&lt;CSSValue&gt; parseAnimationTrigger();
+#endif
</ins><span class="cx">     static Vector&lt;double&gt; parseKeyframeSelector(const String&amp;);
</span><span class="cx"> 
</span><span class="cx">     bool parseTransformOriginShorthand(RefPtr&lt;CSSValue&gt;&amp;, RefPtr&lt;CSSValue&gt;&amp;, RefPtr&lt;CSSValue&gt;&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -367,6 +367,9 @@
</span><span class="cx"> -webkit-animation-name [AnimationProperty, NameForMethods=Name]
</span><span class="cx"> -webkit-animation-play-state [AnimationProperty, NameForMethods=PlayState]
</span><span class="cx"> -webkit-animation-timing-function [AnimationProperty, NameForMethods=TimingFunction]
</span><ins>+#if defined(ENABLE_CSS_ANIMATIONS_LEVEL_2) &amp;&amp; ENABLE_CSS_ANIMATIONS_LEVEL_2
+-webkit-animation-trigger [AnimationProperty, NameForMethods=Trigger]
+#endif
</ins><span class="cx"> -webkit-appearance
</span><span class="cx"> -webkit-aspect-ratio [Inherited, Custom=All]
</span><span class="cx"> -webkit-backface-visibility
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSToStyleMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSToStyleMap.cpp (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSToStyleMap.cpp        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/css/CSSToStyleMap.cpp        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;CSSToStyleMap.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;Animation.h&quot;
</span><ins>+#include &quot;CSSAnimationTriggerScrollValue.h&quot;
</ins><span class="cx"> #include &quot;CSSBorderImageSliceValue.h&quot;
</span><span class="cx"> #include &quot;CSSImageGeneratorValue.h&quot;
</span><span class="cx"> #include &quot;CSSImageSetValue.h&quot;
</span><span class="lines">@@ -513,6 +514,38 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+void CSSToStyleMap::mapAnimationTrigger(Animation&amp; animation, CSSValue&amp; value)
+{
+    if (value.isInitialValue()) {
+        animation.setTrigger(Animation::initialTrigger());
+        return;
+    }
+
+    if (value.isPrimitiveValue()) {
+        auto&amp; primitiveValue = downcast&lt;CSSPrimitiveValue&gt;(value);
+        if (primitiveValue.getValueID() == CSSValueAuto)
+            animation.setTrigger(AutoAnimationTrigger::create());
+        return;
+    }
+
+    if (value.isAnimationTriggerScrollValue()) {
+        auto&amp; scrollTrigger = downcast&lt;CSSAnimationTriggerScrollValue&gt;(value);
+
+        const CSSPrimitiveValue* startValue = downcast&lt;CSSPrimitiveValue&gt;(scrollTrigger.startValue());
+        Length startLength = startValue-&gt;computeLength&lt;Length&gt;(m_resolver-&gt;state().cssToLengthConversionData());
+
+        Length endLength;
+        if (scrollTrigger.hasEndValue()) {
+            const CSSPrimitiveValue* endValue = downcast&lt;CSSPrimitiveValue&gt;(scrollTrigger.endValue());
+            endLength = endValue-&gt;computeLength&lt;Length&gt;(m_resolver-&gt;state().cssToLengthConversionData());
+        }
+
+        animation.setTrigger(ScrollAnimationTrigger::create(startLength, endLength));
+    }
+}
+#endif
+
</ins><span class="cx"> void CSSToStyleMap::mapNinePieceImage(CSSPropertyID property, CSSValue* value, NinePieceImage&amp; image)
</span><span class="cx"> {
</span><span class="cx">     // If we're not a value list, then we are &quot;none&quot; and don't need to alter the empty image at all.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSToStyleMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSToStyleMap.h (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSToStyleMap.h        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/css/CSSToStyleMap.h        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -67,6 +67,9 @@
</span><span class="cx">     void mapAnimationPlayState(Animation&amp;, CSSValue&amp;);
</span><span class="cx">     void mapAnimationProperty(Animation&amp;, CSSValue&amp;);
</span><span class="cx">     void mapAnimationTimingFunction(Animation&amp;, CSSValue&amp;);
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    void mapAnimationTrigger(Animation&amp;, CSSValue&amp;);
+#endif
</ins><span class="cx"> 
</span><span class="cx">     void mapNinePieceImage(CSSPropertyID, CSSValue*, NinePieceImage&amp;);
</span><span class="cx">     void mapNinePieceImageSlice(CSSValue&amp;, NinePieceImage&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.cpp (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.cpp        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/css/CSSValue.cpp        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;CSSValue.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;CSSAnimationTriggerScrollValue.h&quot;
</ins><span class="cx"> #include &quot;CSSAspectRatioValue.h&quot;
</span><span class="cx"> #include &quot;CSSBorderImageSliceValue.h&quot;
</span><span class="cx"> #include &quot;CSSCalculationValue.h&quot;
</span><span class="lines">@@ -226,6 +227,10 @@
</span><span class="cx">             return compareCSSValues&lt;SVGColor&gt;(*this, other);
</span><span class="cx">         case SVGPaintClass:
</span><span class="cx">             return compareCSSValues&lt;SVGPaint&gt;(*this, other);
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+        case AnimationTriggerScrollClass:
+            return compareCSSValues&lt;CSSAnimationTriggerScrollValue&gt;(*this, other);
+#endif
</ins><span class="cx">         default:
</span><span class="cx">             ASSERT_NOT_REACHED();
</span><span class="cx">             return false;
</span><span class="lines">@@ -312,6 +317,10 @@
</span><span class="cx">         return downcast&lt;SVGColor&gt;(*this).customCSSText();
</span><span class="cx">     case SVGPaintClass:
</span><span class="cx">         return downcast&lt;SVGPaint&gt;(*this).customCSSText();
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    case AnimationTriggerScrollClass:
+        return downcast&lt;CSSAnimationTriggerScrollValue&gt;(*this).customCSSText();
+#endif
</ins><span class="cx">     case WebKitCSSResourceClass:
</span><span class="cx">         return downcast&lt;WebKitCSSResourceValue&gt;(*this).customCSSText();
</span><span class="cx">     }
</span><span class="lines">@@ -426,6 +435,11 @@
</span><span class="cx">     case SVGPaintClass:
</span><span class="cx">         delete downcast&lt;SVGPaint&gt;(this);
</span><span class="cx">         return;
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    case AnimationTriggerScrollClass:
+        delete downcast&lt;CSSAnimationTriggerScrollValue&gt;(this);
+        return;
+#endif
</ins><span class="cx">     case WebKitCSSResourceClass:
</span><span class="cx">         delete downcast&lt;WebKitCSSResourceValue&gt;(this);
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValue.h (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValue.h        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/css/CSSValue.h        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -105,6 +105,10 @@
</span><span class="cx">     bool isUnicodeRangeValue() const { return m_classType == UnicodeRangeClass; }
</span><span class="cx">     bool isWebKitCSSResourceValue() const { return m_classType == WebKitCSSResourceClass; }
</span><span class="cx"> 
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    bool isAnimationTriggerScrollValue() const { return m_classType == AnimationTriggerScrollClass; }
+#endif
+
</ins><span class="cx">     bool isCSSOMSafe() const { return m_isCSSOMSafe; }
</span><span class="cx">     bool isSubtypeExposedToCSSOM() const
</span><span class="cx">     { 
</span><span class="lines">@@ -165,6 +169,10 @@
</span><span class="cx">         SVGPaintClass,
</span><span class="cx">         WebKitCSSResourceClass,
</span><span class="cx"> 
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+        AnimationTriggerScrollClass,
+#endif
+
</ins><span class="cx">         // List class types must appear after ValueListClass.
</span><span class="cx">         ValueListClass,
</span><span class="cx"> #if ENABLE(CSS_IMAGE_SET)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformanimationAnimationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/animation/Animation.cpp (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/animation/Animation.cpp        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/platform/animation/Animation.cpp        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -32,6 +32,9 @@
</span><span class="cx">     , m_delay(initialDelay())
</span><span class="cx">     , m_duration(initialDuration())
</span><span class="cx">     , m_timingFunction(initialTimingFunction())
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    , m_trigger(initialTrigger())
+#endif
</ins><span class="cx">     , m_direction(initialDirection())
</span><span class="cx">     , m_fillMode(initialFillMode())
</span><span class="cx">     , m_playState(initialPlayState())
</span><span class="lines">@@ -44,6 +47,9 @@
</span><span class="cx">     , m_playStateSet(false)
</span><span class="cx">     , m_propertySet(false)
</span><span class="cx">     , m_timingFunctionSet(false)
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    , m_triggerSet(false)
+#endif
</ins><span class="cx">     , m_isNone(false)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -57,6 +63,9 @@
</span><span class="cx">     , m_delay(o.m_delay)
</span><span class="cx">     , m_duration(o.m_duration)
</span><span class="cx">     , m_timingFunction(o.m_timingFunction)
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    , m_trigger(o.m_trigger)
+#endif
</ins><span class="cx">     , m_direction(o.m_direction)
</span><span class="cx">     , m_fillMode(o.m_fillMode)
</span><span class="cx">     , m_playState(o.m_playState)
</span><span class="lines">@@ -69,6 +78,9 @@
</span><span class="cx">     , m_playStateSet(o.m_playStateSet)
</span><span class="cx">     , m_propertySet(o.m_propertySet)
</span><span class="cx">     , m_timingFunctionSet(o.m_timingFunctionSet)
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    , m_triggerSet(o.m_triggerSet)
+#endif
</ins><span class="cx">     , m_isNone(o.m_isNone)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="lines">@@ -85,6 +97,9 @@
</span><span class="cx">     m_direction = o.m_direction;
</span><span class="cx">     m_fillMode = o.m_fillMode;
</span><span class="cx">     m_playState = o.m_playState;
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    m_trigger = o.m_trigger;
+#endif
</ins><span class="cx"> 
</span><span class="cx">     m_delaySet = o.m_delaySet;
</span><span class="cx">     m_directionSet = o.m_directionSet;
</span><span class="lines">@@ -95,6 +110,9 @@
</span><span class="cx">     m_playStateSet = o.m_playStateSet;
</span><span class="cx">     m_propertySet = o.m_propertySet;
</span><span class="cx">     m_timingFunctionSet = o.m_timingFunctionSet;
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    m_triggerSet = o.m_triggerSet;
+#endif
</ins><span class="cx">     m_isNone = o.m_isNone;
</span><span class="cx"> 
</span><span class="cx">     return *this;
</span><span class="lines">@@ -116,6 +134,9 @@
</span><span class="cx">                   &amp;&amp; m_delay == o-&gt;m_delay
</span><span class="cx">                   &amp;&amp; m_duration == o-&gt;m_duration
</span><span class="cx">                   &amp;&amp; *(m_timingFunction.get()) == *(o-&gt;m_timingFunction.get())
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+                  &amp;&amp; *(m_trigger.get()) == *(o-&gt;m_trigger.get())
+#endif
</ins><span class="cx">                   &amp;&amp; m_direction == o-&gt;m_direction
</span><span class="cx">                   &amp;&amp; m_fillMode == o-&gt;m_fillMode
</span><span class="cx">                   &amp;&amp; m_delaySet == o-&gt;m_delaySet
</span><span class="lines">@@ -126,6 +147,9 @@
</span><span class="cx">                   &amp;&amp; m_nameSet == o-&gt;m_nameSet
</span><span class="cx">                   &amp;&amp; m_propertySet == o-&gt;m_propertySet
</span><span class="cx">                   &amp;&amp; m_timingFunctionSet == o-&gt;m_timingFunctionSet
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+                  &amp;&amp; m_triggerSet == o-&gt;m_triggerSet
+#endif
</ins><span class="cx">                   &amp;&amp; m_isNone == o-&gt;m_isNone;
</span><span class="cx"> 
</span><span class="cx">     if (!result)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformanimationAnimationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/animation/Animation.h (181601 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/animation/Animation.h        2015-03-17 00:29:55 UTC (rev 181601)
+++ trunk/Source/WebCore/platform/animation/Animation.h        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -25,6 +25,9 @@
</span><span class="cx"> #ifndef Animation_h
</span><span class="cx"> #define Animation_h
</span><span class="cx"> 
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+#include &quot;AnimationTrigger.h&quot;
+#endif
</ins><span class="cx"> #include &quot;CSSPropertyNames.h&quot;
</span><span class="cx"> #include &quot;RenderStyleConstants.h&quot;
</span><span class="cx"> #include &quot;TimingFunction.h&quot;
</span><span class="lines">@@ -50,6 +53,9 @@
</span><span class="cx">     bool isPlayStateSet() const { return m_playStateSet; }
</span><span class="cx">     bool isPropertySet() const { return m_propertySet; }
</span><span class="cx">     bool isTimingFunctionSet() const { return m_timingFunctionSet; }
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    bool isTriggerSet() const { return m_triggerSet; }
+#endif
</ins><span class="cx"> 
</span><span class="cx">     // Flags this to be the special &quot;none&quot; animation (animation-name: none)
</span><span class="cx">     bool isNoneAnimation() const { return m_isNone; }
</span><span class="lines">@@ -61,7 +67,12 @@
</span><span class="cx">     {
</span><span class="cx">         return (!m_directionSet &amp;&amp; !m_durationSet &amp;&amp; !m_fillModeSet
</span><span class="cx">                 &amp;&amp; !m_nameSet &amp;&amp; !m_playStateSet &amp;&amp; !m_iterationCountSet
</span><del>-                &amp;&amp; !m_delaySet &amp;&amp; !m_timingFunctionSet &amp;&amp; !m_propertySet);
</del><ins>+                &amp;&amp; !m_delaySet &amp;&amp; !m_timingFunctionSet &amp;&amp; !m_propertySet
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+                &amp;&amp; !m_triggerSet);
+#else
+                );
+#endif
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     bool isEmptyOrZeroDuration() const
</span><span class="lines">@@ -78,6 +89,9 @@
</span><span class="cx">     void clearPlayState() { m_playStateSet = AnimPlayStatePlaying; }
</span><span class="cx">     void clearProperty() { m_propertySet = false; }
</span><span class="cx">     void clearTimingFunction() { m_timingFunctionSet = false; }
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    void clearTrigger() { m_triggerSet = false; }
+#endif
</ins><span class="cx"> 
</span><span class="cx">     void clearAll()
</span><span class="cx">     {
</span><span class="lines">@@ -90,6 +104,9 @@
</span><span class="cx">         clearPlayState();
</span><span class="cx">         clearProperty();
</span><span class="cx">         clearTimingFunction();
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+        clearTrigger();
+#endif
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     double delay() const { return m_delay; }
</span><span class="lines">@@ -118,8 +135,11 @@
</span><span class="cx">     const String&amp; name() const { return m_name; }
</span><span class="cx">     EAnimPlayState playState() const { return static_cast&lt;EAnimPlayState&gt;(m_playState); }
</span><span class="cx">     CSSPropertyID property() const { return m_property; }
</span><del>-    const PassRefPtr&lt;TimingFunction&gt; timingFunction() const { return m_timingFunction; }
</del><ins>+    PassRefPtr&lt;TimingFunction&gt; timingFunction() const { return m_timingFunction; }
</ins><span class="cx">     AnimationMode animationMode() const { return m_mode; }
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    PassRefPtr&lt;AnimationTrigger&gt; trigger() const { return m_trigger; }
+#endif
</ins><span class="cx"> 
</span><span class="cx">     void setDelay(double c) { m_delay = c; m_delaySet = true; }
</span><span class="cx">     void setDirection(AnimationDirection d) { m_direction = d; m_directionSet = true; }
</span><span class="lines">@@ -131,6 +151,9 @@
</span><span class="cx">     void setProperty(CSSPropertyID t) { m_property = t; m_propertySet = true; }
</span><span class="cx">     void setTimingFunction(PassRefPtr&lt;TimingFunction&gt; f) { m_timingFunction = f; m_timingFunctionSet = true; }
</span><span class="cx">     void setAnimationMode(AnimationMode mode) { m_mode = mode; }
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    void setTrigger(PassRefPtr&lt;AnimationTrigger&gt; t) { m_trigger = t; m_triggerSet = true; }
+#endif
</ins><span class="cx"> 
</span><span class="cx">     void setIsNoneAnimation(bool n) { m_isNone = n; }
</span><span class="cx"> 
</span><span class="lines">@@ -157,9 +180,13 @@
</span><span class="cx">     double m_delay;
</span><span class="cx">     double m_duration;
</span><span class="cx">     RefPtr&lt;TimingFunction&gt; m_timingFunction;
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    RefPtr&lt;AnimationTrigger&gt; m_trigger;
+#endif
</ins><span class="cx">     unsigned m_direction : 2; // AnimationDirection
</span><span class="cx">     unsigned m_fillMode : 2;
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx">     unsigned m_playState     : 2;
</span><span class="cx"> 
</span><span class="cx">     bool m_delaySet          : 1;
</span><span class="lines">@@ -171,7 +198,10 @@
</span><span class="cx">     bool m_playStateSet      : 1;
</span><span class="cx">     bool m_propertySet       : 1;
</span><span class="cx">     bool m_timingFunctionSet : 1;
</span><del>-    
</del><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    bool m_triggerSet        : 1;
+#endif
+
</ins><span class="cx">     bool m_isNone            : 1;
</span><span class="cx"> 
</span><span class="cx"> public:
</span><span class="lines">@@ -184,6 +214,9 @@
</span><span class="cx">     static EAnimPlayState initialPlayState() { return AnimPlayStatePlaying; }
</span><span class="cx">     static CSSPropertyID initialProperty() { return CSSPropertyInvalid; }
</span><span class="cx">     static const PassRefPtr&lt;TimingFunction&gt; initialTimingFunction() { return CubicBezierTimingFunction::create(); }
</span><ins>+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+    static const PassRefPtr&lt;AnimationTrigger&gt; initialTrigger() { return AutoAnimationTrigger::create(); }
+#endif
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformanimationAnimationTriggerh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/platform/animation/AnimationTrigger.h (0 => 181602)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/animation/AnimationTrigger.h                                (rev 0)
+++ trunk/Source/WebCore/platform/animation/AnimationTrigger.h        2015-03-17 00:33:00 UTC (rev 181602)
</span><span class="lines">@@ -0,0 +1,154 @@
</span><ins>+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AnimationTrigger_h
+#define AnimationTrigger_h
+
+#if ENABLE(CSS_ANIMATIONS_LEVEL_2)
+
+#include &quot;Length.h&quot;
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+class AnimationTrigger : public RefCounted&lt;AnimationTrigger&gt; {
+public:
+
+    virtual PassRefPtr&lt;AnimationTrigger&gt; clone() const = 0;
+
+    enum class AnimationTriggerType {
+        AutoAnimationTriggerType, ScrollAnimationTriggerType
+    };
+
+    virtual ~AnimationTrigger() { }
+
+    AnimationTriggerType type() const { return m_type; }
+
+    bool isAutoAnimationTrigger() const { return m_type == AnimationTriggerType::AutoAnimationTriggerType; }
+    bool isScrollAnimationTrigger() const { return m_type == AnimationTriggerType::ScrollAnimationTriggerType; }
+
+    virtual bool operator==(const AnimationTrigger&amp; other) = 0;
+
+protected:
+    AnimationTrigger(AnimationTriggerType type)
+        : m_type(type)
+    {
+    }
+
+    AnimationTriggerType m_type;
+};
+
+class AutoAnimationTrigger : public AnimationTrigger {
+public:
+    static PassRefPtr&lt;AutoAnimationTrigger&gt; create()
+    {
+        return adoptRef(new AutoAnimationTrigger);
+    }
+
+    virtual ~AutoAnimationTrigger() { }
+
+    virtual bool operator==(const AnimationTrigger&amp; other) override
+    {
+        return other.isAutoAnimationTrigger();
+    }
+
+private:
+    AutoAnimationTrigger()
+        : AnimationTrigger(AnimationTriggerType::AutoAnimationTriggerType)
+    {
+    }
+
+    virtual PassRefPtr&lt;AnimationTrigger&gt; clone() const override
+    {
+        return adoptRef(new AutoAnimationTrigger);
+    }
+};
+
+class ScrollAnimationTrigger : public AnimationTrigger {
+public:
+    static PassRefPtr&lt;ScrollAnimationTrigger&gt; create(Length startValue, Length endValue , bool hasEndValue = false)
+    {
+        return adoptRef(new ScrollAnimationTrigger(startValue, endValue, hasEndValue));
+    }
+
+    virtual ~ScrollAnimationTrigger() { }
+
+    virtual bool operator==(const AnimationTrigger&amp; other) override
+    {
+        if (!other.isScrollAnimationTrigger())
+            return false;
+
+        const ScrollAnimationTrigger* otherTrigger = static_cast&lt;const ScrollAnimationTrigger*&gt;(&amp;other);
+        return m_startValue == otherTrigger-&gt;m_startValue
+            &amp;&amp; m_endValue == otherTrigger-&gt;m_endValue
+            &amp;&amp; m_hasEndValue == otherTrigger-&gt;m_hasEndValue;
+    }
+
+    Length startValue() const { return m_startValue; }
+
+    void setStartValue(Length value)
+    {
+        m_startValue = value;
+    }
+
+    Length endValue() const { return m_endValue; }
+
+    void setEndValue(Length value)
+    {
+        m_endValue = value;
+    }
+
+    bool hasEndValue() const { return m_hasEndValue; }
+
+    void setHasEndValue(bool value)
+    {
+        m_hasEndValue = value;
+    }
+
+private:
+    explicit ScrollAnimationTrigger(Length startValue, Length endValue, bool hasEndValue)
+        : AnimationTrigger(AnimationTriggerType::ScrollAnimationTriggerType)
+        , m_startValue(startValue)
+        , m_endValue(endValue)
+        , m_hasEndValue(hasEndValue)
+    {
+    }
+
+    virtual PassRefPtr&lt;AnimationTrigger&gt; clone() const override
+    {
+        return adoptRef(new ScrollAnimationTrigger(m_startValue, m_endValue, m_hasEndValue));
+    }
+
+    Length m_startValue;
+    Length m_endValue;
+    bool m_hasEndValue;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // AnimationTrigger_h
</ins><span class="cx">Property changes on: trunk/Source/WebCore/platform/animation/AnimationTrigger.h
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
</div>

</body>
</html>