[webkit-changes] [WebKit/WebKit] 09aacb: [IFC] Incorrect line breaking when hyphen candidat...

Alan Baradlay noreply at github.com
Wed Sep 11 20:39:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 09aacb0549cee1a8b00ade9e711535e614d8419c
      https://github.com/WebKit/WebKit/commit/09aacb0549cee1a8b00ade9e711535e614d8419c
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-09-11 (Wed, 11 Sep 2024)

  Changed paths:
    A LayoutTests/fast/inline/overflowing-content-with-hypens-expected.html
    A LayoutTests/fast/inline/overflowing-content-with-hypens.html
    M LayoutTests/fast/text/simple-line-layout-hyphen-limit-before-expected.html
    M LayoutTests/fast/text/simple-line-layout-hyphen-limit-lines-expected.html
    M LayoutTests/fast/text/simple-line-layout-hyphenation-constrains-expected.html
    M LayoutTests/fast/text/simple-line-layout-hyphenation-constrains.html
    M Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp

  Log Message:
  -----------
  [IFC] Incorrect line breaking when hyphen candidate position is _after_ overflow
https://bugs.webkit.org/show_bug.cgi?id=279486

Reviewed by Antti Koivisto.

Let's call
1. lastHyphenPosition when we are dealing with the non-overflowing runs (this is when we can't break the overflowing part of the content
and try to break runs _before_ the overflowing point). Since these runs are not overflowing, we should simply pick the last hyphenation position.
2. firstHyphenPosition when even the first hyphenation would produce overflowing content (e.g. minimum-content with computation)
3. hyphenPositionBefore when dealing with normal overflowing breaking (neither #1 nor #2)

* LayoutTests/fast/inline/overflowing-content-with-hypens-expected.html: Added.
* LayoutTests/fast/inline/overflowing-content-with-hypens.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineContentBreaker.cpp:
(WebCore::Layout::firstTextRunIndex):
(WebCore::Layout::InlineContentBreaker::processOverflowingContent const):
(WebCore::Layout::limitBeforeValue):
(WebCore::Layout::limitAfterValue):
(WebCore::Layout::hasEnoughContentForHyphenation):
(WebCore::Layout::firstHyphenPosition):
(WebCore::Layout::lastHyphenPosition):
(WebCore::Layout::hyphenPositionBefore):
(WebCore::Layout::InlineContentBreaker::tryBreakingTextRun const):
(WebCore::Layout::InlineContentBreaker::tryHyphenationAcrossOverflowingInlineTextItems const):
(WebCore::Layout::hyphenPosition): Deleted.

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list