Changeset 230594 in webkit
- Timestamp:
- Apr 12, 2018 2:23:48 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r230574 r230594 1 2018-04-12 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Only cancel declarative animations upon element removal 4 https://bugs.webkit.org/show_bug.cgi?id=184553 5 6 Reviewed by Dean Jackson. 7 8 Make some WPT tests opt into the CSS Animations and CSS Transtions as Web Animations flag. 9 10 * web-platform-tests/web-animations/interfaces/Animation/ready.html: 11 * web-platform-tests/web-animations/timing-model/animations/playing-an-animation.html: 12 * web-platform-tests/web-animations/timing-model/animations/reversing-an-animation.html: 13 1 14 2018-04-11 Antoine Quint <graouts@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/ready.html
r227598 r230594 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 <meta charset=utf-8> 3 3 <title>Animation.ready</title> -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/playing-an-animation.html
r227598 r230594 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 <meta charset=utf-8> 3 3 <title>Playing an animation</title> -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/timing-model/animations/reversing-an-animation.html
r227598 r230594 1 <!DOCTYPE html> 1 <!DOCTYPE html><!-- webkit-test-runner [ enableCSSAnimationsAndCSSTransitionsBackedByWebAnimations=true ] --> 2 2 <meta charset=utf-8> 3 3 <title>Reverse an animation</title> -
trunk/Source/WebCore/ChangeLog
r230586 r230594 1 2018-04-12 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Only cancel declarative animations upon element removal 4 https://bugs.webkit.org/show_bug.cgi?id=184553 5 6 Reviewed by Dean Jackson. 7 8 Ensure we only call cancel() on CSSAnimation and CSSTransition objects as we might otherwise reject 9 the ready promise and produce spurious logging from WPT tests. 10 11 * animation/AnimationTimeline.cpp: 12 (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement): 13 (WebCore::AnimationTimeline::cancelAnimationsForElement): Deleted. 14 * animation/AnimationTimeline.h: 15 * dom/Element.cpp: 16 (WebCore::Element::removedFromAncestor): 17 * dom/PseudoElement.cpp: 18 (WebCore::PseudoElement::clearHostElement): 19 * rendering/updating/RenderTreeUpdater.cpp: 20 (WebCore::RenderTreeUpdater::tearDownRenderers): 21 1 22 2018-04-12 Ryan Haddad <ryanhaddad@apple.com> 2 23 -
trunk/Source/WebCore/animation/AnimationTimeline.cpp
r230578 r230594 128 128 } 129 129 130 void AnimationTimeline::cancelAnimationsForElement(Element& element) 131 { 132 for (const auto& animation : animationsForElement(element)) 133 animation->cancel(); 130 void AnimationTimeline::cancelDeclarativeAnimationsForElement(Element& element) 131 { 132 for (const auto& animation : animationsForElement(element)) { 133 if (is<DeclarativeAnimation>(animation)) 134 animation->cancel(); 135 } 134 136 } 135 137 -
trunk/Source/WebCore/animation/AnimationTimeline.h
r230578 r230594 60 60 const ListHashSet<RefPtr<WebAnimation>>& animations() const { return m_animations; } 61 61 Vector<RefPtr<WebAnimation>> animationsForElement(Element&) const; 62 void cancel AnimationsForElement(Element&);62 void cancelDeclarativeAnimationsForElement(Element&); 63 63 void animationWasAddedToElement(WebAnimation&, Element&); 64 64 void animationWasRemovedFromElement(WebAnimation&, Element&); -
trunk/Source/WebCore/dom/Element.cpp
r230211 r230594 1798 1798 if (RuntimeEnabledFeatures::sharedFeatures().cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled()) { 1799 1799 if (auto* timeline = document().existingTimeline()) 1800 timeline->cancel AnimationsForElement(*this);1800 timeline->cancelDeclarativeAnimationsForElement(*this); 1801 1801 } else if (frame) 1802 1802 frame->animation().cancelAnimations(*this); -
trunk/Source/WebCore/dom/PseudoElement.cpp
r229890 r230594 93 93 if (RuntimeEnabledFeatures::sharedFeatures().cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled()) { 94 94 if (auto* timeline = document().existingTimeline()) 95 timeline->cancel AnimationsForElement(*this);95 timeline->cancelDeclarativeAnimationsForElement(*this); 96 96 } else if (auto* frame = document().frame()) 97 97 frame->animation().cancelAnimations(*this); -
trunk/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
r229890 r230594 556 556 if (RuntimeEnabledFeatures::sharedFeatures().cssAnimationsAndCSSTransitionsBackedByWebAnimationsEnabled()) { 557 557 if (timeline) 558 timeline->cancel AnimationsForElement(element);558 timeline->cancelDeclarativeAnimationsForElement(element); 559 559 } else 560 560 animationController.cancelAnimations(element);
Note: See TracChangeset
for help on using the changeset viewer.