Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6744dbe545664327777a5b27b2a160cabaa29238
      
https://github.com/WebKit/WebKit/commit/6744dbe545664327777a5b27b2a160cabaa29238
  Author: Sean Patterson <[email protected]>
  Date:   2026-08-16 (Sun, 16 Aug 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/svg/text/dominant-baseline.historical-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/svg/text/dominant-baseline.historical.html
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/SVGCSSValueKeywords.in
    M Source/WebCore/rendering/style/RenderStyleConstants.cpp
    M Source/WebCore/rendering/style/RenderStyleConstants.h
    M Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp
    M Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h

  Log Message:
  -----------
  [SVG2] Remove use-script, no-change and reset-size from dominant-baseline
https://bugs.webkit.org/show_bug.cgi?id=311552
rdar://174635806

Reviewed by Nikolas Zimmermann.

SVG 2 no longer supports the use-script, no-change and reset-size values of
dominant-baseline [1], and they are absent from the css-inline-3 grammar that
now defines the property [2].

All three were already close to no-ops in WebKit: use-script mapped to
alphabetic behind a FIXME, while no-change and reset-size deferred to the
parent element's dominant baseline, which resolves to alphabetic for
horizontal text. Removing them lets the values fall back to auto, which maps
to alphabetic in horizontal writing modes and central in vertical ones, so
there is no rendering change for the cases these values previously covered.

svg/custom/dominant-baseline-modes.svg and 
svg/custom/alignment-baseline-modes.svg
continue to specify the three values, which now fall back to auto; their
results are unchanged for the reason above.

Note that WebKit still spells the two edge baselines with their SVG 1.1 names,
text-before-edge and text-after-edge. css-inline-3 renames those to text-top
and text-bottom and keeps the SVG spellings only as legacy aliases [3], and
WebKit does not yet accept the css-inline-3 names. That gap is orthogonal to
this patch, which only removes values; it is tracked separately in
webkit.org/b/321612.

[1] https://w3c.github.io/svgwg/svg2-draft/text.html#DominantBaselineProperty
[2] https://drafts.csswg.org/css-inline-3/#propdef-dominant-baseline
[3] https://drafts.csswg.org/css-inline/#alignment-baseline-svg-legacy

Test: imported/w3c/web-platform-tests/svg/text/dominant-baseline.historical.html

* 
LayoutTests/imported/w3c/web-platform-tests/svg/text/dominant-baseline.historical-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/svg/text/dominant-baseline.historical.html:
 Added.
* LayoutTests/svg/css/dominant-baseline-legacy-values-expected.txt: Removed.
* LayoutTests/svg/css/dominant-baseline-legacy-values.html: Removed.
* Source/WebCore/css/CSSProperties.json: Also point the specification URL at 
SVG 2.
* Source/WebCore/css/SVGCSSValueKeywords.in:
* Source/WebCore/rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* Source/WebCore/rendering/style/RenderStyleConstants.h:
* Source/WebCore/rendering/svg/SVGTextLayoutEngineBaseline.cpp:
(WebCore::SVGTextLayoutEngineBaseline::dominantBaselineToAlignmentBaseline 
const):
* Source/WebCore/style/values/primitives/StyleKeyword+Mappings.h:

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



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

Reply via email to