[webkit-changes] [WebKit/WebKit] b28ede: [@starting-style] Use starting style as before-cha...
Antti Koivisto
noreply at github.com
Tue Jan 30 04:23:17 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b28edead7c0c1615e7f7f934c475245e61742fe7
https://github.com/WebKit/WebKit/commit/b28edead7c0c1615e7f7f934c475245e61742fe7
Author: Antti Koivisto <antti at apple.com>
Date: 2024-01-30 (Tue, 30 Jan 2024)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-starting-style-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-cascade-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-rule-basic-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-rule-pseudo-elements-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-size-container-expected.txt
M Source/WebCore/style/ElementRuleCollector.cpp
M Source/WebCore/style/MatchResult.h
M Source/WebCore/style/PropertyCascade.cpp
M Source/WebCore/style/PropertyCascade.h
M Source/WebCore/style/StyleBuilder.h
M Source/WebCore/style/StyleResolver.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleTreeResolver.h
M Source/WebCore/style/Styleable.cpp
Log Message:
-----------
[@starting-style] Use starting style as before-change style for animations
https://bugs.webkit.org/show_bug.cgi?id=268285
rdar://121844935
Reviewed by Darin Adler and Matthieu Dubet.
Compute the starting style if needed and use it.
https://drafts.csswg.org/css-transitions-2/#at-ruledef-starting-style
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/scope-starting-style-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-cascade-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-rule-basic-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-rule-pseudo-elements-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-transitions/starting-style-size-container-expected.txt:
* Source/WebCore/style/ElementRuleCollector.cpp:
(WebCore::Style::ElementRuleCollector::addMatchedProperties):
* Source/WebCore/style/MatchResult.h:
Track if MatchResult contains any starting style rules for quick testing.
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
Try to compute a starting style if we don't have an existing before-change style.
(WebCore::Style::TreeResolver::resolveStartingStyle const):
Resolve the starting style by re-applying the matched properties with @starting-style rules enabled.
* Source/WebCore/style/StyleTreeResolver.h:
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::cancelStyleOriginatedAnimations const):
Take care to also clear the lastStyleChangeEventStyle when canceling animations.
Canonical link: https://commits.webkit.org/273734@main
More information about the webkit-changes
mailing list