[webkit-changes] [WebKit/WebKit] 946f15: [IFC] TextUtil::breakWord should return the "left ...

Alan Baradlay noreply at github.com
Fri Dec 9 19:05:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 946f15d63e7b5ede97f89fe5260282d8829e1551
      https://github.com/WebKit/WebKit/commit/946f15d63e7b5ede97f89fe5260282d8829e1551
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2022-12-09 (Fri, 09 Dec 2022)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/fast/text/line-clamp-truncation-assert-expected.html
    A LayoutTests/fast/text/line-clamp-truncation-assert.html
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp

  Log Message:
  -----------
  [IFC] TextUtil::breakWord should return the "left side" when the content fits unexpectedly
https://bugs.webkit.org/show_bug.cgi?id=249030

Reviewed by Antti Koivisto.

TextUtil::breakWord is called when the content does not fit the available space and we
need to find a valid breaking position inside the content.
However in some unexpected cases (due to text measuring bugs) the content may fit.
In such cases we should just return the entire content instead of an empty one.
While it still asserts in debug, it would produce correct layout in release (minus the impact of the text measuring bug).

* LayoutTests/TestExpectations:
* LayoutTests/fast/text/line-clamp-truncation-assert-expected.html: Added.
* LayoutTests/fast/text/line-clamp-truncation-assert.html: Added.
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::breakWord):

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




More information about the webkit-changes mailing list