[webkit-changes] [WebKit/WebKit] af0cc1: SVGLengthValue::fromCSSPrimitiveValue() doesn't ha...

Antoine Quint noreply at github.com
Fri Feb 3 13:37:59 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: af0cc1eb786affd266fb29a6ebfe02718e7086d7
      https://github.com/WebKit/WebKit/commit/af0cc1eb786affd266fb29a6ebfe02718e7086d7
  Author: Antoine Quint <graouts at webkit.org>
  Date:   2023-02-03 (Fri, 03 Feb 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/svg/painting/parsing/stroke-dasharray-computed-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/strokeDasharray-expected.txt
    M LayoutTests/svg/css/scientific-numbers-expected.txt
    M LayoutTests/svg/css/scientific-numbers.html
    M Source/WebCore/style/StyleBuilderConverter.h
    M Source/WebCore/style/StyleBuilderCustom.h
    M Source/WebCore/svg/SVGLengthValue.cpp
    M Source/WebCore/svg/SVGLengthValue.h

  Log Message:
  -----------
  SVGLengthValue::fromCSSPrimitiveValue() doesn't have enough context to resolve font-relative units
https://bugs.webkit.org/show_bug.cgi?id=204826

Reviewed by Antti Koivisto.

Pass a CSSToLengthConversionData argument to SVGLengthValue::fromCSSPrimitiveValue() such that we
may call computeLength() on the provided primitive value to resolve font-relative units.

This also changes the behavior of baseline-shift which now accounts for ex units, so
adjusting the relevant test to include a font to have reliable measurements across platforms
and a new expected value.

* LayoutTests/imported/w3c/web-platform-tests/svg/painting/parsing/stroke-dasharray-computed-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/web-animations/responsive/strokeDasharray-expected.txt:
* LayoutTests/svg/css/scientific-numbers-expected.txt:
* LayoutTests/svg/css/scientific-numbers.html:
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertSVGLengthValue):
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::BuilderCustom::applyValueBaselineShift):
* Source/WebCore/svg/SVGLengthValue.cpp:
(WebCore::SVGLengthValue::fromCSSPrimitiveValue):
* Source/WebCore/svg/SVGLengthValue.h:

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




More information about the webkit-changes mailing list