Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 50e415a29df2b2c9ca9541dedf0cbda6878b1f95
      
https://github.com/WebKit/WebKit/commit/50e415a29df2b2c9ca9541dedf0cbda6878b1f95
  Author: Antoine Quint <[email protected]>
  Date:   2022-11-22 (Tue, 22 Nov 2022)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/baselineShift-expected.txt
    M LayoutTests/svg/css/parse-calc-length-expected.txt
    M LayoutTests/svg/css/parse-calc-length.html
    M LayoutTests/svg/css/scientific-numbers-expected.txt
    M LayoutTests/svg/css/scientific-numbers.html
    M Source/WebCore/animation/CSSPropertyAnimation.cpp
    M Source/WebCore/css/SVGCSSComputedStyleDeclaration.cpp
    M Source/WebCore/svg/SVGLengthValue.cpp
    M Source/WebCore/svg/SVGLengthValue.h

  Log Message:
  -----------
  [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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to