[Web Animations] Only cancel declarative animations upon element removal
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2018 21:23:48 +0000 (21:23 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Apr 2018 21:23:48 +0000 (21:23 +0000)
commit677bac4710e173d8894a094c2eeaade1bb4d5549
tree7e209fafc40056b3555ddd34b4000559c97aaef2
parent497778da668f60cf1d2143cd5b0f8b67334d7d8c
[Web Animations] Only cancel declarative animations upon element removal
https://bugs.webkit.org/show_bug.cgi?id=184553

Reviewed by Dean Jackson.

LayoutTests/imported/w3c:

Make some WPT tests opt into the CSS Animations and CSS Transtions as Web Animations flag.

* web-platform-tests/web-animations/interfaces/Animation/ready.html:
* web-platform-tests/web-animations/timing-model/animations/playing-an-animation.html:
* web-platform-tests/web-animations/timing-model/animations/reversing-an-animation.html:

Source/WebCore:

Ensure we only call cancel() on CSSAnimation and CSSTransition objects as we might otherwise reject
the ready promise and produce spurious logging from WPT tests.

* animation/AnimationTimeline.cpp:
(WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement):
(WebCore::AnimationTimeline::cancelAnimationsForElement): Deleted.
* animation/AnimationTimeline.h:
* dom/Element.cpp:
(WebCore::Element::removedFromAncestor):
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::clearHostElement):
* rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::tearDownRenderers):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@230594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/ready.html
LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/playing-an-animation.html
LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/reversing-an-animation.html
Source/WebCore/ChangeLog
Source/WebCore/animation/AnimationTimeline.cpp
Source/WebCore/animation/AnimationTimeline.h
Source/WebCore/dom/Element.cpp
Source/WebCore/dom/PseudoElement.cpp
Source/WebCore/rendering/updating/RenderTreeUpdater.cpp