Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8e06611bad266d7b09a6fa818bf0fd4b04865018
      
https://github.com/WebKit/WebKit/commit/8e06611bad266d7b09a6fa818bf0fd4b04865018
  Author: Alan Baradlay <[email protected]>
  Date:   2024-04-03 (Wed, 03 Apr 2024)

  Changed paths:
    A LayoutTests/fast/text/negative-hyphen-width-with-break-word-expected.txt
    A LayoutTests/fast/text/negative-hyphen-width-with-break-word.html
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp
    M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp

  Log Message:
  -----------
  [IFC] Negative hyphen width triggers ASSERT in TextUtil::breakWord
https://bugs.webkit.org/show_bug.cgi?id=272011
<rdar://125726764>

Reviewed by Antti Koivisto.

When negative letter-spacing produces negative hyphen width, we think there's 
some actual
available space for content (subtracting a negative value) which confuses 
TextUtil::breakWord logic.

This patch ensures we never inflate horizontal available space.

* LayoutTests/fast/text/negative-hyphen-width-with-break-word-expected.txt: 
Added.
* LayoutTests/fast/text/negative-hyphen-width-with-break-word.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::InlineContentBreaker::tryHyphenationAcrossOverflowingInlineTextItems
 const):
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::breakWord):

Canonical link: https://commits.webkit.org/276999@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