Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f31238db87caff70acef916105aa2e0d7a9ad298
      
https://github.com/WebKit/WebKit/commit/f31238db87caff70acef916105aa2e0d7a9ad298
  Author: Alan Baradlay <[email protected]>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/marker-direction-does-not-move-box-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/marker-direction-does-not-move-box-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/marker-direction-does-not-move-box.html
    M Source/WebCore/rendering/RenderListMarker.cpp

  Log Message:
  -----------
  [list-marker] direction on ::marker moves the marker box to the wrong side of 
the list item
https://bugs.webkit.org/show_bug.cgi?id=321399

Reviewed by Antti Koivisto.

  <style>
  ::marker { direction: rtl }
  </style>
  <ol><li>text

The marker should stay outside the list item's content, to its left. Instead it 
moved on
top of the content.

An outside marker is pulled out of the line by a negative inline-start margin, 
which
updateInlineMargins() wrote with the logical setter. That resolves start 
against the
marker's own direction, so a right-to-left marker got the negative margin on 
its right
edge. Both readers ask the other way around, BoxGeometryUpdater against the 
parent's
writing mode and RenderBlock::marginStartForChild against the containing 
block's, so
they found nothing on the left and the marker stayed on the content.

Write the physical edges of the list item's inline axis instead: left and right 
in a
horizontal writing mode, top and bottom in a vertical one, which is the axis 
those readers
take them from. That is what css-lists-3 asks for as well: with marker-side: 
match-self,
its initial value, the marker box is positioned using the directionality of the 
::marker's
originating element rather than the marker's own.

* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::updateInlineMargins):
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/marker-direction-does-not-move-box.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/marker-direction-does-not-move-box-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-lists/marker-direction-does-not-move-box-expected.html:
 Added.

Canonical link: https://commits.webkit.org/318888@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to