8000 [css-transitions] `transition-property: all` does not apply to custom properties by graouts · Pull Request #10142 · WebKit/WebKit · GitHub
[go: up one dir, main page]

Skip to content

Conversation

graouts
Copy link
Contributor
@graouts graouts commented Feb 15, 2023

fcdce8f

[css-transitions] `transition-property: all` does not apply to custom properties
https://bugs.webkit.org/show_bug.cgi?id=252312

Reviewed by Antti Koivisto.

When setting `transition-property: all`, which also happens to be that property's initial value,
we would correctly consider all properties known within WebCore as a CSSPropertyID, but we would
fail to consider registered custom properties that could otherwise be interpolated.

We now iterate through all custom properties in both the before-change and after-change styles
to gather custom properties that can be interpolated (ie. either a SyntaxValue or SyntaxValueList)
and run the transition update logic on those.

* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/resources/utils.js:
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::updateCSSTransitions const):

Canonical link: https://commits.webkit.org/260384@main

faaa468

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

@graouts graouts self-assigned this Feb 15, 2023
@graouts graouts added the Animations Bugs related to CSS + SVG animations and transitions label Feb 15, 2023
@graouts graouts requested a review from anttijk February 15, 2023 16:00
Comment on lines 678 to 694
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should test with RenderStyle::customPropertiesEqual before doing all this work.

Copy link
Contributor Author
@graouts graouts Feb 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rules for whether a property will yield to a transition update are complex and encapsulated in updateCSSTransitionsForStyleableAndProperty(). Even though two custom properties could have the same value, some transition properties could yield an update, for instance if the transition-duration changes in flight. I don't think we want to bring up any of the complicity of updateCSSTransitionsForStyleableAndProperty() up to here.

@graouts graouts force-pushed the transition-all-custom-properties branch from f16a492 to 5580a54 Compare February 16, 2023 14:12
@graouts graouts force-pushed the transition-all-custom-properties branch from 5580a54 to 2b94908 Compare February 16, 2023 14:57
@graouts graouts force-pushed the transition-all-custom-properties branch 2 times, most recently from a38328f to 390ec99 Compare February 16, 2023 14:59
@graouts graouts force-pushed the transition-all-custom-properties branch from 390ec99 to faaa468 Compare February 16, 2023 19:08
@graouts graouts added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Feb 16, 2023
… properties

https://bugs.webkit.org/show_bug.cgi?id=252312

Reviewed by Antti Koivisto.

When setting `transition-property: all`, which also happens to be that property's initial value,
we would correctly consider all properties known within WebCore as a CSSPropertyID, but we would
fail to consider registered custom properties that could otherwise be interpolated.

We now iterate through all custom properties in both the before-change and after-change styles
to gather custom properties that can be interpolated (ie. either a SyntaxValue or SyntaxValueList)
and run the transition update logic on those.

* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/animation/custom-property-transition-property-all.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/resources/utils.js:
* Source/WebCore/style/Styleable.cpp:
(WebCore::Styleable::updateCSSTransitions const):

Canonical link: https://commits.webkit.org/260384@main
@webkit-early-warning-system webkit-early-warning-system force-pushed the transition-all-custom-properties branch from faaa468 to fcdce8f Compare February 16, 2023 19:13
@webkit-commit-queue
Copy link
Collaborator

Committed 260384@main (fcdce8f): https://commits.webkit.org/260384@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit fcdce8f into WebKit:main Feb 16, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Feb 16, 2023
@graouts graouts deleted the transition-all-custom-properties branch February 16, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Animations Bugs related to CSS + SVG animations and transitions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0