Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: d184010b1c5533e37b700e227571b73183af02aa
https://github.com/WebKit/WebKit/commit/d184010b1c5533e37b700e227571b73183af02aa
Author: Jason Leo <[email protected]>
Date: 2026-03-13 (Fri, 13 Mar 2026)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-covered-by-relpos-block-link-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-covered-by-relpos-block-link-ref.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-covered-by-relpos-block-link.html
M Source/WebCore/rendering/RenderListItem.cpp
M Source/WebCore/rendering/RenderListMarker.cpp
M Source/WebCore/rendering/RenderListMarker.h
Log Message:
-----------
Fix outside list-marker painting with relative-positioned block links
https://bugs.webkit.org/show_bug.cgi?id=18289
Reviewed by Alan Baradlay.
Outside list markers can end up structurally nested under descendant renderers
that paint in a different self-painting layer from the associated
RenderListItem. For the reported case, a relatively positioned display:block
link with a negative offset paints its background over the marker’s visual
area, but the marker was still painted from the descendant painting path, so
the bullet showed through.
Fix:
The change keeps layout behavior unchanged and only adjusts painting:
- detect outside markers that need to be painted from the associated list-item
layer
- skip painting those markers in the descendant self-painting-layer pass
- explicitly paint them from the associated list-item layer instead
- preserve the correct visual position by computing the paint offset from the
marker’s ancestor chain
This restores the expected paint order:
- the list item paints the outside marker
- the relatively positioned link paints afterward
- the link background correctly covers the marker area
Tests: fast/lists/outside-marker-covered-by-relpos-block-link-render-tree.html
imported/w3c/web-platform-tests/css/css-lists/outside-marker-covered-by-relpos-block-link-ref.html
imported/w3c/web-platform-tests/css/css-lists/outside-marker-covered-by-relpos-block-link.html
*
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-covered-by-relpos-block-link-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-covered-by-relpos-block-link-ref.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-covered-by-relpos-block-link.html:
Added.
* Source/WebCore/rendering/RenderListItem.cpp:
(WebCore::paintOffsetForMarkerFromAssociatedListItem):
(WebCore::RenderListItem::paint):
* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::shouldPaintInAssociatedListItemLayer const):
(WebCore::RenderListMarker::paintFromAssociatedListItemLayer):
(WebCore::RenderListMarker::paint):
* Source/WebCore/rendering/RenderListMarker.h:
Canonical link: https://commits.webkit.org/309188@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications