Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[web-animations] baseline-shift animation is incorrect
https://bugs.webkit.org/show_bug.cgi?id=248178 Reviewed by Darin Adler. We fail the first subtest of the WPT test web-animations/responsive/baselineShift.html because we only do part of the work required to animate the baseline-shift property and also fail to return the correct computed value for it. The baseline-shift property can be a <length-percentage> or a keyword. The <length-percentage> is contained in SVGRenderStyle::baselineShiftValue() while the keyword is contained in SVGRenderStyle::baselineShift(). We create a dedicated animation wrapper that accounts for both of those methods. Now that SVGRenderStyle has the correct value for baselineShift() when blending, we must also ensure that we return a _computed_ value and not just serialize the value held in SVGRenderStyle::baselineShiftValue(). To that end, we change SVGLengthValue::toCSSPrimitiveValue() to convert the stored value using SVGLengthContext::convertValueToUserUnits() when provided an Element. We also change that method to not be static since its first parameter is an SVGLengthValue. * LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/baselineShift-expected.txt: * LayoutTests/svg/css/parse-calc-length-expected.txt: * LayoutTests/svg/css/parse-calc-length.html: * LayoutTests/svg/css/scientific-numbers-expected.txt: * LayoutTests/svg/css/scientific-numbers.html: * Source/WebCore/animation/CSSPropertyAnimation.cpp: (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): * Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp: (WebCore::strokeDashArrayToCSSValueList): (WebCore::ComputedStyleExtractor::svgPropertyValue): * Source/WebCore/svg/SVGLengthValue.cpp: (WebCore::SVGLengthValue::toCSSPrimitiveValue const): (WebCore::SVGLengthValue::toCSSPrimitiveValue): Deleted. * Source/WebCore/svg/SVGLengthValue.h: Canonical link: https://commits.webkit.org/256934@main
- Loading branch information
Showing
9 changed files
with
52 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL baselineShift responsive to style changes assert_equals: expected "80px" but got "baseline" | ||
FAIL baselineShift responsive to inherited changes assert_equals: expected "sub" but got "baseline" | ||
PASS baselineShift responsive to style changes | ||
FAIL baselineShift responsive to inherited changes assert_equals: expected "super" but got "sub" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters