[webkit-changes] [WebKit/WebKit] d9a24b: [IFC][Ruby] Add skeleton implementation for ruby o...

Alan Baradlay noreply at github.com
Fri Sep 22 09:28:27 PDT 2023


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

  Changed paths:
    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/formattingContexts/inline/ruby/RubyFormattingContext.h

  Log Message:
  -----------
  [IFC][Ruby] Add skeleton implementation for ruby overhang
https://bugs.webkit.org/show_bug.cgi?id=261857

Reviewed by Antti Koivisto.

Ruby overhang lets the non-overlapping annotation box overhang adjacent inline content on the line (before/after).
1. Collect base start/end(last content box) display boxes
2. Consult RubyFormattingContext for overhang value(s)
3. Adjust display box horizontal position as needed

* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::appendInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::appendSpanningInlineBoxDisplayBox):
(WebCore::Layout::InlineDisplayContentBuilder::handleInlineBoxEnd):
(WebCore::Layout::InlineDisplayContentBuilder::processNonBidiContent):
(WebCore::Layout::InlineDisplayContentBuilder::applyRubyOverhang const):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationBefore):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationAfter):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:

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




More information about the webkit-changes mailing list