[webkit-changes] [WebKit/WebKit] 221eb1: [web-animations] line-height should not transition...
Antoine Quint
noreply at github.com
Wed Feb 8 12:34:12 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 221eb1d58b670526e0c7dc3249167a9eef1175dc
https://github.com/WebKit/WebKit/commit/221eb1d58b670526e0c7dc3249167a9eef1175dc
Author: Antoine Quint <graouts at webkit.org>
Date: 2023-02-08 (Wed, 08 Feb 2023)
Changed paths:
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-list.js
M LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-types.js
M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt
M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt
M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt
M Source/WebCore/animation/CSSPropertyAnimation.cpp
Log Message:
-----------
[web-animations] line-height should not transition from default value to a number
https://bugs.webkit.org/show_bug.cgi?id=251911
rdar://104346766
Reviewed by Antti Koivisto.
By default, properties represented by a Length in RenderStyle use discrete interpolation when
their LengthType differs. In the case of line-height, BuilderConverter::convertLineHeight() yields:
- LengthType::Percent for the "normal" CSS value (with -100 as the float value),
- LengthType::Percent for <number> CSS values,
- LengthType::Fixed for <length-percentage> values.
This means that animating between "normal" and <number> would use an interpolation because we would
see two LengthType::Percent values.
To deal with this, we now have a dedicated animation wrapper for "line-height" which detects "normal"
values and returns false if either the from or to value can be mapped back to "normal".
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-list.js:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/property-types.js:
(const.discreteType.testInterpolation):
(const.discreteType.testAdditionOrAccumulation):
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-002-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
Canonical link: https://commits.webkit.org/260028@main
More information about the webkit-changes
mailing list