Title: [176423] trunk
Revision
176423
Author
[email protected]
Date
2014-11-20 15:26:29 -0800 (Thu, 20 Nov 2014)

Log Message

Support unprefixed animation event types
https://bugs.webkit.org/show_bug.cgi?id=138931
<rdar://problem/18943167>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: animations/unprefixed-events-mixed-with-prefixed.html
       animations/unprefixed-events.html

Support the unprefixed animation event names:
- animationstart (was webkitAnimationStart)
- animationiteration (was webkitAnimationIteration)
- animationend (was webkitAnimationEnd)

(Yes, event types are case sensitive and yes, this will
likely cause some head-scratching as people change content)

The approach here is to follow what transitions does:
- listener only for old event name -> fire old event name
- listener for both old and new event name -> fire new event name
- listener only for new event name -> fire new event name

That way pages that were trying to anticipate the new event name
won't get duplicate events.

* CMakeLists.txt: Add new AnimationEvent* stuff.
* DerivedSources.make: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* bindings/js/JSBindingsAllInOne.cpp: New files for all in one builds.
* dom/DOMAllInOne.cpp:

* dom/AnimationEvent.cpp: Added. Copied from WebKitAnimationEvent.cpp.
(WebCore::AnimationEventInit::AnimationEventInit):
(WebCore::AnimationEvent::AnimationEvent):
(WebCore::AnimationEvent::~AnimationEvent):
(WebCore::AnimationEvent::animationName):
(WebCore::AnimationEvent::elapsedTime):
(WebCore::AnimationEvent::eventInterface):
* dom/AnimationEvent.h: Added. Copied from WebKitAnimationEvent.h.
* dom/AnimationEvent.idl: Added. Copied from WebKitAnimationEvent.idl.

* dom/Document.cpp:
(WebCore::Document::addListenerTypeIfNeeded): Handle new event types.

* dom/EventNames.h: New names.
* dom/EventNames.in:

* dom/EventTarget.cpp:
(WebCore::legacyType): Provide a mapping from the new names to the older
prefixed forms.

* html/HTMLAttributeNames.in: Support the on* attributes, even though I
hate them and wish this approach would die.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):

* page/DOMWindow.h: New names, and constructors.
* page/DOMWindow.idl:

* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): Fire new type.

* page/animation/KeyframeAnimation.cpp: Fire the new types of events.
(WebCore::KeyframeAnimation::onAnimationStart):
(WebCore::KeyframeAnimation::onAnimationIteration):
(WebCore::KeyframeAnimation::onAnimationEnd):
(WebCore::KeyframeAnimation::sendAnimationEvent):

LayoutTests:

Add a test for unprefixed animation event names, as well
as a test that ensures we don't get multiple dispatches if
we're still listening for the old events.

And for the older tests, just add the new things from the
window namespace.

* animations/unprefixed-events-expected.txt: Added.
* animations/unprefixed-events-mixed-with-prefixed-expected.txt: Added.
* animations/unprefixed-events-mixed-with-prefixed.html: Added.
* animations/unprefixed-events.html: Added.

* fast/events/event-creation-expected.txt:
* fast/events/event-creation.html:
* js/dom/constructor-length.html:
* js/dom/global-constructors-attributes-expected.txt:
* platform/efl/js/dom/constructor-length-expected.txt:
* platform/efl/js/dom/global-constructors-attributes-expected.txt:
* platform/gtk/js/dom/constructor-length-expected.txt:
* platform/gtk/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/constructor-length-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:
* platform/win/js/dom/global-constructors-attributes-expected.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (176422 => 176423)


--- trunk/LayoutTests/ChangeLog	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/ChangeLog	2014-11-20 23:26:29 UTC (rev 176423)
@@ -1,3 +1,38 @@
+2014-11-20  Dean Jackson  <[email protected]>
+
+        Support unprefixed animation event types
+        https://bugs.webkit.org/show_bug.cgi?id=138931
+        <rdar://problem/18943167>
+
+        Reviewed by Simon Fraser.
+
+        Add a test for unprefixed animation event names, as well
+        as a test that ensures we don't get multiple dispatches if
+        we're still listening for the old events.
+
+        And for the older tests, just add the new things from the
+        window namespace.
+
+        * animations/unprefixed-events-expected.txt: Added.
+        * animations/unprefixed-events-mixed-with-prefixed-expected.txt: Added.
+        * animations/unprefixed-events-mixed-with-prefixed.html: Added.
+        * animations/unprefixed-events.html: Added.
+
+        * fast/events/event-creation-expected.txt:
+        * fast/events/event-creation.html:
+        * js/dom/constructor-length.html:
+        * js/dom/global-constructors-attributes-expected.txt:
+        * platform/efl/js/dom/constructor-length-expected.txt:
+        * platform/efl/js/dom/global-constructors-attributes-expected.txt:
+        * platform/gtk/js/dom/constructor-length-expected.txt:
+        * platform/gtk/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt:
+        * platform/mac/js/dom/constructor-length-expected.txt:
+        * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+        * platform/win/js/dom/global-constructors-attributes-expected.txt:
+
+
 2014-11-20  Daniel Bates  <[email protected]>
 
         [iOS] Update TestExpectation file for LayoutTests/canvas tests

Added: trunk/LayoutTests/animations/unprefixed-events-expected.txt (0 => 176423)


--- trunk/LayoutTests/animations/unprefixed-events-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/animations/unprefixed-events-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -0,0 +1,5 @@
+This test performs two iterations of an animation. The animation should fire all three events (start, iteration, end).
+animationstart: move
+animationiteration: move
+animationend: move
+
Property changes on: trunk/LayoutTests/animations/unprefixed-events-expected.txt
___________________________________________________________________

Added: svn:mime-type

Added: svn:keywords

Added: svn:eol-style

Added: trunk/LayoutTests/animations/unprefixed-events-mixed-with-prefixed-expected.txt (0 => 176423)


--- trunk/LayoutTests/animations/unprefixed-events-mixed-with-prefixed-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/animations/unprefixed-events-mixed-with-prefixed-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -0,0 +1,5 @@
+This test performs two iterations of an animation. The animation should fire all three events (start, iteration, end).
+animationstart: move
+animationiteration: move
+animationend: move
+
Property changes on: trunk/LayoutTests/animations/unprefixed-events-mixed-with-prefixed-expected.txt
___________________________________________________________________

Added: svn:mime-type

Added: svn:keywords

Added: svn:eol-style

Added: trunk/LayoutTests/animations/unprefixed-events-mixed-with-prefixed.html (0 => 176423)


--- trunk/LayoutTests/animations/unprefixed-events-mixed-with-prefixed.html	                        (rev 0)
+++ trunk/LayoutTests/animations/unprefixed-events-mixed-with-prefixed.html	2014-11-20 23:26:29 UTC (rev 176423)
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Test mixing prefixed and unprefixed events</title>
+  <style>
+    #box {
+        position: absolute;
+        left: 0;
+        top: 200px;
+        height: 100px;
+        width: 100px;
+        background-color: blue;
+        animation-duration: 100ms;
+        animation-iteration-count: 2;
+    }
+    @keyframes move {
+        from { left: 0px; }
+        to   { left: 100px; }
+    }
+    </style>
+    <script>
+
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+var results;
+
+function dump(msg) {
+    results.innerHTML += msg + "<br/>";
+}
+
+function handleEvent(event) {
+    dump(event.type + ": " + event.animationName);
+    if (event.type == "animationend" && window.testRunner)
+        testRunner.notifyDone();
+}
+
+function handlePrefixedEvent(event) {
+    dump("FAIL -- " + event.type + ": " + event.animationName);
+}
+
+function init() {
+    results = document.getElementById("results");
+    var box = document.getElementById("box");
+    box.addEventListener("animationstart", handleEvent, false);
+    box.addEventListener("animationiteration", handleEvent, false);
+    box.addEventListener("animationend", handleEvent, false);
+    box.addEventListener("webkitAnimationStart", handlePrefixedEvent, false);
+    box.addEventListener("webkitAnimationIteration", handlePrefixedEvent, false);
+    box.addEventListener("webkitAnimationEnd", handlePrefixedEvent, false);
+    box.style.animationName = "move";
+}
+
+window.addEventListener("load", init, false);
+
+  </script>
+</head>
+<body>
+This test performs two iterations of an animation. The animation should fire all three events (start, iteration, end).
+<div id="box">
+</div>
+<div id="results">
+</div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/animations/unprefixed-events-mixed-with-prefixed.html
___________________________________________________________________

Added: svn:mime-type

Added: svn:keywords

Added: svn:eol-style

Added: trunk/LayoutTests/animations/unprefixed-events.html (0 => 176423)


--- trunk/LayoutTests/animations/unprefixed-events.html	                        (rev 0)
+++ trunk/LayoutTests/animations/unprefixed-events.html	2014-11-20 23:26:29 UTC (rev 176423)
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Unprefixed animation events test</title>
+  <style>
+    #box {
+        position: absolute;
+        left: 0;
+        top: 200px;
+        height: 100px;
+        width: 100px;
+        background-color: blue;
+        animation-duration: 100ms;
+        animation-iteration-count: 2;
+    }
+    @keyframes move {
+        from { left: 0px; }
+        to   { left: 100px; }
+    }
+    </style>
+    <script>
+
+if (window.testRunner) {
+    testRunner.dumpAsText();
+    testRunner.waitUntilDone();
+}
+
+var results;
+
+function dump(msg) {
+    results.innerHTML += msg + "<br/>";
+}
+
+function handleEvent(event) {
+    dump(event.type + ": " + event.animationName);
+    if (event.type == "animationend" && window.testRunner)
+        testRunner.notifyDone();
+}
+
+function init() {
+    results = document.getElementById("results");
+    var box = document.getElementById("box");
+    box.addEventListener("animationstart", handleEvent, false);
+    box.addEventListener("animationiteration", handleEvent, false);
+    box.addEventListener("animationend", handleEvent, false);
+    box.style.animationName = "move";
+}
+
+window.addEventListener("load", init, false);
+
+  </script>
+</head>
+<body>
+This test performs two iterations of an animation. The animation should fire all three events (start, iteration, end).
+<div id="box">
+</div>
+<div id="results">
+</div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/animations/unprefixed-events.html
___________________________________________________________________

Added: svn:mime-type

Added: svn:keywords

Added: svn:eol-style

Modified: trunk/LayoutTests/fast/events/event-creation-expected.txt (176422 => 176423)


--- trunk/LayoutTests/fast/events/event-creation-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/fast/events/event-creation-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -9,6 +9,9 @@
 PASS document.createEvent('Events').constructor === window.Event is true
 PASS document.createEvent('HTMLEvents') instanceof window.Event is true
 PASS document.createEvent('HTMLEvents').constructor === window.Event is true
+PASS document.createEvent('AnimationEvent') instanceof window.AnimationEvent is true
+PASS document.createEvent('AnimationEvent') instanceof window.Event is true
+PASS document.createEvent('AnimationEvent').constructor === window.AnimationEvent is true
 PASS document.createEvent('BeforeLoadEvent') instanceof window.BeforeLoadEvent is true
 PASS document.createEvent('BeforeLoadEvent') instanceof window.Event is true
 PASS document.createEvent('BeforeLoadEvent').constructor === window.BeforeLoadEvent is true

Modified: trunk/LayoutTests/fast/events/event-creation.html (176422 => 176423)


--- trunk/LayoutTests/fast/events/event-creation.html	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/fast/events/event-creation.html	2014-11-20 23:26:29 UTC (rev 176423)
@@ -17,6 +17,11 @@
     shouldBeTrue("document.createEvent('HTMLEvents') instanceof window.Event");
     shouldBeTrue("document.createEvent('HTMLEvents').constructor === window.Event");
 
+    // AnimationEvent
+    shouldBeTrue("document.createEvent('AnimationEvent') instanceof window.AnimationEvent");
+    shouldBeTrue("document.createEvent('AnimationEvent') instanceof window.Event");
+    shouldBeTrue("document.createEvent('AnimationEvent').constructor === window.AnimationEvent");
+
     // BeforeLoadEvent
     shouldBeTrue("document.createEvent('BeforeLoadEvent') instanceof window.BeforeLoadEvent");
     shouldBeTrue("document.createEvent('BeforeLoadEvent') instanceof window.Event");

Modified: trunk/LayoutTests/js/dom/constructor-length.html (176422 => 176423)


--- trunk/LayoutTests/js/dom/constructor-length.html	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/js/dom/constructor-length.html	2014-11-20 23:26:29 UTC (rev 176423)
@@ -10,6 +10,7 @@
 shouldBe('ArrayBuffer.length', '1');
 shouldBe('AudioContext.length', '0');
 shouldBe('AutocompleteErrorEvent.length', '1');
+shouldBe('AnimationEvent.length', '1');
 shouldBe('BeforeLoadEvent.length', '1');
 shouldBe('Blob.length', '0');
 shouldBe('CloseEvent.length', '1');

Modified: trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt (176422 => 176423)


--- trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -8,6 +8,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').value is AnimationEvent
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').value is Attr
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/efl/js/dom/constructor-length-expected.txt (176422 => 176423)


--- trunk/LayoutTests/platform/efl/js/dom/constructor-length-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/platform/efl/js/dom/constructor-length-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -6,6 +6,7 @@
 PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
 FAIL AutocompleteErrorEvent.length should be 1. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
+PASS AnimationEvent.length is 1
 PASS BeforeLoadEvent.length is 1
 PASS Blob.length is 0
 PASS CloseEvent.length is 1

Modified: trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt (176422 => 176423)


--- trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/platform/efl/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -8,6 +8,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').value is AnimationEvent
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').value is Attr
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/gtk/js/dom/constructor-length-expected.txt (176422 => 176423)


--- trunk/LayoutTests/platform/gtk/js/dom/constructor-length-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/platform/gtk/js/dom/constructor-length-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -6,6 +6,7 @@
 PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
 FAIL AutocompleteErrorEvent.length should be 1. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
+PASS AnimationEvent.length is 1
 PASS BeforeLoadEvent.length is 1
 PASS Blob.length is 0
 PASS CloseEvent.length is 1

Modified: trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt (176422 => 176423)


--- trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/platform/gtk/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -8,6 +8,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').value is AnimationEvent
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').value is Attr
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt (176422 => 176423)


--- trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/platform/mac/js/dom/constructor-length-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -6,6 +6,7 @@
 PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
 FAIL AutocompleteErrorEvent.length should be 1. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
+PASS AnimationEvent.length is 1
 PASS BeforeLoadEvent.length is 1
 PASS Blob.length is 0
 PASS CloseEvent.length is 1

Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (176422 => 176423)


--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -8,6 +8,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').value is AnimationEvent
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').value is Attr
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt (176422 => 176423)


--- trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -8,6 +8,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').value is AnimationEvent
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').value is Attr
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt (176422 => 176423)


--- trunk/LayoutTests/platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -8,6 +8,11 @@
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').hasOwnProperty('set') is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').enumerable is false
 PASS Object.getOwnPropertyDescriptor(global, 'AnalyserNode').configurable is true
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').value is AnimationEvent
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').value is Attr
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('set') is false

Modified: trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt (176422 => 176423)


--- trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/LayoutTests/platform/win/js/dom/global-constructors-attributes-expected.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -3,6 +3,11 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').value is AnimationEvent
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('get') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').hasOwnProperty('set') is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').enumerable is false
+PASS Object.getOwnPropertyDescriptor(global, 'AnimationEvent').configurable is true
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').value is Attr
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('get') is false
 PASS Object.getOwnPropertyDescriptor(global, 'Attr').hasOwnProperty('set') is false

Modified: trunk/Source/WebCore/CMakeLists.txt (176422 => 176423)


--- trunk/Source/WebCore/CMakeLists.txt	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/CMakeLists.txt	2014-11-20 23:26:29 UTC (rev 176423)
@@ -357,6 +357,7 @@
     css/WebKitCSSTransformValue.idl
     css/WebKitCSSViewportRule.idl
 
+    dom/AnimationEvent.idl
     dom/Attr.idl
     dom/BeforeLoadEvent.idl
     dom/BeforeUnloadEvent.idl
@@ -1298,6 +1299,7 @@
     cssjit/SelectorCompiler.cpp
 
     dom/ActiveDOMObject.cpp
+    dom/AnimationEvent.cpp
     dom/Attr.cpp
     dom/BeforeTextInsertedEvent.cpp
     dom/BeforeUnloadEvent.cpp

Modified: trunk/Source/WebCore/ChangeLog (176422 => 176423)


--- trunk/Source/WebCore/ChangeLog	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/ChangeLog	2014-11-20 23:26:29 UTC (rev 176423)
@@ -1,3 +1,76 @@
+2014-11-20  Dean Jackson  <[email protected]>
+
+        Support unprefixed animation event types
+        https://bugs.webkit.org/show_bug.cgi?id=138931
+        <rdar://problem/18943167>
+
+        Reviewed by Simon Fraser.
+
+        Tests: animations/unprefixed-events-mixed-with-prefixed.html
+               animations/unprefixed-events.html
+
+        Support the unprefixed animation event names:
+        - animationstart (was webkitAnimationStart)
+        - animationiteration (was webkitAnimationIteration)
+        - animationend (was webkitAnimationEnd)
+
+        (Yes, event types are case sensitive and yes, this will
+        likely cause some head-scratching as people change content)
+
+        The approach here is to follow what transitions does:
+        - listener only for old event name -> fire old event name
+        - listener for both old and new event name -> fire new event name
+        - listener only for new event name -> fire new event name
+
+        That way pages that were trying to anticipate the new event name
+        won't get duplicate events.
+
+        * CMakeLists.txt: Add new AnimationEvent* stuff.
+        * DerivedSources.make: Ditto.
+        * WebCore.vcxproj/WebCore.vcxproj: Ditto.
+        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+
+        * bindings/js/JSBindingsAllInOne.cpp: New files for all in one builds.
+        * dom/DOMAllInOne.cpp:
+
+        * dom/AnimationEvent.cpp: Added. Copied from WebKitAnimationEvent.cpp.
+        (WebCore::AnimationEventInit::AnimationEventInit):
+        (WebCore::AnimationEvent::AnimationEvent):
+        (WebCore::AnimationEvent::~AnimationEvent):
+        (WebCore::AnimationEvent::animationName):
+        (WebCore::AnimationEvent::elapsedTime):
+        (WebCore::AnimationEvent::eventInterface):
+        * dom/AnimationEvent.h: Added. Copied from WebKitAnimationEvent.h.
+        * dom/AnimationEvent.idl: Added. Copied from WebKitAnimationEvent.idl.
+
+        * dom/Document.cpp:
+        (WebCore::Document::addListenerTypeIfNeeded): Handle new event types.
+
+        * dom/EventNames.h: New names.
+        * dom/EventNames.in:
+
+        * dom/EventTarget.cpp:
+        (WebCore::legacyType): Provide a mapping from the new names to the older
+        prefixed forms.
+
+        * html/HTMLAttributeNames.in: Support the on* attributes, even though I
+        hate them and wish this approach would die.
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::populateEventNameForAttributeLocalNameMap):
+
+        * page/DOMWindow.h: New names, and constructors.
+        * page/DOMWindow.idl:
+
+        * page/animation/AnimationController.cpp:
+        (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): Fire new type.
+
+        * page/animation/KeyframeAnimation.cpp: Fire the new types of events.
+        (WebCore::KeyframeAnimation::onAnimationStart):
+        (WebCore::KeyframeAnimation::onAnimationIteration):
+        (WebCore::KeyframeAnimation::onAnimationEnd):
+        (WebCore::KeyframeAnimation::sendAnimationEvent):
+
 2014-11-20  Tim Horton  <[email protected]>
 
         Remove a piece of DataDetectors SPI that we aren't using anymore

Modified: trunk/Source/WebCore/DerivedSources.cpp (176422 => 176423)


--- trunk/Source/WebCore/DerivedSources.cpp	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/DerivedSources.cpp	2014-11-20 23:26:29 UTC (rev 176423)
@@ -31,6 +31,7 @@
 #include "JSANGLEInstancedArrays.cpp"
 #endif
 #include "JSAbstractWorker.cpp"
+#include "JSAnimationEvent.cpp"
 #include "JSAttr.cpp"
 #include "JSBarProp.cpp"
 #include "JSBeforeLoadEvent.cpp"

Modified: trunk/Source/WebCore/DerivedSources.make (176422 => 176423)


--- trunk/Source/WebCore/DerivedSources.make	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/DerivedSources.make	2014-11-20 23:26:29 UTC (rev 176423)
@@ -249,6 +249,7 @@
     $(WebCore)/css/WebKitCSSRegionRule.idl \
     $(WebCore)/css/WebKitCSSTransformValue.idl \
     $(WebCore)/css/WebKitCSSViewportRule.idl \
+    $(WebCore)/dom/AnimationEvent.idl \
     $(WebCore)/dom/Attr.idl \
     $(WebCore)/dom/AutocompleteErrorEvent.idl \
     $(WebCore)/dom/BeforeLoadEvent.idl \

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (176422 => 176423)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2014-11-20 23:26:29 UTC (rev 176423)
@@ -818,6 +818,20 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSAnimationEvent.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSAttr.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -12467,6 +12481,20 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
+    <ClCompile Include="..\dom\AnimationEvent.cpp">
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+    </ClCompile>
     <ClCompile Include="..\dom\Attr.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
@@ -18289,6 +18317,7 @@
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\HTMLNames.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\InspectorOverlayPage.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSAbstractWorker.h" />
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSAnimationEvent.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSAttr.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSBarProp.h" />
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSBeforeLoadEvent.h" />
@@ -20450,6 +20479,7 @@
     <ClInclude Include="..\xml\parser\XMLDocumentParser.h" />
     <ClInclude Include="..\xml\parser\XMLDocumentParserScope.h" />
     <ClInclude Include="..\dom\ActiveDOMObject.h" />
+    <ClInclude Include="..\dom\AnimationEvent.h" />
     <ClInclude Include="..\dom\Attr.h" />
     <ClInclude Include="..\dom\Attribute.h" />
     <ClInclude Include="..\dom\BeforeLoadEvent.h" />

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (176422 => 176423)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2014-11-20 23:26:29 UTC (rev 176423)
@@ -3057,6 +3057,9 @@
     <ClCompile Include="..\dom\ActiveDOMObject.cpp">
       <Filter>dom</Filter>
     </ClCompile>
+    <ClCompile Include="..\dom\AnimationEvent.cpp">
+      <Filter>dom</Filter>
+    </ClCompile>
     <ClCompile Include="..\dom\Attr.cpp">
       <Filter>dom</Filter>
     </ClCompile>
@@ -5212,6 +5215,9 @@
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSAbstractWorker.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
+    <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSAnimationEvent.cpp">
+      <Filter>DerivedSources</Filter>
+    </ClCompile>
     <ClCompile Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSAttr.cpp">
       <Filter>DerivedSources</Filter>
     </ClCompile>
@@ -10113,6 +10119,9 @@
     <ClInclude Include="..\dom\ActiveDOMObject.h">
       <Filter>dom</Filter>
     </ClInclude>
+    <ClInclude Include="..\dom\AnimationEvent.h">
+      <Filter>dom</Filter>
+    </ClInclude>
     <ClInclude Include="..\dom\Attr.h">
       <Filter>dom</Filter>
     </ClInclude>
@@ -13133,6 +13142,9 @@
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\WebCore\DerivedSources\JSAbstractWorker.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>
+    <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSAnimationEvent.h">
+      <Filter>DerivedSources</Filter>
+    </ClInclude>
     <ClInclude Include="$(ConfigurationBuildDir)\obj$(PlatformArchitecture)\$(ProjectName)\DerivedSources\JSAttr.h">
       <Filter>DerivedSources</Filter>
     </ClInclude>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (176422 => 176423)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2014-11-20 23:26:29 UTC (rev 176423)
@@ -1266,6 +1266,13 @@
 		31741AAD16636609008A5B7E /* SimulatedClickOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 31741AAB16635E45008A5B7E /* SimulatedClickOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		31955A86160D199000858025 /* RenderSnapshottedPlugIn.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31E8D8BA160BC94B004CE8F5 /* RenderSnapshottedPlugIn.cpp */; };
 		31955A88160D199200858025 /* RenderSnapshottedPlugIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 31E8D8BB160BC94C004CE8F5 /* RenderSnapshottedPlugIn.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		319848011A1D817B00A13318 /* AnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 319847FF1A1D816700A13318 /* AnimationEvent.h */; };
+		319848021A1D818100A13318 /* AnimationEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 319847FE1A1D816700A13318 /* AnimationEvent.cpp */; };
+		319848081A1E6CB500A13318 /* DOMAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 319848051A1E6C5F00A13318 /* DOMAnimationEvent.h */; };
+		319848091A1E6CBF00A13318 /* DOMAnimationEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 319848061A1E6C5F00A13318 /* DOMAnimationEvent.mm */; };
+		3198480A1A1E6CC700A13318 /* DOMAnimationEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 319848071A1E6C5F00A13318 /* DOMAnimationEventInternal.h */; };
+		3198480B1A1E6CE400A13318 /* JSAnimationEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 319848031A1E6B5D00A13318 /* JSAnimationEvent.cpp */; };
+		3198480C1A1E6CE800A13318 /* JSAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 319848041A1E6B5D00A13318 /* JSAnimationEvent.h */; };
 		319AE063142D6B24006563A1 /* StyleFilterData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 319AE061142D6B24006563A1 /* StyleFilterData.cpp */; };
 		319AE064142D6B24006563A1 /* StyleFilterData.h in Headers */ = {isa = PBXBuildFile; fileRef = 319AE062142D6B24006563A1 /* StyleFilterData.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		319FBD5F15D2F464009640A6 /* CachedImageClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 319FBD5D15D2F444009640A6 /* CachedImageClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8293,6 +8300,14 @@
 		316FE1100E6E1DA700BF6088 /* KeyframeAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyframeAnimation.h; path = animation/KeyframeAnimation.h; sourceTree = "<group>"; };
 		31741AAB16635E45008A5B7E /* SimulatedClickOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SimulatedClickOptions.h; sourceTree = "<group>"; };
 		3189E6DB16B2103500386EA3 /* plugIns.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = plugIns.css; sourceTree = "<group>"; };
+		319847FE1A1D816700A13318 /* AnimationEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationEvent.cpp; sourceTree = "<group>"; };
+		319847FF1A1D816700A13318 /* AnimationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationEvent.h; sourceTree = "<group>"; };
+		319848001A1D816700A13318 /* AnimationEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AnimationEvent.idl; sourceTree = "<group>"; };
+		319848031A1E6B5D00A13318 /* JSAnimationEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAnimationEvent.cpp; sourceTree = "<group>"; };
+		319848041A1E6B5D00A13318 /* JSAnimationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAnimationEvent.h; sourceTree = "<group>"; };
+		319848051A1E6C5F00A13318 /* DOMAnimationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMAnimationEvent.h; sourceTree = "<group>"; };
+		319848061A1E6C5F00A13318 /* DOMAnimationEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMAnimationEvent.mm; sourceTree = "<group>"; };
+		319848071A1E6C5F00A13318 /* DOMAnimationEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMAnimationEventInternal.h; sourceTree = "<group>"; };
 		319AE061142D6B24006563A1 /* StyleFilterData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleFilterData.cpp; path = style/StyleFilterData.cpp; sourceTree = "<group>"; };
 		319AE062142D6B24006563A1 /* StyleFilterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleFilterData.h; path = style/StyleFilterData.h; sourceTree = "<group>"; };
 		319FBD5D15D2F444009640A6 /* CachedImageClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedImageClient.h; sourceTree = "<group>"; };
@@ -16995,6 +17010,9 @@
 		85AFA7AB0AAF3BB000E84305 /* Events */ = {
 			isa = PBXGroup;
 			children = (
+				319848051A1E6C5F00A13318 /* DOMAnimationEvent.h */,
+				319848061A1E6C5F00A13318 /* DOMAnimationEvent.mm */,
+				319848071A1E6C5F00A13318 /* DOMAnimationEventInternal.h */,
 				76FB9FE819A7284B00420562 /* DOMAutocompleteErrorEvent.h */,
 				76FB9FE919A7284B00420562 /* DOMAutocompleteErrorEvent.mm */,
 				76FB9FEA19A7284B00420562 /* DOMAutocompleteErrorEventInternal.h */,
@@ -19419,6 +19437,8 @@
 		A83B79120CCB003F000B0825 /* Events */ = {
 			isa = PBXGroup;
 			children = (
+				319848031A1E6B5D00A13318 /* JSAnimationEvent.cpp */,
+				319848041A1E6B5D00A13318 /* JSAnimationEvent.h */,
 				76FB9FF619A73E3A00420562 /* JSAutocompleteErrorEvent.cpp */,
 				76FB9FF719A73E3A00420562 /* JSAutocompleteErrorEvent.h */,
 				BC946345107A934B00857193 /* JSBeforeLoadEvent.cpp */,
@@ -22561,6 +22581,9 @@
 		F523D32402DE4478018635CA /* dom */ = {
 			isa = PBXGroup;
 			children = (
+				319847FE1A1D816700A13318 /* AnimationEvent.cpp */,
+				319847FF1A1D816700A13318 /* AnimationEvent.h */,
+				319848001A1D816700A13318 /* AnimationEvent.idl */,
 				CE2616A4187E65C1007955F3 /* ios */,
 				E1C4DE6D0EA75C650023CCD6 /* ActiveDOMObject.cpp */,
 				E1C4DE680EA75C1E0023CCD6 /* ActiveDOMObject.h */,
@@ -23933,6 +23956,7 @@
 				44311CD712E4E22D000A8D19 /* DOMDocumentPrivate.h in Headers */,
 				85CA975C0A962E5400690CCF /* DOMDocumentType.h in Headers */,
 				85E711960AC5D5350053270F /* DOMDocumentTypeInternal.h in Headers */,
+				319848011A1D817B00A13318 /* AnimationEvent.h in Headers */,
 				8518DCE90A9CC80D0091B7A6 /* DOMDOMImplementation.h in Headers */,
 				85E711970AC5D5350053270F /* DOMDOMImplementationInternal.h in Headers */,
 				52CCA9E815E3F64C0053C77F /* DOMDOMNamedFlowCollection.h in Headers */,
@@ -23967,6 +23991,7 @@
 				0F54DCE01880F901003EEDBB /* DOMGestureEvent.h in Headers */,
 				0F54DCE21880F901003EEDBB /* DOMGestureEventInternal.h in Headers */,
 				BC1A37B6097C715F0019F3D8 /* DOMHTML.h in Headers */,
+				319848081A1E6CB500A13318 /* DOMAnimationEvent.h in Headers */,
 				85DF81270AA7787200486AD7 /* DOMHTMLAnchorElement.h in Headers */,
 				85E7119B0AC5D5350053270F /* DOMHTMLAnchorElementInternal.h in Headers */,
 				854075690AD6CBF900620C57 /* DOMHTMLAppletElement.h in Headers */,
@@ -25360,6 +25385,7 @@
 				9728C3141268E4390041E89B /* MarkupAccumulator.h in Headers */,
 				00C60E3F13D76D7E0092A275 /* MarkupTokenizerInlines.h in Headers */,
 				FABE72F51059C1EB00D999DD /* MathMLElement.h in Headers */,
+				3198480C1A1E6CE800A13318 /* JSAnimationEvent.h in Headers */,
 				44A28AAC12DFB8AC00AE923B /* MathMLElementFactory.h in Headers */,
 				FABE72F71059C1EB00D999DD /* MathMLInlineContainerElement.h in Headers */,
 				FABE72F91059C1EB00D999DD /* MathMLMathElement.h in Headers */,
@@ -26174,6 +26200,7 @@
 				1FC40FBA1655CCB90040F29E /* SubimageCacheWithTimer.h in Headers */,
 				F55B3DD41251F12D003EF269 /* SubmitInputType.h in Headers */,
 				656D37480ADBA5DE00A4554D /* SubresourceLoader.h in Headers */,
+				3198480A1A1E6CC700A13318 /* DOMAnimationEventInternal.h in Headers */,
 				659A7D130B6DB4D9001155B3 /* SubstituteData.h in Headers */,
 				1A8F6B020DB53006001DB794 /* SubstituteResource.h in Headers */,
 				E1FF8F601807442100132674 /* SubtleCrypto.h in Headers */,
@@ -27865,6 +27892,7 @@
 				514C764F0CE9234E007EF3CD /* FormDataStreamMac.mm in Sources */,
 				656D373B0ADBA5DE00A4554D /* FormState.cpp in Sources */,
 				41885B9411B6FDA6003383BB /* FormSubmission.cpp in Sources */,
+				319848091A1E6CBF00A13318 /* DOMAnimationEvent.mm in Sources */,
 				65BF022E0974816300C43196 /* Frame.cpp in Sources */,
 				974A862214B7ADBB003FDC76 /* FrameDestructionObserver.cpp in Sources */,
 				FED13D3D0CEA936A00D89466 /* FrameIOS.mm in Sources */,
@@ -28469,6 +28497,7 @@
 				BC3C39B60C0D3D8D005F4D7A /* JSMediaList.cpp in Sources */,
 				D3A94A46122DC40F00A37BBC /* JSMediaQueryList.cpp in Sources */,
 				7C5343FC17B74B63004232F0 /* JSMediaQueryListListener.cpp in Sources */,
+				319848021A1D818100A13318 /* AnimationEvent.cpp in Sources */,
 				CD9DE17417AAC74C00EA386D /* JSMediaSource.cpp in Sources */,
 				07C59B7117F79C7C000FBCBB /* JSMediaSourceStates.cpp in Sources */,
 				07C59B6E17F794F6000FBCBB /* JSMediaSourceStatesCustom.cpp in Sources */,
@@ -28486,6 +28515,7 @@
 				0705853517FDE6D9005F2BCB /* JSMediaTrackConstraintSet.cpp in Sources */,
 				E107400D0E77BDC00033AF24 /* JSMessageChannel.cpp in Sources */,
 				E1A5F99B0E7EAA2500AF85EA /* JSMessageChannelCustom.cpp in Sources */,
+				3198480B1A1E6CE400A13318 /* JSAnimationEvent.cpp in Sources */,
 				75793EC80D0CE72D007FC0AC /* JSMessageEvent.cpp in Sources */,
 				410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */,
 				E1ADEDDB0E76BD93004A1A5E /* JSMessagePort.cpp in Sources */,

Added: trunk/Source/WebCore/dom/AnimationEvent.cpp (0 => 176423)


--- trunk/Source/WebCore/dom/AnimationEvent.cpp	                        (rev 0)
+++ trunk/Source/WebCore/dom/AnimationEvent.cpp	2014-11-20 23:26:29 UTC (rev 176423)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "AnimationEvent.h"
+
+#include "EventNames.h"
+
+namespace WebCore {
+
+AnimationEventInit::AnimationEventInit()
+    : animationName()
+    , elapsedTime(0)
+{
+}
+
+AnimationEvent::AnimationEvent()
+    : m_elapsedTime(0)
+{
+}
+
+AnimationEvent::AnimationEvent(const AtomicString& type, const AnimationEventInit& initializer)
+    : Event(type, initializer)
+    , m_animationName(initializer.animationName)
+    , m_elapsedTime(initializer.elapsedTime)
+{
+}
+
+AnimationEvent::AnimationEvent(const AtomicString& type, const String& animationName, double elapsedTime)
+    : Event(type, true, true)
+    , m_animationName(animationName)
+    , m_elapsedTime(elapsedTime)
+{
+}
+
+AnimationEvent::~AnimationEvent()
+{
+}
+
+const String& AnimationEvent::animationName() const
+{
+    return m_animationName;
+}
+
+double AnimationEvent::elapsedTime() const
+{
+    return m_elapsedTime;
+}
+
+EventInterface AnimationEvent::eventInterface() const
+{
+    return AnimationEventInterfaceType;
+}
+
+} // namespace WebCore
Property changes on: trunk/Source/WebCore/dom/AnimationEvent.cpp
___________________________________________________________________

Added: svn:keywords

Added: svn:eol-style

Added: trunk/Source/WebCore/dom/AnimationEvent.h (0 => 176423)


--- trunk/Source/WebCore/dom/AnimationEvent.h	                        (rev 0)
+++ trunk/Source/WebCore/dom/AnimationEvent.h	2014-11-20 23:26:29 UTC (rev 176423)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef AnimationEvent_h
+#define AnimationEvent_h
+
+#include "Event.h"
+
+namespace WebCore {
+
+struct AnimationEventInit : public EventInit {
+    AnimationEventInit();
+
+    String animationName;
+    double elapsedTime;
+};
+
+class AnimationEvent final : public Event {
+public:
+    static PassRefPtr<AnimationEvent> create()
+    {
+        return adoptRef(new AnimationEvent);
+    }
+    static PassRefPtr<AnimationEvent> create(const AtomicString& type, const String& animationName, double elapsedTime)
+    {
+        return adoptRef(new AnimationEvent(type, animationName, elapsedTime));
+    }
+    static PassRefPtr<AnimationEvent> create(const AtomicString& type, const AnimationEventInit& initializer)
+    {
+        return adoptRef(new AnimationEvent(type, initializer));
+    }
+
+    virtual ~AnimationEvent();
+
+    const String& animationName() const;
+    double elapsedTime() const;
+
+    virtual EventInterface eventInterface() const override;
+
+private:
+    AnimationEvent();
+    AnimationEvent(const AtomicString& type, const String& animationName, double elapsedTime);
+    AnimationEvent(const AtomicString&, const AnimationEventInit&);
+
+    String m_animationName;
+    double m_elapsedTime;
+};
+
+} // namespace WebCore
+
+#endif // AnimationEvent_h
Property changes on: trunk/Source/WebCore/dom/AnimationEvent.h
___________________________________________________________________

Added: svn:keywords

Added: svn:eol-style

Added: trunk/Source/WebCore/dom/AnimationEvent.idl (0 => 176423)


--- trunk/Source/WebCore/dom/AnimationEvent.idl	                        (rev 0)
+++ trunk/Source/WebCore/dom/AnimationEvent.idl	2014-11-20 23:26:29 UTC (rev 176423)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+[
+    ConstructorTemplate=Event
+] interface AnimationEvent : Event {
+    [InitializedByEventConstructor] readonly attribute DOMString animationName;
+    [InitializedByEventConstructor] readonly attribute unrestricted double elapsedTime;
+};
+

Modified: trunk/Source/WebCore/dom/DOMAllInOne.cpp (176422 => 176423)


--- trunk/Source/WebCore/dom/DOMAllInOne.cpp	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/dom/DOMAllInOne.cpp	2014-11-20 23:26:29 UTC (rev 176423)
@@ -26,6 +26,7 @@
 // This all-in-one cpp file cuts down on template bloat to allow us to build our Windows release build.
 
 #include "ActiveDOMObject.cpp"
+#include "AnimationEvent.cpp"
 #include "Attr.cpp"
 #include "BeforeTextInsertedEvent.cpp"
 #include "BeforeUnloadEvent.cpp"

Modified: trunk/Source/WebCore/dom/Document.cpp (176422 => 176423)


--- trunk/Source/WebCore/dom/Document.cpp	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/dom/Document.cpp	2014-11-20 23:26:29 UTC (rev 176423)
@@ -3845,11 +3845,11 @@
         addListenerType(DOMCHARACTERDATAMODIFIED_LISTENER);
     else if (eventType == eventNames().overflowchangedEvent)
         addListenerType(OVERFLOWCHANGED_LISTENER);
-    else if (eventType == eventNames().webkitAnimationStartEvent)
+    else if (eventType == eventNames().webkitAnimationStartEvent || eventType == eventNames().animationstartEvent)
         addListenerType(ANIMATIONSTART_LISTENER);
-    else if (eventType == eventNames().webkitAnimationEndEvent)
+    else if (eventType == eventNames().webkitAnimationEndEvent || eventType == eventNames().animationendEvent)
         addListenerType(ANIMATIONEND_LISTENER);
-    else if (eventType == eventNames().webkitAnimationIterationEvent)
+    else if (eventType == eventNames().webkitAnimationIterationEvent || eventType == eventNames().animationiterationEvent)
         addListenerType(ANIMATIONITERATION_LISTENER);
     else if (eventType == eventNames().webkitTransitionEndEvent || eventType == eventNames().transitionendEvent)
         addListenerType(TRANSITIONEND_LISTENER);

Modified: trunk/Source/WebCore/dom/EventNames.h (176422 => 176423)


--- trunk/Source/WebCore/dom/EventNames.h	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/dom/EventNames.h	2014-11-20 23:26:29 UTC (rev 176423)
@@ -199,6 +199,9 @@
     macro(webkitAnimationEnd) \
     macro(webkitAnimationStart) \
     macro(webkitAnimationIteration) \
+    macro(animationend) \
+    macro(animationstart) \
+    macro(animationiteration) \
     \
     macro(webkitTransitionEnd) \
     macro(transitionend) \

Modified: trunk/Source/WebCore/dom/EventNames.in (176422 => 176423)


--- trunk/Source/WebCore/dom/EventNames.in	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/dom/EventNames.in	2014-11-20 23:26:29 UTC (rev 176423)
@@ -3,6 +3,7 @@
 Event
 Events interfaceName=Event
 HTMLEvents interfaceName=Event
+AnimationEvent
 BeforeLoadEvent
 BeforeUnloadEvent
 CloseEvent

Modified: trunk/Source/WebCore/dom/EventTarget.cpp (176422 => 176423)


--- trunk/Source/WebCore/dom/EventTarget.cpp	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/dom/EventTarget.cpp	2014-11-20 23:26:29 UTC (rev 176423)
@@ -35,6 +35,7 @@
 #include "EventException.h"
 #include "InspectorInstrumentation.h"
 #include "ScriptController.h"
+#include "WebKitAnimationEvent.h"
 #include "WebKitTransitionEvent.h"
 #include <wtf/MainThread.h>
 #include <wtf/Ref.h>
@@ -168,6 +169,15 @@
 
 static const AtomicString& legacyType(const Event* event)
 {
+    if (event->type() == eventNames().animationendEvent)
+        return eventNames().webkitAnimationEndEvent;
+
+    if (event->type() == eventNames().animationstartEvent)
+        return eventNames().webkitAnimationStartEvent;
+
+    if (event->type() == eventNames().animationiterationEvent)
+        return eventNames().webkitAnimationIterationEvent;
+
     if (event->type() == eventNames().transitionendEvent)
         return eventNames().webkitTransitionEndEvent;
 

Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (176422 => 176423)


--- trunk/Source/WebCore/html/HTMLAttributeNames.in	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in	2014-11-20 23:26:29 UTC (rev 176423)
@@ -169,6 +169,9 @@
 nowrap
 object
 onabort
+onanimationstart
+onanimationiteration
+onanimationend
 onautocomplete
 onautocompleteerror
 onbeforecopy

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (176422 => 176423)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2014-11-20 23:26:29 UTC (rev 176423)
@@ -326,6 +326,9 @@
     };
 
     const CustomMapping customTable[] = {
+        { onanimationendAttr, eventNames().animationendEvent },
+        { onanimationiterationAttr, eventNames().animationiterationEvent },
+        { onanimationstartAttr, eventNames().animationstartEvent },
         { ontransitionendAttr, eventNames().webkitTransitionEndEvent },
         { onwebkitanimationendAttr, eventNames().webkitAnimationEndEvent },
         { onwebkitanimationiterationAttr, eventNames().webkitAnimationIterationEvent },

Modified: trunk/Source/WebCore/page/DOMWindow.h (176422 => 176423)


--- trunk/Source/WebCore/page/DOMWindow.h	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/page/DOMWindow.h	2014-11-20 23:26:29 UTC (rev 176423)
@@ -360,6 +360,9 @@
         DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationstart, webkitAnimationStart);
         DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationiteration, webkitAnimationIteration);
         DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkitanimationend, webkitAnimationEnd);
+        DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(animationstart, animationstart);
+        DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(animationiteration, animationiteration);
+        DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(animationend, animationend);
         DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(webkittransitionend, webkitTransitionEnd);
         DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(transitionend, transitionend);
 

Modified: trunk/Source/WebCore/page/DOMWindow.idl (176422 => 176423)


--- trunk/Source/WebCore/page/DOMWindow.idl	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2014-11-20 23:26:29 UTC (rev 176423)
@@ -272,6 +272,9 @@
     attribute EventListener onwebkitanimationend;
     attribute EventListener onwebkitanimationiteration;
     attribute EventListener onwebkitanimationstart;
+    attribute EventListener onanimationend;
+    attribute EventListener onanimationiteration;
+    attribute EventListener onanimationstart;
     attribute EventListener onwebkittransitionend;
     attribute EventListener ontransitionend;
 #if defined(ENABLE_ORIENTATION_EVENTS) && ENABLE_ORIENTATION_EVENTS

Modified: trunk/Source/WebCore/page/animation/AnimationController.cpp (176422 => 176423)


--- trunk/Source/WebCore/page/animation/AnimationController.cpp	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/page/animation/AnimationController.cpp	2014-11-20 23:26:29 UTC (rev 176423)
@@ -31,6 +31,7 @@
 
 #include "AnimationBase.h"
 #include "AnimationControllerPrivate.h"
+#include "AnimationEvent.h"
 #include "CSSParser.h"
 #include "CSSPropertyAnimation.h"
 #include "CompositeAnimation.h"
@@ -178,7 +179,7 @@
         if (it->eventType == eventNames().transitionendEvent)
             element->dispatchEvent(TransitionEvent::create(it->eventType, it->name, it->elapsedTime, PseudoElement::pseudoElementNameForEvents(element->pseudoId())));
         else
-            element->dispatchEvent(WebKitAnimationEvent::create(it->eventType, it->name, it->elapsedTime));
+            element->dispatchEvent(AnimationEvent::create(it->eventType, it->name, it->elapsedTime));
     }
 
     for (unsigned i = 0, size = m_elementChangesToDispatch.size(); i < size; ++i)

Modified: trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp (176422 => 176423)


--- trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp	2014-11-20 23:25:07 UTC (rev 176422)
+++ trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp	2014-11-20 23:26:29 UTC (rev 176423)
@@ -243,17 +243,17 @@
 
 void KeyframeAnimation::onAnimationStart(double elapsedTime)
 {
-    sendAnimationEvent(eventNames().webkitAnimationStartEvent, elapsedTime);
+    sendAnimationEvent(eventNames().animationstartEvent, elapsedTime);
 }
 
 void KeyframeAnimation::onAnimationIteration(double elapsedTime)
 {
-    sendAnimationEvent(eventNames().webkitAnimationIterationEvent, elapsedTime);
+    sendAnimationEvent(eventNames().animationiterationEvent, elapsedTime);
 }
 
 void KeyframeAnimation::onAnimationEnd(double elapsedTime)
 {
-    sendAnimationEvent(eventNames().webkitAnimationEndEvent, elapsedTime);
+    sendAnimationEvent(eventNames().animationendEvent, elapsedTime);
     // End the animation if we don't fill forwards. Forward filling
     // animations are ended properly in the class destructor.
     if (!m_animation->fillsForwards())
@@ -263,12 +263,12 @@
 bool KeyframeAnimation::sendAnimationEvent(const AtomicString& eventType, double elapsedTime)
 {
     Document::ListenerType listenerType;
-    if (eventType == eventNames().webkitAnimationIterationEvent)
+    if (eventType == eventNames().webkitAnimationIterationEvent || eventType == eventNames().animationiterationEvent)
         listenerType = Document::ANIMATIONITERATION_LISTENER;
-    else if (eventType == eventNames().webkitAnimationEndEvent)
+    else if (eventType == eventNames().webkitAnimationEndEvent || eventType == eventNames().animationendEvent)
         listenerType = Document::ANIMATIONEND_LISTENER;
     else {
-        ASSERT(eventType == eventNames().webkitAnimationStartEvent);
+        ASSERT(eventType == eventNames().webkitAnimationStartEvent || eventType == eventNames().animationstartEvent);
         if (m_startEventDispatched)
             return false;
         m_startEventDispatched = true;
@@ -287,7 +287,7 @@
         m_compositeAnimation->animationController()->addEventToDispatch(element, eventType, m_keyframes.animationName(), elapsedTime);
 
         // Restore the original (unanimated) style
-        if (eventType == eventNames().webkitAnimationEndEvent && element->renderer())
+        if ((eventType == eventNames().webkitAnimationEndEvent || eventType == eventNames().animationendEvent) && element->renderer())
             setNeedsStyleRecalc(element.get());
 
         return true; // Did dispatch an event
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to