[webkit-changes] [WebKit/WebKit] 79238b: REGRESSION(264666 at main): Layout of the <tspan> ele...

Nikolas Zimmermann noreply at github.com
Wed Dec 13 11:41:36 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 79238bc8e2d67087ed83ed550931b4c76964aa2a
      https://github.com/WebKit/WebKit/commit/79238bc8e2d67087ed83ed550931b4c76964aa2a
  Author: Nikolas Zimmermann <nzimmermann at igalia.com>
  Date:   2023-12-13 (Wed, 13 Dec 2023)

  Changed paths:
    A LayoutTests/platform/glib/svg/text/textLength-tspan-in-textPath-expected.txt
    A LayoutTests/platform/ios/svg/text/textLength-tspan-in-textPath-expected.txt
    A LayoutTests/platform/mac/svg/text/textLength-tspan-in-textPath-expected.png
    A LayoutTests/platform/mac/svg/text/textLength-tspan-in-textPath-expected.txt
    A LayoutTests/svg/text/textLength-tspan-in-textPath.html
    M Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp

  Log Message:
  -----------
  REGRESSION(264666 at main): Layout of the <tspan> elements inside a <textPath> is incorrect
https://bugs.webkit.org/show_bug.cgi?id=264184

Reviewed by Said Abou-Hallawa.

Revision 264666 at main broke <tspan textLength="..."> behavior on <textPath> elements.
The logic added to fix the intra-character spacing, wasn't intended for text path
layout, where each character by definition is placed in its own box. Fix the MDN
regression by disabling the new code paths for text-on-path layout.

Covered by new test in svg/text/textLength-tspan-in-textPath.html.

Unfortunately it's hard to make a cross-platform reftest, given the
nature of the kind of test, and the missing way to layout text along
a path in HTML/CSS.

* LayoutTests/platform/glib/svg/text/textLength-tspan-in-textPath-expected.txt: Added.
* LayoutTests/platform/ios/svg/text/textLength-tspan-in-textPath-expected.txt: Added.
* LayoutTests/platform/mac/svg/text/textLength-tspan-in-textPath-expected.png: Added.
* LayoutTests/platform/mac/svg/text/textLength-tspan-in-textPath-expected.txt: Added.
* LayoutTests/svg/text/textLength-tspan-in-textPath.html: Added.
* Source/WebCore/rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):

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




More information about the webkit-changes mailing list