Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 00b5523c0608d6f8c6fb93ad3432f2602b9ba5a4
      
https://github.com/WebKit/WebKit/commit/00b5523c0608d6f8c6fb93ad3432f2602b9ba5a4
  Author: Alan Baradlay <[email protected]>
  Date:   2025-02-19 (Wed, 19 Feb 2025)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp

  Log Message:
  -----------
  [IFC] TextUtil::breakWord should be able to guesstimate where the arbitrary 
breaking position is
https://bugs.webkit.org/show_bug.cgi?id=287961

Reviewed by Antti Koivisto.

TextUtil::breakWord is called whenever we are allowed to break at arbitrary 
position within the inline text context
(e.g. word-break: break-word or clamping the content with text-overflow: 
ellipsis).
Let's try to estimate the breaking position by using the average character 
width of the incoming content (not the average width in general)
and look left/right depending on whether we under/overestimated the position. 
Fallback to bisection if we failed to guesstimate.

* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::breakWord):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to