Skip to content

[@starting-style] Use starting style as before-change style for animations - #23413

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
anttijk:starting-style-use
Jan 30, 2024
Merged

webkit-commit-queue merged 1 commit into
WebKit:mainfrom
anttijk:starting-style-use

Conversation

@anttijk

@anttijk anttijk commented Jan 29, 2024 •

Copy link
Copy Markdown
Contributor

b28edea

[@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

d840623

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe   🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug   🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
  🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv-sim
✅ 🛠 🧪 merge   🛠 watch
✅ 🛠 watch-sim

@anttijk anttijk self-assigned this Jan 29, 2024
@anttijk anttijk added the CSS Cascading Style Sheets implementation label Jan 29, 2024
@anttijk
anttijk force-pushed the starting-style-use branch from 333bb41 to 19fca19 Compare January 29, 2024 13:08
@webkit-early-warning-system

Copy link
Copy Markdown
Collaborator

Starting EWS tests for 19fca19. Live statuses available at the PR page, #23413

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 29, 2024
@anttijk anttijk removed the merging-blocked Applied to prevent a change from being merged label Jan 29, 2024
@anttijk
anttijk force-pushed the starting-style-use branch from 19fca19 to d9384bd Compare January 29, 2024 17:26
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jan 29, 2024
@anttijk anttijk removed the merging-blocked Applied to prevent a change from being merged label Jan 30, 2024
@anttijk
anttijk force-pushed the starting-style-use branch from d9384bd to d840623 Compare January 30, 2024 10:08
@anttijk anttijk added the merge-queue Applied to send a pull request to merge-queue label Jan 30, 2024
…tions

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-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 273734@main (b28edea): https://commits.webkit.org/273734@main

Reviewed commits have been landed. Closing PR #23413 and removing active labels.

@webkit-commit-queue
webkit-commit-queue merged commit b28edea into WebKit:main Jan 30, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jan 30, 2024
@anttijk
anttijk deleted the starting-style-use branch January 30, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CSS Cascading Style Sheets implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants