Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ba55b1b8934b7d92418eb4ab52aef125595e998c
https://github.com/WebKit/WebKit/commit/ba55b1b8934b7d92418eb4ab52aef125595e998c
Author: Alan Baradlay <[email protected]>
Date: 2026-08-17 (Mon, 17 Aug 2026)
Changed paths:
M Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp
Log Message:
-----------
[anon-block-removal] An outside list marker keeps a line of its own when a
block is appended to an empty list item
https://bugs.webkit.org/show_bug.cgi?id=321888
Reviewed by Antti Koivisto.
A list item is handed its marker before its content, so when the block arrives
parent.firstChild() is
already the marker and setChildrenInline(child->isInline()) is skipped; the
else-if below it does not fire
for a block child, so childrenInline keeps the value the marker gave it and the
item runs inline layout with
a block on a line. The marker then takes a line and the item is a line taller
than its content. Ask whether
the item is empty apart from an excluded marker, so the first real child sets
the flag.
isExcludedMarker answered no while parent.childrenInline() was true, which is
true for the same reason - a
marker is inline - so it denied exclusion for the very marker being asked
about. Removing that also lets
hasInlineInFlowChild stop counting an excluded marker, which is what the
recompute after a child is removed
needs: a list item left with a block and its marker was staying on the inline
path. Keep counting the marker
when it is all that is left, or that item loses the line its marker sits on.
* Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp:
(WebCore::isExcludedMarker):
(WebCore::hasInlineInFlowChild):
(WebCore::RenderTreeBuilder::Block::attach):
Canonical link: https://commits.webkit.org/319289@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications