[webkit-changes] [WebKit/WebKit] e55241: [SVG2] Add support for the 'lh' length type

Ahmad Saleem noreply at github.com
Sun Jan 5 13:42:05 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e552416b237a8358fc0acbeff8315263139be4a3
      https://github.com/WebKit/WebKit/commit/e552416b237a8358fc0acbeff8315263139be4a3
  Author: Ahmad Saleem <ahmad.saleem792+github at gmail.com>
  Date:   2025-01-05 (Sun, 05 Jan 2025)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-lh-expected.txt
    M Source/WebCore/svg/SVGLength.h
    M Source/WebCore/svg/SVGLengthContext.cpp
    M Source/WebCore/svg/SVGLengthContext.h
    M Source/WebCore/svg/SVGLengthValue.cpp
    M Source/WebCore/svg/SVGLengthValue.h

  Log Message:
  -----------
  [SVG2] Add support for the 'lh' length type
https://bugs.webkit.org/show_bug.cgi?id=285168
rdar://142068343

Reviewed by Darin Adler.

This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.

It adds support for `lh` (line-height) length type for SVGLength, similar to
other length types.

* Source/WebCore/svg/SVGLength.h:
(WebCore::SVGLength::unitType const):
* Source/WebCore/svg/SVGLengthContext.cpp:
(WebCore::SVGLengthContext::convertValueToUserUnits const):
(WebCore::SVGLengthContext::convertValueFromUserUnits const):
(WebCore::SVGLengthContext::convertValueFromUserUnitsToLh const):
(WebCore::SVGLengthContext::convertValueFromLhToUserUnits const):
* Source/WebCore/svg/SVGLengthContext.h:
* Source/WebCore/svg/SVGLengthValue.cpp:
(WebCore::lengthTypeToString):
(WebCore::parseLengthType):
(WebCore::primitiveTypeToLengthType):
(WebCore::lengthTypeToPrimitiveType):
* Source/WebCore/svg/SVGLengthValue.h:
* LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGLength-lh-expected.txt: Rebaselined

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list