[webkit-changes] [WebKit/WebKit] 177e6f: [IFC][Ruby] Annotation overhanging fails in vertic...

Alan Baradlay noreply at github.com
Sun Jan 21 16:47:19 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 177e6f3ab066050fef14341f3b1939ffe9ddd31a
      https://github.com/WebKit/WebKit/commit/177e6f3ab066050fef14341f3b1939ffe9ddd31a
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2024-01-21 (Sun, 21 Jan 2024)

  Changed paths:
    A LayoutTests/fast/ruby/simple-overhang-vertical-lr-expected.html
    A LayoutTests/fast/ruby/simple-overhang-vertical-lr.html
    M Source/WebCore/layout/formattingContexts/inline/InlineRect.h
    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] Annotation overhanging fails in vertical-lr mode
https://bugs.webkit.org/show_bug.cgi?id=267821

Reviewed by Antti Koivisto.

1. Input rectangles to overlap checking should share the same coordinate system.
2. However it does not have to be the final visual rect.

Let's use the display box's native coordinate system (before flipping) to check whether annotation can overlap adjacent content.

* LayoutTests/fast/ruby/simple-overhang-vertical-lr-expected.html: Added.
* LayoutTests/fast/ruby/simple-overhang-vertical-lr.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineRect.h:
(WebCore::Layout::InlineRect::intersects):
* Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::applyRubyOverhang):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::annotationMarginBoxVisualRect):
(WebCore::Layout::annotationOverlapCheck):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationBefore):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationAfter):
(WebCore::Layout::visualRectIncludingBlockDirection): Deleted.
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:

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




More information about the webkit-changes mailing list