Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 19c64d9bd82280614cc3d445f6c2bc4704b64fb4
      
https://github.com/WebKit/WebKit/commit/19c64d9bd82280614cc3d445f6c2bc4704b64fb4
  Author: Alan Baradlay <[email protected]>
  Date:   2023-12-05 (Tue, 05 Dec 2023)

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

  Log Message:
  -----------
  [IFC][Ruby] Nested rubies with interlinear annotations pushes their 
ancestors' interlinear annotations vertically
https://bugs.webkit.org/show_bug.cgi?id=265881

Reviewed by Antti Koivisto.

<ruby>base<ruby>nested base<rt>nested annotation</rt></ruby><rt>annotation</rt>

Outer ruby's annotation should be placed above the inner ruby (including 
annotation) to avoid overlapping.

Normally inline boxes don't get stretched by their content so the inner ruby 
does not
make the other ruby's margin box taller.
However in order to avoid annotation overlapping, rubies need to be special 
cased where the nested
ruby's annotation pushes ancestor annotations vertically.

Let's move annotation placement _after_ finishing with child ruby handling and 
adjust (but not set) the candidate rect with
the descendant annotations for RubyFormattingContext::placeAnnotationBox.

* 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::processRubyBase):
* 
Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::RubyFormattingContext::placeAnnotationBox):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to