Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 867fce02ad079d2aa519f5019b70ccaddb36be2e
      
https://github.com/WebKit/WebKit/commit/867fce02ad079d2aa519f5019b70ccaddb36be2e
  Author: Alan Baradlay <[email protected]>
  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/ruby/RubyFormattingContext.cpp
    M 
Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h

  Log Message:
  -----------
  [IFC][Ruby] Implement overhangForAnnotationBefore/overhangForAnnotationAfter
https://bugs.webkit.org/show_bug.cgi?id=261900

Reviewed by Antti Koivisto.

This patch implements "ruby-overhang: auto" by looking at neighboring boxes and 
shifting display boxes on the line (and the annotation box) when
applicable.

https://drafts.csswg.org/css-ruby/#ruby-overhang
...
if a ruby annotation container is allowed to overhang, neighboring content may 
overlap the ruby container box,
allowing its ruby annotation(s) to partially render over/under surrounding 
inline-level content.
Overhang is only allowed to the extent that it does not cause collisions 
between the neighboring content
and the ruby container’s annotation boxes or its overlapped base’s contents
...

* 
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::applyRubyOverhang const):
* 
Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::halfOfAFullWidthCharacter):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationBefore):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationAfter):
(WebCore::Layout::RubyFormattingContext::annotationOverlapCheck const):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:

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


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

Reply via email to