Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 00af18f3806bce0e60e24978fd354f1fe622d481
      
https://github.com/WebKit/WebKit/commit/00af18f3806bce0e60e24978fd354f1fe622d481
  Author: Karl Dubost <[email protected]>
  Date:   2026-06-24 (Wed, 24 Jun 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/svg/text/scripted/getrotationofchar-expected.txt
    M Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp

  Log Message:
  -----------
  SVG `<textPath>` discards the per-character `rotate` attribute
https://bugs.webkit.org/show_bug.cgi?id=315192
rdar://178044478

Reviewed by Taher Ali.

When a <text rotate="…"> contained a <textPath>, the per-character
supplemental rotation was silently discarded: the path-tangent angle
overwrote the rotate-attribute value already accumulated in `angle`,
so getRotationOfChar() reported only the path tangent and rendered
glyphs missed their per-character offset.

SVG 2 §11.2.1 (rotate attribute on <text>/<tspan>) requires that "this
supplemental rotation [...] is supplemental to any rotation due to text
on a path and to text-orientation, glyph-orientation-horizontal, or
glyph-orientation-vertical".
https://w3c.github.io/svgwg/svg2-draft/text.html#TextElementRotateAttribute

Flips 5 subtests of svg/text/scripted/getrotationofchar.html from FAIL
to PASS:
- <textPath> - horizontal-tb     (r: 45 -> 70)
- <textPath> - vertical-rl       (r: 45 -> 70)
- <textPath> - vertical-lr       (r: 45 -> 70)
- <textPath> - sideways-rl       (r: 45 -> 70)
- <textPath> - sideways-lr       (r: 225 -> 250)

* 
LayoutTests/imported/w3c/web-platform-tests/svg/text/scripted/getrotationofchar-expected.txt:
 Progression
* Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):

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



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

Reply via email to