[webkit-changes] [WebKit/WebKit] 010d54: [IFC][Ruby] Make space for inter-character annotat...

Alan Baradlay noreply at github.com
Tue Sep 26 08:14:39 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 010d54dac7fca44ac63dc3f0ba063b93313478c3
      https://github.com/WebKit/WebKit/commit/010d54dac7fca44ac63dc3f0ba063b93313478c3
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-09-26 (Tue, 26 Sep 2023)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp
    M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h
    M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp
    M Source/WebCore/layout/layouttree/LayoutBox.cpp
    M Source/WebCore/layout/layouttree/LayoutBox.h

  Log Message:
  -----------
  [IFC][Ruby] Make space for inter-character annotation in inline direction
https://bugs.webkit.org/show_bug.cgi?id=262072

Reviewed by Antti Koivisto.

Let inter-character inline-blocks participate in ruby inline axis layout.

Inter-character ruby annotation boxes are spliced into and measured as part of
the layout of the base level. Each ruby annotation is inserted to the right of the ruby base
it is paired with. Inter-character ruby annotations are laid out exactly like inline blocks....

https://drafts.csswg.org/css-ruby/#inter-character-layout

* Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::collectInlineItems):
(WebCore::Layout::InlineItemsBuilder::handleInlineLevelBox):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::isInterlinearAnnotationBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::handleInlineBoxEnd):
(WebCore::Layout::InlineDisplayContentBuilder::appendAssociatedRubyAnnotationBoxIfNeeded):
(WebCore::Layout::InlineDisplayContentBuilder::applyRubyOverhang const):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::isInterlinearAnnotation):
(WebCore::Layout::RubyFormattingContext::placeRubyContent):
(WebCore::Layout::RubyFormattingContext::annotationPosition):
(WebCore::Layout::RubyFormattingContext::annotationVerticalExtent):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationBefore):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationAfter):
(WebCore::Layout::RubyFormattingContext::logicaWidthForRubyRange const):
* Source/WebCore/layout/layouttree/LayoutBox.cpp:
(WebCore::Layout::Box::isInlineLevelBox const):
(WebCore::Layout::Box::isInterlinearRubyAnnotationBox const):
* Source/WebCore/layout/layouttree/LayoutBox.h:

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




More information about the webkit-changes mailing list