Title: [289226] trunk
- Revision
- 289226
- Author
- [email protected]
- Date
- 2022-02-07 09:46:17 -0800 (Mon, 07 Feb 2022)
Log Message
[css-logical] [web-animations] changing direction or writing-mode should clear computed keyframes
https://bugs.webkit.org/show_bug.cgi?id=236241
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Mark WPT progressions.
* web-platform-tests/css/css-logical/animation-001-expected.txt:
Source/WebCore:
Any time the "direction" or "writing-mode" property changes, we must clear the computed keyframes
as we should re-resolve any logical properties used on the source keyframes.
* animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::propertyAffectingLogicalPropertiesDidChange):
* animation/KeyframeEffect.h:
* animation/KeyframeEffectStack.cpp:
(WebCore::KeyframeEffectStack::applyKeyframeEffects):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289225 => 289226)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-07 17:35:56 UTC (rev 289225)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-07 17:46:17 UTC (rev 289226)
@@ -1,3 +1,14 @@
+2022-02-07 Antoine Quint <[email protected]>
+
+ [css-logical] [web-animations] changing direction or writing-mode should clear computed keyframes
+ https://bugs.webkit.org/show_bug.cgi?id=236241
+
+ Reviewed by Dean Jackson.
+
+ Mark WPT progressions.
+
+ * web-platform-tests/css/css-logical/animation-001-expected.txt:
+
2022-02-07 Antti Koivisto <[email protected]>
[CSS Container Queries] Add ContainerQueryEvaluator
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-001-expected.txt (289225 => 289226)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-001-expected.txt 2022-02-07 17:35:56 UTC (rev 289225)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-logical/animation-001-expected.txt 2022-02-07 17:46:17 UTC (rev 289226)
@@ -15,12 +15,12 @@
PASS Physical properties and logical properties can be mixed
FAIL Physical shorthands and logical shorthands can be mixed assert_equals: expected "250px" but got "150px"
PASS Physical properties win over logical properties even when some keyframes only have logical properties
-FAIL Animations update when the writing-mode is changed assert_equals: expected "50px" but got "0px"
-FAIL Filling animations update when the writing-mode is changed assert_equals: expected "100px" but got "0px"
-FAIL Animations with implicit from values update when the writing-mode is changed assert_equals: expected "200px" but got "100px"
-FAIL Animations with overlapping physical and logical properties update when the writing-mode is changed assert_equals: expected "50px" but got "0px"
-FAIL Animations update when the writing-mode is changed through a CSS variable assert_equals: expected "50px" but got "0px"
-FAIL Animations update when the direction is changed assert_equals: expected "0px" but got "50px"
+PASS Animations update when the writing-mode is changed
+PASS Filling animations update when the writing-mode is changed
+PASS Animations with implicit from values update when the writing-mode is changed
+PASS Animations with overlapping physical and logical properties update when the writing-mode is changed
+PASS Animations update when the writing-mode is changed through a CSS variable
+PASS Animations update when the direction is changed
FAIL Logical shorthand with variable references animates correctly assert_equals: expected "250px" but got "auto"
PASS writing-mode is not animatable
PASS direction is not animatable
Modified: trunk/Source/WebCore/ChangeLog (289225 => 289226)
--- trunk/Source/WebCore/ChangeLog 2022-02-07 17:35:56 UTC (rev 289225)
+++ trunk/Source/WebCore/ChangeLog 2022-02-07 17:46:17 UTC (rev 289226)
@@ -1,5 +1,21 @@
2022-02-07 Antoine Quint <[email protected]>
+ [css-logical] [web-animations] changing direction or writing-mode should clear computed keyframes
+ https://bugs.webkit.org/show_bug.cgi?id=236241
+
+ Reviewed by Dean Jackson.
+
+ Any time the "direction" or "writing-mode" property changes, we must clear the computed keyframes
+ as we should re-resolve any logical properties used on the source keyframes.
+
+ * animation/KeyframeEffect.cpp:
+ (WebCore::KeyframeEffect::propertyAffectingLogicalPropertiesDidChange):
+ * animation/KeyframeEffect.h:
+ * animation/KeyframeEffectStack.cpp:
+ (WebCore::KeyframeEffectStack::applyKeyframeEffects):
+
+2022-02-07 Antoine Quint <[email protected]>
+
Remove unnecessary DocumentTimeline.h includes
https://bugs.webkit.org/show_bug.cgi?id=236236
Modified: trunk/Source/WebCore/animation/KeyframeEffect.cpp (289225 => 289226)
--- trunk/Source/WebCore/animation/KeyframeEffect.cpp 2022-02-07 17:35:56 UTC (rev 289225)
+++ trunk/Source/WebCore/animation/KeyframeEffect.cpp 2022-02-07 17:46:17 UTC (rev 289226)
@@ -1701,6 +1701,12 @@
addPendingAcceleratedAction(AcceleratedAction::TransformChange);
}
+void KeyframeEffect::propertyAffectingLogicalPropertiesDidChange()
+{
+ if (m_blendingKeyframesSource == BlendingKeyframesSource::WebAnimation)
+ clearBlendingKeyframes();
+}
+
void KeyframeEffect::animationWasCanceled()
{
if (isRunningAccelerated() || isAboutToRunAccelerated())
Modified: trunk/Source/WebCore/animation/KeyframeEffect.h (289225 => 289226)
--- trunk/Source/WebCore/animation/KeyframeEffect.h 2022-02-07 17:35:56 UTC (rev 289225)
+++ trunk/Source/WebCore/animation/KeyframeEffect.h 2022-02-07 17:46:17 UTC (rev 289226)
@@ -126,6 +126,7 @@
void animationTimingDidChange();
void transformRelatedPropertyDidChange();
+ void propertyAffectingLogicalPropertiesDidChange();
OptionSet<AcceleratedActionApplicationResult> applyPendingAcceleratedActions();
void willChangeRenderer();
Modified: trunk/Source/WebCore/animation/KeyframeEffectStack.cpp (289225 => 289226)
--- trunk/Source/WebCore/animation/KeyframeEffectStack.cpp 2022-02-07 17:35:56 UTC (rev 289225)
+++ trunk/Source/WebCore/animation/KeyframeEffectStack.cpp 2022-02-07 17:46:17 UTC (rev 289226)
@@ -133,8 +133,15 @@
|| targetStyle.transform() != previousLastStyleChangeEventStyle.transform();
}();
+ auto propertyAffectingLogicalPropertiesChanged = previousLastStyleChangeEventStyle.direction() != targetStyle.direction()
+ || previousLastStyleChangeEventStyle.writingMode() != targetStyle.writingMode();
+
for (const auto& effect : sortedEffects()) {
ASSERT(effect->animation());
+
+ if (propertyAffectingLogicalPropertiesChanged)
+ effect->propertyAffectingLogicalPropertiesDidChange();
+
effect->animation()->resolve(targetStyle, resolutionContext);
if (effect->isRunningAccelerated() || effect->isAboutToRunAccelerated())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes