Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 30149e8b4dfff0285836b72d9316dcf0375deed3
https://github.com/WebKit/WebKit/commit/30149e8b4dfff0285836b72d9316dcf0375deed3
Author: Alan Baradlay <[email protected]>
Date: 2026-03-10 (Tue, 10 Mar 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.h
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:
-----------
[cleanup] InlineDisplayContentBuilder::processRubyContent should not expand
the display box list
https://bugs.webkit.org/show_bug.cgi?id=309452
Reviewed by Antti Koivisto.
Decoupling the mutating part (insertRubyAnnotationBoxes) from the no-mutating
ruby handling (processRubyContent) allows us to use std::span to ensure
constness.
1. Rename insertRubyAnnotationBox to insertRubyAnnotationBoxes and let it
insert _all_
annotation boxes at once.
2. processRubyBase now only collects the (annotation box) insertion points.
3. Use std::span<InlineDisplay:Box> in ruby functions.
* Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.cpp:
(WebCore::Layout::expandInlineBoxWithDescendants):
(WebCore::Layout::shiftRubyBaseContentByAlignmentOffset):
(WebCore::Layout::InlineContentAligner::applyRubyBaseAlignmentOffset):
(WebCore::Layout::InlineContentAligner::applyRubyAnnotationAlignmentOffset):
* Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.h:
*
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::build):
(WebCore::Layout::InlineDisplayContentBuilder::insertRubyAnnotationBoxes):
(WebCore::Layout::InlineDisplayContentBuilder::processRubyBase):
(WebCore::Layout::InlineDisplayContentBuilder::processRubyContent):
(WebCore::Layout::InlineDisplayContentBuilder::insertRubyAnnotationBox):
Deleted.
*
Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayContentBuilder.h:
*
Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.cpp:
(WebCore::Layout::baseContentIndex):
(WebCore::Layout::RubyFormattingContext::applyAlignmentOffsetList):
(WebCore::Layout::RubyFormattingContext::applyAnnotationAlignmentOffset):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationBefore):
(WebCore::Layout::RubyFormattingContext::overhangForAnnotationAfter):
(WebCore::Layout::RubyFormattingContext::applyRubyOverhang):
* Source/WebCore/layout/formattingContexts/inline/ruby/RubyFormattingContext.h:
Canonical link: https://commits.webkit.org/308990@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications