Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9518e96ced9f5f2ba70d9e9b651ced426ebc2d8e
https://github.com/WebKit/WebKit/commit/9518e96ced9f5f2ba70d9e9b651ced426ebc2d8e
Author: Alan Baradlay <[email protected]>
Date: 2026-08-21 (Fri, 21 Aug 2026)
Changed paths:
M Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp
M Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp
M Source/WebCore/layout/layouttree/LayoutInlineTextBox.h
M Source/WebCore/rendering/RenderListMarker.cpp
M Source/WebCore/rendering/RenderListMarker.h
M Source/WebCore/rendering/RenderTreeAsText.cpp
M Source/WebCore/rendering/TextBoxPainter.cpp
M Source/WebCore/rendering/TextBoxPainter.h
Log Message:
-----------
[list-marker] Lay bullet markers out as marker text so they take part in
inline layout
https://bugs.webkit.org/show_bug.cgi?id=321473
<rdar://problem/185157814>
Reviewed by Antti Koivisto.
Marker content is inline content: what it measures, where it sits on the line
and how bidi orders it are inline layout's answers to give.
Every kind of marker goes through it except a disc, circle or square, which the
marker measures and paints itself from the font metrics,
into a box it sizes for that purpose alone. So marker drawing exists twice, and
the two have to be kept in step.
It is also what stands in the way of making an inside marker an inline box,
which is where this is going:
an inline box has no box of its own to paint into, so anything the marker draws
for itself has nowhere to go.
A list-style-image that fails to load now rebuilds the marker rather than
relaying it out. It falls
back to its list-style-type, and that text needs renderers the marker was not
built with. Nothing
about the element's style changed, and a pseudo-element list item is only
revisited through its host
(RenderTreeUpdater::updateAfterDescendants), so imageChanged() invalidates the
host's renderers
instead of the element's style.
* Source/WebCore/layout/formattingContexts/inline/text/TextUtil.cpp:
(WebCore::Layout::TextUtil::width):
* Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp:
(WebCore::LayoutIntegration::markerTextSynthesizesGlyph):
(WebCore::LayoutIntegration::BoxTreeUpdater::createLayoutBox):
(WebCore::LayoutIntegration::updateContentCharacteristic):
(WebCore::LayoutIntegration::BoxTreeUpdater::updateContent):
* Source/WebCore/layout/layouttree/LayoutInlineTextBox.h:
(WebCore::Layout::InlineTextBox::hasSynthesizedGlyph const):
* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::textNeedsBidiResolution const):
(WebCore::RenderListMarker::needsContentContainer const):
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::layoutContentContainer):
(WebCore::RenderListMarker::imageChanged):
(WebCore::RenderListMarker::updateContent):
(WebCore::RenderListMarker::updateContentContainerText):
(WebCore::RenderListMarker::computeIntrinsicLogicalWidthContributions):
(WebCore::RenderListMarker::updateInlineMargins):
(WebCore::RenderListMarker::relativeMarkerRect):
(WebCore::RenderListMarker::synthesizesGlyph const):
(WebCore::RenderListMarker::drawsBulletShape const): Deleted.
* Source/WebCore/rendering/RenderListMarker.h:
* Source/WebCore/rendering/RenderTreeAsText.cpp:
(WebCore::write):
* Source/WebCore/rendering/TextBoxPainter.cpp:
(WebCore::TextBoxPainter::paint):
(WebCore::TextBoxPainter::hasSynthesizedGlyph const):
(WebCore::TextBoxPainter::paintSynthesizedGlyph):
* Source/WebCore/rendering/TextBoxPainter.h:
Canonical link: https://commits.webkit.org/319632@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications