[webkit-changes] [WebKit/WebKit] b896a1: [SVG] Consult white-space-collapse instead of whit...

Tim Nguyen noreply at github.com
Thu Jun 22 19:58:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b896a1bccc8b7629ed7308db6fa183e159283b45
      https://github.com/WebKit/WebKit/commit/b896a1bccc8b7629ed7308db6fa183e159283b45
  Author: Tim Nguyen <ntim at apple.com>
  Date:   2023-06-22 (Thu, 22 Jun 2023)

  Changed paths:
    M Source/WebCore/rendering/svg/RenderSVGInlineText.cpp
    M Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
    M Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp
    M Source/WebCore/svg/SVGTextContentElement.cpp

  Log Message:
  -----------
  [SVG] Consult white-space-collapse instead of white-space to determine preserving white-space
https://bugs.webkit.org/show_bug.cgi?id=258426
rdar://111190906

Reviewed by Simon Fraser.

Now that the white-space-collapse longhand exists, it should be used for consulting white-space preservation, text-wrap is not taken in
account given SVG white space processing (applySVGWhitespaceRules) is unrelated to wrapping.

As a result, white-space: pre-wrap & white-space: preserve balance/pretty/stable will now behave like white-space: pre; for SVG white space
processing.

* Source/WebCore/rendering/svg/RenderSVGInlineText.cpp:
(WebCore::RenderSVGInlineText::styleDidChange):
* Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::processRenderSVGInlineText):
* Source/WebCore/rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::measureTextRenderer):
* Source/WebCore/svg/SVGTextContentElement.cpp:
(WebCore::SVGTextContentElement::collectPresentationalHintsForAttribute):

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




More information about the webkit-changes mailing list