Changeset 287517 in webkit
- Timestamp:
- Jan 2, 2022 8:12:37 AM (7 months ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/KeyframeEffect.cpp (modified) (1 diff)
-
Source/WebCore/rendering/style/KeyframeList.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/style/KeyframeList.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r287509 r287517 1 2022-01-02 Antoine Quint <graouts@webkit.org> 2 3 [Web Animations] getKeyframes() should return an empty object when there are no animatable properties in @keyframes rule 4 https://bugs.webkit.org/show_bug.cgi?id=234793 5 6 Reviewed by Dean Jackson. 7 8 Mark a new WPT progression. 9 10 * web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative-expected.txt: 11 1 12 2022-01-01 Antoine Quint <graouts@webkit.org> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-animations/KeyframeEffect-getKeyframes.tentative-expected.txt
r267650 r287517 1 1 2 FAIL KeyframeEffect.getKeyframes() returns no frames for various kinds of empty enimations assert_equals: number of frames when @keyframes has empty keyframes expected 0 but got 2 2 PASS KeyframeEffect.getKeyframes() returns no frames for various kinds of empty enimations 3 3 PASS KeyframeEffect.getKeyframes() returns expected frames for a simple animation 4 4 PASS KeyframeEffect.getKeyframes() returns frames with expected easing values, when the easing comes from animation-timing-function on the element -
trunk/Source/WebCore/ChangeLog
r287515 r287517 1 2022-01-02 Antoine Quint <graouts@webkit.org> 2 3 [Web Animations] getKeyframes() should return an empty object when there are no animatable properties in @keyframes rule 4 https://bugs.webkit.org/show_bug.cgi?id=234793 5 6 Reviewed by Dean Jackson. 7 8 If the keyframes for an animation result from a declarative source, let's not output any data if none of the properties 9 are animatable. 10 11 * animation/KeyframeEffect.cpp: 12 (WebCore::KeyframeEffect::getKeyframes): 13 * rendering/style/KeyframeList.cpp: 14 (WebCore::KeyframeList::containsAnimatableProperty const): 15 * rendering/style/KeyframeList.h: 16 1 17 2022-01-02 Alan Bujtas <zalan@apple.com> 2 18 -
trunk/Source/WebCore/animation/KeyframeEffect.cpp
r286544 r287517 633 633 634 634 // 3. For each keyframe in keyframes perform the following steps: 635 if (m_parsedKeyframes.isEmpty() && m_blendingKeyframesSource != BlendingKeyframesSource::WebAnimation ) {635 if (m_parsedKeyframes.isEmpty() && m_blendingKeyframesSource != BlendingKeyframesSource::WebAnimation && m_blendingKeyframes.containsAnimatableProperty()) { 636 636 auto* target = m_target.get(); 637 637 auto* renderer = this->renderer(); -
trunk/Source/WebCore/rendering/style/KeyframeList.cpp
r284693 r287517 25 25 #include "Animation.h" 26 26 #include "CSSKeyframeRule.h" 27 #include "CSSPropertyAnimation.h" 27 28 #include "RenderObject.h" 28 29 #include "StyleResolver.h" … … 132 133 } 133 134 135 bool KeyframeList::containsAnimatableProperty() const 136 { 137 for (auto cssPropertyId : m_properties) { 138 if (CSSPropertyAnimation::isPropertyAnimatable(cssPropertyId)) 139 return true; 140 } 141 return false; 142 } 143 134 144 } // namespace WebCore -
trunk/Source/WebCore/rendering/style/KeyframeList.h
r285397 r287517 92 92 bool containsProperty(CSSPropertyID prop) const { return m_properties.contains(prop); } 93 93 const HashSet<CSSPropertyID>& properties() const { return m_properties; } 94 94 bool containsAnimatableProperty() const; 95 95 96 void clear(); 96 97 bool isEmpty() const { return m_keyframes.isEmpty(); }
Note: See TracChangeset
for help on using the changeset viewer.