[webkit-changes] [WebKit/WebKit] 9709f5: [IFC][Ruby] Use the base inline box's end to push ...

Alan Baradlay noreply at github.com
Sat Oct 7 05:37:23 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9709f5c78a15a0ae1e723096557a6a060822d868
      https://github.com/WebKit/WebKit/commit/9709f5c78a15a0ae1e723096557a6a060822d868
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-10-07 (Sat, 07 Oct 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h

  Log Message:
  -----------
  [IFC][Ruby] Use the base inline box's end to push content off of ruby column
https://bugs.webkit.org/show_bug.cgi?id=262809

Reviewed by Antti Koivisto.

Runs on the line are placed after each other. Spacing between runs can be formed by
either expanding runs or introducing "fake" end margins in-between.
With "ruby-align: space around", the trailing base run may not be adjacent to the run
_after_ the base (i.e. visual gap between the base and the neighboring content)

Instead of expanding the trailing content run, let's add spacing at the end side of the base
inline box. This helps with overlap checking too at the annotation overhanging phase as
inflated _content_ runs prevent us from pulling neighboring content into the ruby column.

* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::RubyFormattingContext::placeRubyContent):
(WebCore::Layout::RubyFormattingContext::layoutRubyBaseInlineAxis):
(WebCore::Layout::RubyFormattingContext::applyRubyAlign):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:

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




More information about the webkit-changes mailing list