Title: [287826] trunk
- Revision
- 287826
- Author
- [email protected]
- Date
- 2022-01-09 11:51:57 -0800 (Sun, 09 Jan 2022)
Log Message
Interpolation for the "filter" property fails with a single keyframe
https://bugs.webkit.org/show_bug.cgi?id=235019
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Mark WPT progressions.
* web-platform-tests/css/filter-effects/animation/filter-interpolation-001-expected.txt:
Source/WebCore:
In the case of an animation with a single keyframe, the 0% or 100% value (or both) may
be implicit and the blending keyframes can have fewer than to entries. This would make
KeyframeEffect::checkForMatchingFilterFunctionLists() always store "false" values for
whether "filter" values in keyframes match and prevent any blending from happening.
In the case where we have fewer than 2 values, as long as the property is animated,
we return true.
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::checkForMatchingFilterFunctionLists const):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (287825 => 287826)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-09 18:54:29 UTC (rev 287825)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-09 19:51:57 UTC (rev 287826)
@@ -1,3 +1,14 @@
+2022-01-09 Antoine Quint <[email protected]>
+
+ Interpolation for the "filter" property fails with a single keyframe
+ https://bugs.webkit.org/show_bug.cgi?id=235019
+
+ Reviewed by Dean Jackson.
+
+ Mark WPT progressions.
+
+ * web-platform-tests/css/filter-effects/animation/filter-interpolation-001-expected.txt:
+
2022-01-09 Ziran Sun <[email protected]>
[css-grid] Resync web-platform-tests/css/css-grid tests from upstream
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/animation/filter-interpolation-001-expected.txt (287825 => 287826)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/animation/filter-interpolation-001-expected.txt 2022-01-09 18:54:29 UTC (rev 287825)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/filter-effects/animation/filter-interpolation-001-expected.txt 2022-01-09 19:51:57 UTC (rev 287826)
@@ -65,12 +65,12 @@
PASS CSS Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0.6) should be [hue-rotate(16deg)]
PASS CSS Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1) should be [hue-rotate(20deg)]
PASS CSS Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1.5) should be [hue-rotate(25deg)]
-FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (-0.5) should be [hue-rotate(5deg)] assert_equals: expected "hue - rotate ( 5deg ) " but got "hue - rotate ( 20deg ) "
-FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0) should be [hue-rotate(10deg)] assert_equals: expected "hue - rotate ( 10deg ) " but got "hue - rotate ( 20deg ) "
-FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0.3) should be [hue-rotate(13deg)] assert_equals: expected "hue - rotate ( 13deg ) " but got "hue - rotate ( 20deg ) "
-FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0.6) should be [hue-rotate(16deg)] assert_equals: expected "hue - rotate ( 16deg ) " but got "hue - rotate ( 20deg ) "
+PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (-0.5) should be [hue-rotate(5deg)]
+PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0) should be [hue-rotate(10deg)]
+PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0.3) should be [hue-rotate(13deg)]
+PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (0.6) should be [hue-rotate(16deg)]
PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1) should be [hue-rotate(20deg)]
-FAIL Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1.5) should be [hue-rotate(25deg)] assert_equals: expected "hue - rotate ( 25deg ) " but got "hue - rotate ( 20deg ) "
+PASS Web Animations: property <filter> from neutral to [hue-rotate(20deg)] at (1.5) should be [hue-rotate(25deg)]
PASS CSS Transitions: property <filter> from [initial] to [hue-rotate(20deg)] at (-0.5) should be [hue-rotate(-10deg)]
PASS CSS Transitions: property <filter> from [initial] to [hue-rotate(20deg)] at (0) should be [hue-rotate(0deg)]
PASS CSS Transitions: property <filter> from [initial] to [hue-rotate(20deg)] at (0.3) should be [hue-rotate(6deg)]
Modified: trunk/Source/WebCore/ChangeLog (287825 => 287826)
--- trunk/Source/WebCore/ChangeLog 2022-01-09 18:54:29 UTC (rev 287825)
+++ trunk/Source/WebCore/ChangeLog 2022-01-09 19:51:57 UTC (rev 287826)
@@ -1,3 +1,21 @@
+2022-01-09 Antoine Quint <[email protected]>
+
+ Interpolation for the "filter" property fails with a single keyframe
+ https://bugs.webkit.org/show_bug.cgi?id=235019
+
+ Reviewed by Dean Jackson.
+
+ In the case of an animation with a single keyframe, the 0% or 100% value (or both) may
+ be implicit and the blending keyframes can have fewer than to entries. This would make
+ KeyframeEffect::checkForMatchingFilterFunctionLists() always store "false" values for
+ whether "filter" values in keyframes match and prevent any blending from happening.
+
+ In the case where we have fewer than 2 values, as long as the property is animated,
+ we return true.
+
+ * animation/KeyframeEffect.cpp:
+ (WebCore::KeyframeEffect::checkForMatchingFilterFunctionLists const):
+
2022-01-09 Sam Weinig <[email protected]>
Refactor CSS property parsing helpers to be a bit more composable
Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (287825 => 287826)
--- trunk/Source/WebCore/animation/KeyframeEffect.cpp 2022-01-09 18:54:29 UTC (rev 287825)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp 2022-01-09 19:51:57 UTC (rev 287826)
@@ -1048,9 +1048,12 @@
bool KeyframeEffect::checkForMatchingFilterFunctionLists(CSSPropertyID propertyID, const std::function<const FilterOperations& (const RenderStyle&)>& filtersGetter) const
{
- if (m_blendingKeyframes.size() < 2 || !m_blendingKeyframes.containsProperty(propertyID))
+ if (!m_blendingKeyframes.containsProperty(propertyID))
return false;
+ if (m_blendingKeyframes.size() < 2)
+ return true;
+
// Empty filters match anything, so find the first non-empty entry as the reference.
size_t numKeyframes = m_blendingKeyframes.size();
size_t firstNonEmptyKeyframeIndex = numKeyframes;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes