[webkit-changes] [WebKit/WebKit] 69607a: [IFC][Ruby] Inline content (ruby) should just use ...

Alan Baradlay noreply at github.com
Wed Oct 30 06:06:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 69607a10804f7ea69561843c3e59c9311dcad15b
      https://github.com/WebKit/WebKit/commit/69607a10804f7ea69561843c3e59c9311dcad15b
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-10-30 (Wed, 30 Oct 2024)

  Changed paths:
    M LayoutTests/fast/ruby/breaking-opportunity-between-bases-expected.html
    M LayoutTests/fast/ruby/overhang-horizontal-expected.txt
    M LayoutTests/fast/ruby/overhang-horizontal.html
    M LayoutTests/fast/ruby/overhang-vertical-expected.txt
    M LayoutTests/fast/ruby/overhang-vertical-mixed-expected.txt
    M LayoutTests/fast/ruby/overhang-vertical-mixed.html
    M LayoutTests/fast/ruby/overhang-vertical.html
    M LayoutTests/fast/ruby/ruby-with-unbreakable-characters-incorrect-width-expected.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-ruby/line-break-around-ruby-001-expected.txt
    M LayoutTests/platform/mac/fast/ruby/ruby-run-break-expected.txt
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h

  Log Message:
  -----------
  [IFC][Ruby] Inline content (ruby) should just use regular inline soft-wrap-opportunity rules
https://bugs.webkit.org/show_bug.cgi?id=282283

Reviewed by Antti Koivisto.

Let's remove this legacy behavior and use regular inline content rules when computing
soft wrap opportunities. It mostly changes behavior (progression) for
ruby (and ruby base) with adjacent text content with no whitespace in-between. In such cases
now we look at the content as if it was one continuous flow of text and use ICU to decide
whether there's a breaking positing in there. This helps content (mostly CJK) with special line breaking rules.

* LayoutTests/fast/ruby/breaking-opportunity-between-bases-expected.html:
* LayoutTests/fast/ruby/overhang-horizontal-expected.txt:
* LayoutTests/fast/ruby/overhang-horizontal.html:
* LayoutTests/fast/ruby/overhang-vertical-expected.txt:
* LayoutTests/fast/ruby/overhang-vertical-mixed-expected.txt:
* LayoutTests/fast/ruby/overhang-vertical-mixed.html:
* LayoutTests/fast/ruby/overhang-vertical.html:
* LayoutTests/fast/ruby/ruby-with-unbreakable-characters-incorrect-width-expected.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-ruby/line-break-around-ruby-001-expected.txt:
* LayoutTests/platform/mac/fast/ruby/ruby-run-break-expected.txt:
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp:
(WebCore::Layout::InlineFormattingUtils::isAtSoftWrapOpportunity const):
(WebCore::Layout::InlineFormattingUtils::nextWrapOpportunity const):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::canBreakBefore): Deleted.
(WebCore::Layout::canBreakAfter): Deleted.
(WebCore::Layout::RubyFormattingContext::isAtSoftWrapOpportunity): Deleted.
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:

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