<!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>[176368] 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/176368">176368</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2014-11-19 16:59:09 -0800 (Wed, 19 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Handle unprefixed @keyframes rule
https://bugs.webkit.org/show_bug.cgi?id=138899
&lt;rdar://problem/18943117&gt;

Reviewed by Simon Fraser.

Source/WebCore:

Support the parsing of unprefixed @keyframes. In
CSSParser, assign the same token identifier to
the prefixed and unprefixed forms. This will
keep compatibility with older content. If a page
has both forms, then whatever comes last will
win (as it does if you had duplicate names of the same
form).

Tests: animations/unprefixed-keyframes-rule.html
       animations/unprefixed-keyframes.html

* css/CSSGrammar.y.in: Rename the WEBKIT_KEYFRAME_RULE_SYM symbol to
be KEYFRAME_RULE_SYM. Same with KEYFRAMES_SYM.
* css/CSSParser.cpp:
(WebCore::CSSParser::detectAtToken): Look for the @keyframes style
strings and assign the new token values.

LayoutTests:

Tests for @keyframes, both the OM side and the parsing.

* animations/unprefixed-keyframes-expected.txt: Added.
* animations/unprefixed-keyframes-rule-expected.txt: Added.
* animations/unprefixed-keyframes-rule.html: Added.
* animations/unprefixed-keyframes.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSGrammaryin">trunk/Source/WebCore/css/CSSGrammar.y.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsanimationsunprefixedkeyframesexpectedtxt">trunk/LayoutTests/animations/unprefixed-keyframes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsanimationsunprefixedkeyframesruleexpectedtxt">trunk/LayoutTests/animations/unprefixed-keyframes-rule-expected.txt</a></li>
<li><a href="#trunkLayoutTestsanimationsunprefixedkeyframesrulehtml">trunk/LayoutTests/animations/unprefixed-keyframes-rule.html</a></li>
<li><a href="#trunkLayoutTestsanimationsunprefixedkeyframeshtml">trunk/LayoutTests/animations/unprefixed-keyframes.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (176367 => 176368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-11-20 00:34:35 UTC (rev 176367)
+++ trunk/LayoutTests/ChangeLog        2014-11-20 00:59:09 UTC (rev 176368)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-11-19  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Handle unprefixed @keyframes rule
+        https://bugs.webkit.org/show_bug.cgi?id=138899
+        &lt;rdar://problem/18943117&gt;
+
+        Reviewed by Simon Fraser.
+
+        Tests for @keyframes, both the OM side and the parsing.
+
+        * animations/unprefixed-keyframes-expected.txt: Added.
+        * animations/unprefixed-keyframes-rule-expected.txt: Added.
+        * animations/unprefixed-keyframes-rule.html: Added.
+        * animations/unprefixed-keyframes.html: Added.
+
</ins><span class="cx"> 2014-11-19  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: JSContext inspection Resource search does not work
</span></span></pre></div>
<a id="trunkLayoutTestsanimationsunprefixedkeyframesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/unprefixed-keyframes-expected.txt (0 => 176368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/unprefixed-keyframes-expected.txt                                (rev 0)
+++ trunk/LayoutTests/animations/unprefixed-keyframes-expected.txt        2014-11-20 00:59:09 UTC (rev 176368)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+This test performs an animation of the left property. It should stop for 100ms at 100px and 200px We test for those values 50ms after it has stopped at each position.
+PASS - &quot;left&quot; property for &quot;box&quot; element at 0.3s saw something close to: 100
+PASS - &quot;left&quot; property for &quot;box&quot; element at 0.7s saw something close to: 200
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/unprefixed-keyframes-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="trunkLayoutTestsanimationsunprefixedkeyframesruleexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/unprefixed-keyframes-rule-expected.txt (0 => 176368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/unprefixed-keyframes-rule-expected.txt                                (rev 0)
+++ trunk/LayoutTests/animations/unprefixed-keyframes-rule-expected.txt        2014-11-20 00:59:09 UTC (rev 176368)
</span><span class="lines">@@ -0,0 +1,81 @@
</span><ins>+This tests unprefixed @keyframes parsing and the CSSKeyframeRule and CSSKeyframesRule interfaces.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS CSSKeyframeRule exists on Window object
+PASS CSSKeyframesRule exists on Window object
+PASS KEYFRAME_RULE exists on Window.CSSRule object
+PASS KEYFRAMES_RULE exists on Window.CSSRule object
+
+Check that the old values still work.
+PASS window.CSSRule.KEYFRAME_RULE is window.CSSRule.WEBKIT_KEYFRAME_RULE
+PASS window.CSSRule.KEYFRAMES_RULE is window.CSSRule.WEBKIT_KEYFRAMES_RULE
+
+PASS keyframes1.type is window.CSSRule.KEYFRAMES_RULE
+PASS keyframes1.name is 'test1'
+
+PASS rules1.length is 2
+PASS rules1.item(0).type is window.CSSRule.KEYFRAME_RULE
+PASS rules1.item(0).cssText is '0% { left: 10px; }'
+PASS rules1.item(1).cssText is '100% { left: 20px; }'
+
+Insert three new rules
+PASS rules1.length is 5
+PASS rules1.item(0).cssText is '0% { left: 10px; }'
+PASS rules1.item(1).cssText is '100% { left: 20px; }'
+PASS rules1.item(2).cssText is '30% { left: 30px; }'
+PASS rules1.item(3).cssText is '60% { left: 60px; }'
+PASS rules1.item(4).cssText is '20% { left: 50px; }'
+
+PASS keyframes2.type is window.CSSRule.KEYFRAMES_RULE
+PASS keyframes2.name is 'test2'
+
+PASS rules2.length is 3
+PASS rules2.item(0).type is window.CSSRule.KEYFRAME_RULE
+PASS rules2.item(0).keyText is '0%'
+PASS rules2.item(1).keyText is '50%'
+PASS rules2.item(2).keyText is '100%'
+PASS rules2.item(0).cssText is '0% { left: 10px; }'
+PASS rules2.item(1).cssText is '50% { left: 30px; }'
+PASS rules2.item(2).cssText is '100% { left: 20px; }'
+
+PASS rules2.item(0).style is an instance of CSSStyleDeclaration
+PASS rules2.item(0).style.length is 1
+
+Find a rule
+PASS rule.type is window.CSSRule.KEYFRAME_RULE
+PASS rule.cssText is '50% { left: 30px; }'
+
+Find a rule using from and to
+PASS keyframesFromTo.type is window.CSSRule.KEYFRAMES_RULE
+PASS rule.type is window.CSSRule.KEYFRAME_RULE
+PASS rule.cssText is '0% { left: 10px; }'
+PASS rule.type is window.CSSRule.KEYFRAME_RULE
+PASS rule.cssText is '100% { left: 20px; }'
+
+Try to find a rule that doesn't exist
+PASS Non-existent rule was not found
+
+Delete a rule
+PASS rules2.length is 2
+PASS rules2.item(0).type is window.CSSRule.KEYFRAME_RULE
+PASS rules2.item(0).keyText is '0%'
+PASS rules2.item(1).keyText is '100%'
+
+Delete a from rule
+PASS rulesFromTo.length is 2
+PASS rulesFromTo.item(0).type is window.CSSRule.KEYFRAME_RULE
+PASS rulesFromTo.item(0).keyText is '50%'
+PASS rulesFromTo.item(1).keyText is '100%'
+
+Delete a rule that doesn't exist
+PASS rules2.length is 2
+PASS rules2.item(0).type is window.CSSRule.KEYFRAME_RULE
+PASS rules2.item(0).keyText is '0%'
+PASS rules2.item(1).keyText is '100%'
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/unprefixed-keyframes-rule-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="trunkLayoutTestsanimationsunprefixedkeyframesrulehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/unprefixed-keyframes-rule.html (0 => 176368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/unprefixed-keyframes-rule.html                                (rev 0)
+++ trunk/LayoutTests/animations/unprefixed-keyframes-rule.html        2014-11-20 00:59:09 UTC (rev 176368)
</span><span class="lines">@@ -0,0 +1,175 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;style&gt;
+  @keyframes test1 {
+    from { left: 10px; }
+    to { left: 20px; }
+  }
+  @keyframes test2 {
+    0% { left: 10px; }
+    50% { left: 30px; }
+    100% { left: 20px; }
+  }
+  @keyframes test-from-to {
+    from { left: 10px; }
+    50% { left: 30px; }
+    to { left: 20px; }
+  }
+&lt;/style&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script&gt;
+
+description(&quot;This tests unprefixed @keyframes parsing and the CSSKeyframeRule and CSSKeyframesRule interfaces.&quot;);
+
+if (window.CSSKeyframeRule)
+    testPassed(&quot;CSSKeyframeRule exists on Window object&quot;);
+else
+    testFailed(&quot;CSSKeyframeRule does not exist on Window object&quot;);
+
+if (window.CSSKeyframesRule)
+    testPassed(&quot;CSSKeyframesRule exists on Window object&quot;);
+else
+    testFailed(&quot;CSSKeyframesRule does not exist on Window object&quot;);
+
+if (window.CSSRule.KEYFRAME_RULE)
+    testPassed(&quot;KEYFRAME_RULE exists on Window.CSSRule object&quot;);
+else
+    testFailed(&quot;KEYFRAME_RULE does not exist on Window.CSSRule object&quot;);
+
+if (window.CSSRule.KEYFRAMES_RULE)
+    testPassed(&quot;KEYFRAMES_RULE exists on Window.CSSRule object&quot;);
+else
+    testFailed(&quot;KEYFRAMES_RULE does not exist on Window.CSSRule object&quot;);
+
+debug(&quot;&quot;);
+
+debug(&quot;Check that the old values still work.&quot;);
+shouldBe(&quot;window.CSSRule.KEYFRAME_RULE&quot;, &quot;window.CSSRule.WEBKIT_KEYFRAME_RULE&quot;);
+shouldBe(&quot;window.CSSRule.KEYFRAMES_RULE&quot;, &quot;window.CSSRule.WEBKIT_KEYFRAMES_RULE&quot;);
+
+debug(&quot;&quot;)
+
+var keyframes1 = document.styleSheets.item(0).cssRules.item(0);
+
+shouldBe(&quot;keyframes1.type&quot;, &quot;window.CSSRule.KEYFRAMES_RULE&quot;);
+shouldBe(&quot;keyframes1.name&quot;, &quot;'test1'&quot;);
+
+debug(&quot;&quot;);
+
+var rules1 = keyframes1.cssRules;
+shouldBe(&quot;rules1.length&quot;, &quot;2&quot;);
+
+shouldBe(&quot;rules1.item(0).type&quot;, &quot;window.CSSRule.KEYFRAME_RULE&quot;);
+shouldBe(&quot;rules1.item(0).cssText&quot;, &quot;'0% { left: 10px; }'&quot;);
+shouldBe(&quot;rules1.item(1).cssText&quot;, &quot;'100% { left: 20px; }'&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Insert three new rules&quot;);
+keyframes1.insertRule(&quot;30% { left: 30px; }&quot;);
+keyframes1.insertRule(&quot;60% { left: 60px; }&quot;);
+keyframes1.insertRule(&quot;20% { left: 50px; }&quot;);
+shouldBe(&quot;rules1.length&quot;, &quot;5&quot;);
+
+shouldBe(&quot;rules1.item(0).cssText&quot;, &quot;'0% { left: 10px; }'&quot;);
+shouldBe(&quot;rules1.item(1).cssText&quot;, &quot;'100% { left: 20px; }'&quot;);
+shouldBe(&quot;rules1.item(2).cssText&quot;, &quot;'30% { left: 30px; }'&quot;);
+shouldBe(&quot;rules1.item(3).cssText&quot;, &quot;'60% { left: 60px; }'&quot;);
+shouldBe(&quot;rules1.item(4).cssText&quot;, &quot;'20% { left: 50px; }'&quot;);
+
+debug(&quot;&quot;);
+
+var keyframes2 = document.styleSheets.item(0).cssRules.item(1);
+
+shouldBe(&quot;keyframes2.type&quot;, &quot;window.CSSRule.KEYFRAMES_RULE&quot;);
+shouldBe(&quot;keyframes2.name&quot;, &quot;'test2'&quot;);
+
+var rules2 = keyframes2.cssRules;
+
+debug(&quot;&quot;);
+
+shouldBe(&quot;rules2.length&quot;, &quot;3&quot;);
+
+shouldBe(&quot;rules2.item(0).type&quot;, &quot;window.CSSRule.KEYFRAME_RULE&quot;);
+shouldBe(&quot;rules2.item(0).keyText&quot;, &quot;'0%'&quot;);
+shouldBe(&quot;rules2.item(1).keyText&quot;, &quot;'50%'&quot;);
+shouldBe(&quot;rules2.item(2).keyText&quot;, &quot;'100%'&quot;);
+
+shouldBe(&quot;rules2.item(0).cssText&quot;, &quot;'0% { left: 10px; }'&quot;);
+shouldBe(&quot;rules2.item(1).cssText&quot;, &quot;'50% { left: 30px; }'&quot;);
+shouldBe(&quot;rules2.item(2).cssText&quot;, &quot;'100% { left: 20px; }'&quot;);
+
+debug(&quot;&quot;);
+
+shouldBeType(&quot;rules2.item(0).style&quot;, &quot;CSSStyleDeclaration&quot;);
+shouldBe(&quot;rules2.item(0).style.length&quot;, &quot;1&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Find a rule&quot;);
+
+var rule = keyframes2.findRule(&quot;50%&quot;);
+
+if (!rule)
+  testFailed(&quot;Could not extract '50%' keyframe rule&quot;);
+
+shouldBe(&quot;rule.type&quot;, &quot;window.CSSRule.KEYFRAME_RULE&quot;);
+shouldBe(&quot;rule.cssText&quot;, &quot;'50% { left: 30px; }'&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Find a rule using from and to&quot;);
+
+var keyframesFromTo = document.styleSheets.item(0).cssRules.item(2);
+shouldBe(&quot;keyframesFromTo.type&quot;, &quot;window.CSSRule.KEYFRAMES_RULE&quot;);
+rule = keyframesFromTo.findRule(&quot;From&quot;);
+shouldBe(&quot;rule.type&quot;, &quot;window.CSSRule.KEYFRAME_RULE&quot;);
+shouldBe(&quot;rule.cssText&quot;, &quot;'0% { left: 10px; }'&quot;);
+
+rule = keyframesFromTo.findRule(&quot;TO&quot;);
+shouldBe(&quot;rule.type&quot;, &quot;window.CSSRule.KEYFRAME_RULE&quot;);
+shouldBe(&quot;rule.cssText&quot;, &quot;'100% { left: 20px; }'&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Try to find a rule that doesn't exist&quot;);
+
+rule = keyframes2.findRule(&quot;70%&quot;);
+
+if (rule)
+  testFailed(&quot;Was able to find the non-existent '70%' keyframe rule&quot;);
+else
+  testPassed(&quot;Non-existent rule was not found&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Delete a rule&quot;);
+
+keyframes2.deleteRule(&quot;50%&quot;);
+shouldBe(&quot;rules2.length&quot;, &quot;2&quot;);
+shouldBe(&quot;rules2.item(0).type&quot;, &quot;window.CSSRule.KEYFRAME_RULE&quot;);
+shouldBe(&quot;rules2.item(0).keyText&quot;, &quot;'0%'&quot;);
+shouldBe(&quot;rules2.item(1).keyText&quot;, &quot;'100%'&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Delete a from rule&quot;);
+keyframesFromTo.deleteRule(&quot;0%&quot;);
+var rulesFromTo = keyframesFromTo.cssRules;
+shouldBe(&quot;rulesFromTo.length&quot;, &quot;2&quot;);
+shouldBe(&quot;rulesFromTo.item(0).type&quot;, &quot;window.CSSRule.KEYFRAME_RULE&quot;);
+shouldBe(&quot;rulesFromTo.item(0).keyText&quot;, &quot;'50%'&quot;);
+shouldBe(&quot;rulesFromTo.item(1).keyText&quot;, &quot;'100%'&quot;);
+
+
+debug(&quot;&quot;);
+debug(&quot;Delete a rule that doesn't exist&quot;);
+
+keyframes2.deleteRule(&quot;70%&quot;);
+shouldBe(&quot;rules2.length&quot;, &quot;2&quot;);
+shouldBe(&quot;rules2.item(0).type&quot;, &quot;window.CSSRule.KEYFRAME_RULE&quot;);
+shouldBe(&quot;rules2.item(0).keyText&quot;, &quot;'0%'&quot;);
+shouldBe(&quot;rules2.item(1).keyText&quot;, &quot;'100%'&quot;);
+
+debug(&quot;&quot;);
+
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/unprefixed-keyframes-rule.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="trunkLayoutTestsanimationsunprefixedkeyframeshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/animations/unprefixed-keyframes.html (0 => 176368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/animations/unprefixed-keyframes.html                                (rev 0)
+++ trunk/LayoutTests/animations/unprefixed-keyframes.html        2014-11-20 00:59:09 UTC (rev 176368)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+  &lt;title&gt;Unprefixed keyframes test&lt;/title&gt;
+  &lt;style&gt;
+    #box {
+        position: absolute;
+        left: 0;
+        top: 100px;
+        height: 100px;
+        width: 100px;
+        background-color: blue;
+        animation-duration: 1s;
+        animation-timing-function: linear;
+        animation-name: anim;
+    }
+    @keyframes anim {
+        from { left: 50px; }
+        20%  { left: 100px; }
+        40%  { left: 100px; }
+        60%  { left: 200px; }
+        80%  { left: 200px; }
+        to   { left: 300px; }
+    }
+    &lt;/style&gt;
+    &lt;script src=&quot;resources/animation-test-helpers.js&quot; type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
+    &lt;script type=&quot;text/javascript&quot; charset=&quot;utf-8&quot;&gt;
+
+    var expectedValues = [
+      // [animation-name, time, element-id, property, expected-value, tolerance]
+      [&quot;anim&quot;, 0.3, &quot;box&quot;, &quot;left&quot;, 100, 1],
+      [&quot;anim&quot;, 0.7, &quot;box&quot;, &quot;left&quot;, 200, 1],
+    ];
+
+    runAnimationTest(expectedValues);
+
+  &lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test performs an animation of the left property. It should stop for 100ms at 100px and 200px
+We test for those values 50ms after it has stopped at each position.
+&lt;div id=&quot;box&quot;&gt;
+&lt;/div&gt;
+&lt;div id=&quot;result&quot;&gt;
+&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/animations/unprefixed-keyframes.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="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (176367 => 176368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-11-20 00:34:35 UTC (rev 176367)
+++ trunk/Source/WebCore/ChangeLog        2014-11-20 00:59:09 UTC (rev 176368)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-11-19  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Handle unprefixed @keyframes rule
+        https://bugs.webkit.org/show_bug.cgi?id=138899
+        &lt;rdar://problem/18943117&gt;
+
+        Reviewed by Simon Fraser.
+
+        Support the parsing of unprefixed @keyframes. In
+        CSSParser, assign the same token identifier to
+        the prefixed and unprefixed forms. This will
+        keep compatibility with older content. If a page
+        has both forms, then whatever comes last will
+        win (as it does if you had duplicate names of the same
+        form).
+
+        Tests: animations/unprefixed-keyframes-rule.html
+               animations/unprefixed-keyframes.html
+
+        * css/CSSGrammar.y.in: Rename the WEBKIT_KEYFRAME_RULE_SYM symbol to
+        be KEYFRAME_RULE_SYM. Same with KEYFRAMES_SYM.
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::detectAtToken): Look for the @keyframes style
+        strings and assign the new token values.
+
</ins><span class="cx"> 2014-11-19  Andreas Kling  &lt;akling@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Move pseudo-style code from RenderObject to RenderElement.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSGrammaryin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSGrammar.y.in (176367 => 176368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSGrammar.y.in        2014-11-20 00:34:35 UTC (rev 176367)
+++ trunk/Source/WebCore/css/CSSGrammar.y.in        2014-11-20 00:59:09 UTC (rev 176368)
</span><span class="lines">@@ -151,11 +151,11 @@
</span><span class="cx"> %token MEDIA_SYM
</span><span class="cx"> %token FONT_FACE_SYM
</span><span class="cx"> %token CHARSET_SYM
</span><ins>+%token KEYFRAME_RULE_SYM
+%token KEYFRAMES_SYM
</ins><span class="cx"> %token NAMESPACE_SYM
</span><span class="cx"> %token WEBKIT_RULE_SYM
</span><span class="cx"> %token WEBKIT_DECLS_SYM
</span><del>-%token WEBKIT_KEYFRAME_RULE_SYM
-%token WEBKIT_KEYFRAMES_SYM
</del><span class="cx"> %token WEBKIT_VALUE_SYM
</span><span class="cx"> %token WEBKIT_MEDIAQUERY_SYM
</span><span class="cx"> #if ENABLE_PICTURE_SIZES
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx"> 
</span><span class="cx"> webkit_rule: WEBKIT_RULE_SYM '{' maybe_space valid_rule maybe_space '}' { parser-&gt;m_rule = adoptRef($4); } ;
</span><span class="cx"> 
</span><del>-webkit_keyframe_rule: WEBKIT_KEYFRAME_RULE_SYM '{' maybe_space keyframe_rule maybe_space '}' { parser-&gt;m_keyframe = adoptRef($4); } ;
</del><ins>+webkit_keyframe_rule: KEYFRAME_RULE_SYM '{' maybe_space keyframe_rule maybe_space '}' { parser-&gt;m_keyframe = adoptRef($4); } ;
</ins><span class="cx"> 
</span><span class="cx"> webkit_decls: WEBKIT_DECLS_SYM '{' maybe_space_before_declaration declaration_list '}' ;
</span><span class="cx"> 
</span><span class="lines">@@ -803,7 +803,7 @@
</span><span class="cx">     ;
</span><span class="cx"> 
</span><span class="cx"> keyframes:
</span><del>-    before_keyframes_rule WEBKIT_KEYFRAMES_SYM maybe_space keyframe_name at_rule_header_end_maybe_space '{' at_rule_body_start maybe_space keyframes_rule closing_brace {
</del><ins>+    before_keyframes_rule KEYFRAMES_SYM maybe_space keyframe_name at_rule_header_end_maybe_space '{' at_rule_body_start maybe_space keyframes_rule closing_brace {
</ins><span class="cx">         $$ = parser-&gt;createKeyframesRule($4, std::unique_ptr&lt;Vector&lt;RefPtr&lt;StyleKeyframe&gt;&gt;&gt;($9)).leakRef();
</span><span class="cx">     }
</span><span class="cx">     ;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (176367 => 176368)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2014-11-20 00:34:35 UTC (rev 176367)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2014-11-20 00:59:09 UTC (rev 176368)
</span><span class="lines">@@ -10973,6 +10973,13 @@
</span><span class="cx">         }
</span><span class="cx">         return;
</span><span class="cx"> 
</span><ins>+    case 'k':
+        if (length == 10 &amp;&amp; isEqualToCSSIdentifier(name + 2, &quot;eyframes&quot;))
+            m_token = KEYFRAMES_SYM;
+        else if (length == 14 &amp;&amp; !hasEscape &amp;&amp; isEqualToCSSIdentifier(name + 2, &quot;eyframe-rule&quot;))
+            m_token = KEYFRAME_RULE_SYM;
+        return;
+
</ins><span class="cx">     case 'l':
</span><span class="cx">         if (hasEscape)
</span><span class="cx">             return;
</span><span class="lines">@@ -11103,7 +11110,7 @@
</span><span class="cx"> 
</span><span class="cx">         case 18:
</span><span class="cx">             if (isEqualToCSSIdentifier(name + 2, &quot;webkit-keyframes&quot;))
</span><del>-                m_token = WEBKIT_KEYFRAMES_SYM;
</del><ins>+                m_token = KEYFRAMES_SYM;
</ins><span class="cx"> #if ENABLE(PICTURE_SIZES)
</span><span class="cx">             else if (isEqualToCSSIdentifier(name + 2, &quot;webkit-sizesattr&quot;))
</span><span class="cx">                 m_token = WEBKIT_SIZESATTR_SYM;
</span><span class="lines">@@ -11119,7 +11126,7 @@
</span><span class="cx"> 
</span><span class="cx">         case 22:
</span><span class="cx">             if (!hasEscape &amp;&amp; isEqualToCSSIdentifier(name + 2, &quot;webkit-keyframe-rule&quot;))
</span><del>-                m_token = WEBKIT_KEYFRAME_RULE_SYM;
</del><ins>+                m_token = KEYFRAME_RULE_SYM;
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         case 27:
</span></span></pre>
</div>
</div>

</body>
</html>