Auto merge of #26362 - mrobinson:animation-animation-events, r=emilio,jdm

Add support for animationend event

This is triggered when an animation finishes. This is a high priority
because it allows us to start rooting nodes with animations in the
script thread.

This doesn't yet cause a lot of tests to pass because they rely on the
existence of `Document.getAnimations()` and the presence of
`animationstart` and `animationiteration` events.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-05-01 11:09:05 -04:00 committed by GitHub
commit f063ae266e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 335 additions and 331 deletions

View file

@ -1,6 +1,5 @@
[Element-getAnimations.tentative.html]
bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[getAnimations for CSS Animations with animation-name: none]
expected: FAIL
@ -35,7 +34,7 @@
expected: FAIL
[getAnimations for CSS Animations that have finished but are forwards filling]
expected: TIMEOUT
expected: FAIL
[getAnimations returns objects with the same identity]
expected: FAIL
@ -56,7 +55,7 @@
expected: FAIL
[getAnimations for CSS Animations that have finished]
expected: TIMEOUT
expected: FAIL
[{ subtree: false } on a leaf element returns the element's animations and ignore pseudo-elements]
expected: FAIL

View file

@ -1,124 +0,0 @@
[animationevent-interface.html]
[the event is an instance of AnimationEvent]
expected: FAIL
[animationName is readonly]
expected: FAIL
[type argument is null]
expected: FAIL
[elapsedTime has default value of 0.0]
expected: FAIL
[elapsedTime is readonly]
expected: FAIL
[elapsedTime set to 0.5]
expected: FAIL
[animationEventInit argument is empty dictionary]
expected: FAIL
[event type set to undefined]
expected: FAIL
[Missing type argument]
expected: FAIL
[AnimationEvent.pseudoElement initialized from the dictionary]
expected: FAIL
[the event inherts from Event]
expected: FAIL
[type argument is string]
expected: FAIL
[animationName set to 'sample']
expected: FAIL
[animationEventInit argument is undefined]
expected: FAIL
[animationEventInit argument is null]
expected: FAIL
[AnimationEventInit properties set value]
expected: FAIL
[animationName has default value of empty string]
expected: FAIL
[elapsedTime set to -0.5]
expected: FAIL
[elapsedTime cannot be set to -Infinity]
expected: FAIL
[elapsedTime cannot be set to Infinity]
expected: FAIL
[animationName set to [\]]
expected: FAIL
[elapsedTime set to null]
expected: FAIL
[elapsedTime set to an object with a valueOf function]
expected: FAIL
[animationName set to an object with a valueOf function]
expected: FAIL
[elapsedTime cannot be set to NaN]
expected: FAIL
[elapsedTime set to true]
expected: FAIL
[elapsedTime set to '']
expected: FAIL
[elapsedTime set to [0.5\]]
expected: FAIL
[elapsedTime set to undefined]
expected: FAIL
[animationName set to true]
expected: FAIL
[elapsedTime set to false]
expected: FAIL
[elapsedTime set to [\]]
expected: FAIL
[elapsedTime cannot be set to [0.5, 1.0\]]
expected: FAIL
[animationName set to null]
expected: FAIL
[animationName set to an object]
expected: FAIL
[elapsedTime cannot be set to 'sample']
expected: FAIL
[animationName set to undefined]
expected: FAIL
[animationName set to [1, 2, 3\]]
expected: FAIL
[animationName set to false]
expected: FAIL
[animationName set to a number]
expected: FAIL
[elapsedTime cannot be set to an object]
expected: FAIL

View file

@ -4,9 +4,6 @@
[animationiteration event is instanceof AnimationEvent]
expected: TIMEOUT
[animationend event is instanceof AnimationEvent]
expected: TIMEOUT
[animationstart event is instanceof AnimationEvent]
expected: TIMEOUT

View file

@ -1,61 +1,25 @@
[idlharness.html]
[AnimationEvent interface: attribute pseudoElement]
expected: FAIL
[AnimationEvent interface: existence and properties of interface prototype object]
expected: FAIL
[Window interface: attribute onanimationend]
expected: FAIL
[Document interface: attribute onanimationiteration]
expected: FAIL
[AnimationEvent interface object length]
expected: FAIL
[CSSKeyframeRule interface: attribute style]
expected: FAIL
[AnimationEvent interface object name]
expected: FAIL
[AnimationEvent interface: attribute elapsedTime]
expected: FAIL
[Document interface: attribute onanimationstart]
expected: FAIL
[HTMLElement interface: attribute onanimationiteration]
expected: FAIL
[AnimationEvent must be primary interface of new AnimationEvent("animationstart")]
expected: FAIL
[AnimationEvent interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[Window interface: attribute onanimationcancel]
expected: FAIL
[CSSKeyframeRule interface: attribute keyText]
expected: FAIL
[AnimationEvent interface: new AnimationEvent("animationstart") must inherit property "pseudoElement" with the proper type]
expected: FAIL
[Stringification of new AnimationEvent("animationstart")]
expected: FAIL
[Document interface: attribute onanimationend]
expected: FAIL
[HTMLElement interface: attribute onanimationstart]
expected: FAIL
[AnimationEvent interface: new AnimationEvent("animationstart") must inherit property "animationName" with the proper type]
expected: FAIL
[Document interface: attribute onanimationcancel]
expected: FAIL
@ -65,24 +29,9 @@
[HTMLElement interface: attribute onanimationcancel]
expected: FAIL
[AnimationEvent interface: attribute animationName]
expected: FAIL
[Window interface: attribute onanimationiteration]
expected: FAIL
[AnimationEvent interface: new AnimationEvent("animationstart") must inherit property "elapsedTime" with the proper type]
expected: FAIL
[CSSKeyframeRule interface: keyframes.cssRules[0\] must inherit property "keyText" with the proper type]
expected: FAIL
[AnimationEvent interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[AnimationEvent interface: existence and properties of interface object]
expected: FAIL
[HTMLElement interface: attribute onanimationend]
expected: FAIL

View file

@ -1,9 +1,8 @@
[variable-animation-substitute-into-keyframe-shorthand.html]
bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify border-bottom-color before animation]
expected: FAIL
[Verify border-bottom-color after animation]
expected: TIMEOUT
expected: FAIL

View file

@ -1,9 +1,8 @@
[variable-animation-substitute-into-keyframe-transform.html]
bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify transform before animation]
expected: FAIL
[Verify transform after animation]
expected: TIMEOUT
expected: FAIL

View file

@ -1,9 +1,8 @@
[variable-animation-substitute-into-keyframe.html]
bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify color before animation]
expected: FAIL
[Verify color after animation]
expected: TIMEOUT
expected: FAIL

View file

@ -1,9 +1,8 @@
[variable-animation-substitute-within-keyframe-fallback.html]
bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify color before animation]
expected: FAIL
[Verify color after animation]
expected: TIMEOUT
expected: FAIL

View file

@ -1,9 +1,8 @@
[variable-animation-substitute-within-keyframe-multiple.html]
bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify color before animation]
expected: FAIL
[Verify color after animation]
expected: TIMEOUT
expected: FAIL

View file

@ -1,9 +1,8 @@
[variable-animation-substitute-within-keyframe.html]
bug: https://github.com/servo/servo/issues/21564
expected: TIMEOUT
[Verify color before animation]
expected: FAIL
[Verify color after animation]
expected: TIMEOUT
expected: FAIL

View file

@ -1,4 +1,5 @@
[webkit-animation-end-event.html]
expected: TIMEOUT
[event types for prefixed and unprefixed animationend event handlers should be named appropriately]
expected: FAIL
@ -6,13 +7,13 @@
expected: FAIL
[webkitAnimationEnd event listener should not trigger if an unprefixed event handler also exists]
expected: FAIL
expected: NOTRUN
[webkitAnimationEnd event listener is case sensitive]
expected: FAIL
expected: NOTRUN
[webkitAnimationEnd event listener should trigger for an animation]
expected: FAIL
expected: TIMEOUT
[onwebkitanimationend event handler should trigger for an animation]
expected: FAIL
@ -20,20 +21,17 @@
[onanimationend and onwebkitanimationend are not aliases]
expected: FAIL
[dispatchEvent of a webkitAnimationEnd event does not trigger an unprefixed event handler or listener]
expected: FAIL
[dispatchEvent of a webkitAnimationEnd event does trigger a prefixed event handler or listener]
expected: FAIL
[webkitAnimationEnd event listener should not trigger if an unprefixed listener also exists]
expected: FAIL
expected: NOTRUN
[dispatchEvent of an animationend event does not trigger a prefixed event handler or listener]
expected: FAIL
[event types for prefixed and unprefixed animationend event listeners should be named appropriately]
expected: FAIL
expected: NOTRUN
[onwebkitanimationend event handler should not trigger if an unprefixed event handler also exists]
expected: FAIL

View file

@ -1,7 +1,4 @@
[webkit-transition-end-event.html]
[dispatchEvent of a webkitTransitionEnd event does not trigger an unprefixed event handler or listener]
expected: FAIL
[dispatchEvent of an transitionend event does not trigger a prefixed event handler or listener]
expected: FAIL

View file

@ -13870,7 +13870,7 @@
]
],
"interfaces.html": [
"1a579837cc22d31a7792566615d9e321b3d7fe39",
"b6034be26af3c2edd1ef41703857fa99bd2cd639",
[
null,
{}

View file

@ -12,6 +12,7 @@
// IMPORTANT: Do not change the list below without review from a DOM peer!
test_interfaces([
"AnalyserNode",
"AnimationEvent",
"Attr",
"Audio",
"AudioBuffer",