[webkit-changes] [WebKit/WebKit] a5a8f7: [IFC][Ruby] Simplify annotation and base overlap c...
Alan Baradlay
noreply at github.com
Tue Dec 5 06:32:15 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a5a8f71654550fe4d0fccb73a169ab5f58cdd0e3
https://github.com/WebKit/WebKit/commit/a5a8f71654550fe4d0fccb73a169ab5f58cdd0e3
Author: Alan Baradlay <zalan at apple.com>
Date: 2023-12-05 (Tue, 05 Dec 2023)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h
Log Message:
-----------
[IFC][Ruby] Simplify annotation and base overlap checking
https://bugs.webkit.org/show_bug.cgi?id=265771
Reviewed by Antti Koivisto.
Instead of traversing away from annotation/base to find overlapping content, let's travers towards until we find one
(or hit the base box). This simplifies logic when dealing with nested inline boxes (vs. non-nested ones).
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(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/271547@main
More information about the webkit-changes
mailing list