Changeset 268808 in webkit
- Timestamp:
- Oct 21, 2020, 11:09:02 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
animation/AnimationTimeline.cpp (modified) (5 diffs)
-
dom/Element.cpp (modified) (2 diffs)
-
dom/Element.h (modified) (1 diff)
-
style/Styleable.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268806 r268808 1 2020-10-21 Antoine Quint <graouts@webkit.org> 2 3 Rename hasRunningTransitionsForProperty() and hasCompletedTransitionsForProperty() to be singular 4 https://bugs.webkit.org/show_bug.cgi?id=218014 5 6 Reviewed by Geoffrey Garen. 7 8 Since there is only running or completed transition per property, the name of these methods was misleading. 9 10 * animation/AnimationTimeline.cpp: 11 (WebCore::AnimationTimeline::updateCSSTransitionsForStyleableAndProperty): 12 * dom/Element.cpp: 13 (WebCore::Element::hasCompletedTransitionForProperty const): 14 (WebCore::Element::hasRunningTransitionForProperty const): 15 (WebCore::Element::hasCompletedTransitionsForProperty const): Deleted. 16 (WebCore::Element::hasRunningTransitionsForProperty const): Deleted. 17 * dom/Element.h: 18 * style/Styleable.h: 19 (WebCore::Styleable::hasCompletedTransitionForProperty const): 20 (WebCore::Styleable::hasRunningTransitionForProperty const): 21 (WebCore::Styleable::hasCompletedTransitionsForProperty const): Deleted. 22 (WebCore::Styleable::hasRunningTransitionsForProperty const): Deleted. 23 1 24 2020-10-21 Antti Koivisto <antti@apple.com> 2 25 -
trunk/Source/WebCore/animation/AnimationTimeline.cpp
r267571 r268808 364 364 // A CSS Transition might have completed since the last time animations were updated so we must 365 365 // update the running and completed transitions membership in that case. 366 if (is<CSSTransition>(animation) && matchingBackingAnimation && styleable.hasRunningTransition sForProperty(property) && animation->playState() == WebAnimation::PlayState::Finished) {366 if (is<CSSTransition>(animation) && matchingBackingAnimation && styleable.hasRunningTransitionForProperty(property) && animation->playState() == WebAnimation::PlayState::Finished) { 367 367 styleable.ensureCompletedTransitionsByProperty().set(property, styleable.ensureRunningTransitionsByProperty().take(property)); 368 368 animation = nullptr; … … 405 405 }(); 406 406 407 if (!styleable.hasRunningTransition sForProperty(property)407 if (!styleable.hasRunningTransitionForProperty(property) 408 408 && !CSSPropertyAnimation::propertiesEqual(property, &beforeChangeStyle, &afterChangeStyle) 409 409 && CSSPropertyAnimation::canPropertyBeInterpolated(property, &beforeChangeStyle, &afterChangeStyle) … … 432 432 auto reversingShorteningFactor = 1; 433 433 styleable.ensureRunningTransitionsByProperty().set(property, CSSTransition::create(styleable, property, generationTime, *matchingBackingAnimation, &beforeChangeStyle, afterChangeStyle, delay, duration, reversingAdjustedStartStyle, reversingShorteningFactor)); 434 } else if (styleable.hasCompletedTransition sForProperty(property) && !propertyInStyleMatchesValueForTransitionInMap(property, afterChangeStyle, styleable.ensureCompletedTransitionsByProperty())) {434 } else if (styleable.hasCompletedTransitionForProperty(property) && !propertyInStyleMatchesValueForTransitionInMap(property, afterChangeStyle, styleable.ensureCompletedTransitionsByProperty())) { 435 435 // 2. Otherwise, if the element has a completed transition for the property and the end value of the completed transition is different from 436 436 // the after-change style for the property, then implementations must remove the completed transition from the set of completed transitions. … … 438 438 } 439 439 440 bool hasRunningTransition = styleable.hasRunningTransition sForProperty(property);441 if ((hasRunningTransition || styleable.hasCompletedTransition sForProperty(property)) && !matchingBackingAnimation) {440 bool hasRunningTransition = styleable.hasRunningTransitionForProperty(property); 441 if ((hasRunningTransition || styleable.hasCompletedTransitionForProperty(property)) && !matchingBackingAnimation) { 442 442 // 3. If the element has a running transition or completed transition for the property, and there is not a matching transition-property 443 443 // value, then implementations must cancel the running transition or remove the completed transition from the set of completed transitions. … … 448 448 } 449 449 450 if (matchingBackingAnimation && styleable.hasRunningTransition sForProperty(property) && !propertyInStyleMatchesValueForTransitionInMap(property, afterChangeStyle, styleable.ensureRunningTransitionsByProperty())) {450 if (matchingBackingAnimation && styleable.hasRunningTransitionForProperty(property) && !propertyInStyleMatchesValueForTransitionInMap(property, afterChangeStyle, styleable.ensureRunningTransitionsByProperty())) { 451 451 auto previouslyRunningTransition = styleable.ensureRunningTransitionsByProperty().take(property); 452 452 auto& previouslyRunningTransitionCurrentStyle = previouslyRunningTransition->currentStyle(); -
trunk/Source/WebCore/dom/Element.cpp
r268782 r268808 3848 3848 } 3849 3849 3850 bool Element::hasCompletedTransition sForProperty(PseudoId pseudoId, CSSPropertyID property) const3850 bool Element::hasCompletedTransitionForProperty(PseudoId pseudoId, CSSPropertyID property) const 3851 3851 { 3852 3852 if (auto* animationData = animationRareData(pseudoId)) … … 3855 3855 } 3856 3856 3857 bool Element::hasRunningTransition sForProperty(PseudoId pseudoId, CSSPropertyID property) const3857 bool Element::hasRunningTransitionForProperty(PseudoId pseudoId, CSSPropertyID property) const 3858 3858 { 3859 3859 if (auto* animationData = animationRareData(pseudoId)) -
trunk/Source/WebCore/dom/Element.h
r267970 r268808 493 493 494 494 const AnimationCollection* animations(PseudoId) const; 495 bool hasCompletedTransition sForProperty(PseudoId, CSSPropertyID) const;496 bool hasRunningTransition sForProperty(PseudoId, CSSPropertyID) const;495 bool hasCompletedTransitionForProperty(PseudoId, CSSPropertyID) const; 496 bool hasRunningTransitionForProperty(PseudoId, CSSPropertyID) const; 497 497 bool hasRunningTransitions(PseudoId) const; 498 498 AnimationCollection& ensureAnimations(PseudoId); -
trunk/Source/WebCore/style/Styleable.h
r267571 r268808 97 97 } 98 98 99 bool hasCompletedTransition sForProperty(CSSPropertyID property) const99 bool hasCompletedTransitionForProperty(CSSPropertyID property) const 100 100 { 101 return element.hasCompletedTransition sForProperty(pseudoId, property);101 return element.hasCompletedTransitionForProperty(pseudoId, property); 102 102 } 103 103 104 bool hasRunningTransition sForProperty(CSSPropertyID property) const104 bool hasRunningTransitionForProperty(CSSPropertyID property) const 105 105 { 106 return element.hasRunningTransition sForProperty(pseudoId, property);106 return element.hasRunningTransitionForProperty(pseudoId, property); 107 107 } 108 108
Note:
See TracChangeset
for help on using the changeset viewer.