Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: b28edead7c0c1615e7f7f934c475245e61742fe7 https://github.com/WebKit/WebKit/commit/b28edead7c0c1615e7f7f934c475245e61742fe7 Author: Antti Koivisto <an...@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 _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes