Title: [289453] trunk
- Revision
- 289453
- Author
- [email protected]
- Date
- 2022-02-08 22:22:01 -0800 (Tue, 08 Feb 2022)
Log Message
[web-animations] Animation.commitStyles() should use the non-animated style
https://bugs.webkit.org/show_bug.cgi?id=236315
Reviewed by Dean Jackson.
LayoutTests/imported/w3c:
Mark WPT progression.
* web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt:
Source/WebCore:
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::commitStyles):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (289452 => 289453)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-09 04:59:52 UTC (rev 289452)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-02-09 06:22:01 UTC (rev 289453)
@@ -1,3 +1,14 @@
+2022-02-08 Antoine Quint <[email protected]>
+
+ [web-animations] Animation.commitStyles() should use the non-animated style
+ https://bugs.webkit.org/show_bug.cgi?id=236315
+
+ Reviewed by Dean Jackson.
+
+ Mark WPT progression.
+
+ * web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt:
+
2022-02-08 Chris Dumez <[email protected]>
FileReaderSync should be exposed to shared workers
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt (289452 => 289453)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt 2022-02-09 04:59:52 UTC (rev 289452)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/interfaces/Animation/commitStyles-expected.txt 2022-02-09 06:22:01 UTC (rev 289453)
@@ -14,7 +14,7 @@
FAIL Commits matrix-interpolated relative transforms assert_equals: Resolved transform is correct after commit. expected "matrix(2, 0, 0, 2, 100, 0)" but got "matrix(2, 0, 0, 2, 0, 0)"
PASS Commits "none" transform
PASS Commits the intermediate value of an animation in the middle of stack
-FAIL Commit composites on top of the underlying value assert_approx_equals: expected 0.5 +/- 0.0001 but got 1
+PASS Commit composites on top of the underlying value
PASS Triggers mutation observers when updating style
FAIL Does NOT trigger mutation observers when the change to style is redundant assert_equals: Should have no mutation records expected 0 but got 1
PASS Throws if the target element is a pseudo element
Modified: trunk/Source/WebCore/ChangeLog (289452 => 289453)
--- trunk/Source/WebCore/ChangeLog 2022-02-09 04:59:52 UTC (rev 289452)
+++ trunk/Source/WebCore/ChangeLog 2022-02-09 06:22:01 UTC (rev 289453)
@@ -1,3 +1,13 @@
+2022-02-08 Antoine Quint <[email protected]>
+
+ [web-animations] Animation.commitStyles() should use the non-animated style
+ https://bugs.webkit.org/show_bug.cgi?id=236315
+
+ Reviewed by Dean Jackson.
+
+ * animation/WebAnimation.cpp:
+ (WebCore::WebAnimation::commitStyles):
+
2022-02-08 Chris Dumez <[email protected]>
FileReaderSync should be exposed to shared workers
Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (289452 => 289453)
--- trunk/Source/WebCore/animation/WebAnimation.cpp 2022-02-09 04:59:52 UTC (rev 289452)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp 2022-02-09 06:22:01 UTC (rev 289453)
@@ -1451,7 +1451,16 @@
// 2.4 Let targeted properties be the set of physical longhand properties that are a target property for at least one animation effect associated with
// animation whose effect target is target.
- auto& style = renderer->style();
+ auto unanimatedStyle = [&]() {
+ if (auto styleable = Styleable::fromRenderer(*renderer)) {
+ if (auto* lastStyleChangeEventStyle = styleable->lastStyleChangeEventStyle())
+ return RenderStyle::clone(*lastStyleChangeEventStyle);
+ }
+ // If we don't have a style for the last style change event, then the
+ // current renderer style cannot be animated.
+ return RenderStyle::clone(renderer->style());
+ }();
+
auto computedStyleExtractor = ComputedStyleExtractor(&styledElement);
auto inlineStyle = styledElement.document().createCSSStyleDeclaration();
inlineStyle->setCssText(styledElement.getAttribute("style"));
@@ -1471,7 +1480,7 @@
// We actually perform those steps in a different way: instead of building a copy of the effect stack and then removing stuff, we iterate through the
// effect stack and stop when we've found this animation's effect or when we've found an effect associated with an animation with a higher composite order.
- auto animatedStyle = RenderStyle::clonePtr(style);
+ auto animatedStyle = RenderStyle::clonePtr(unanimatedStyle);
for (const auto& effectInStack : keyframeStack.sortedEffects()) {
if (effectInStack->animation() != this && !compareAnimationsByCompositeOrder(*effectInStack->animation(), *this))
break;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes