Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d0717a48c4d0070c07336fad891fa31164bf9d54
      
https://github.com/WebKit/WebKit/commit/d0717a48c4d0070c07336fad891fa31164bf9d54
  Author: Alan Baradlay <[email protected]>
  Date:   2026-07-23 (Thu, 23 Jul 2026)

  Changed paths:
    M Source/WebCore/rendering/RenderListMarker.cpp

  Log Message:
  -----------
  [CSS] Inside list marker glyph can be painted a pixel off from equivalent 
inline text
https://bugs.webkit.org/show_bug.cgi?id=319623
rdar://182447949

Reviewed by Antti Koivisto.

A list-style-position: inside marker paints its glyph in 
RenderListMarker::paint()
using markerRect.y(), which comes from the renderer's location(). Line layout 
sets
that location by truncating the marker's float inline-layout position to the
LayoutUnit (1/64px) grid (LayoutIntegration::LineLayout assigns it via
toLayoutPoint()). Inline text, by contrast, paints from the InlineDisplay::Box 
at
full float precision. When the sub-1/64px fraction dropped by the truncation is
enough to tip the device-pixel rounding of the baseline, the marker glyph lands 
one
device pixel away from the same glyph rendered as inline text.

This was latent until the iOS font-metrics convergence (bug 319190) shifted the
ascent so the text baseline falls exactly on a device-pixel boundary, making the
lost fraction decide the rounding.

Take the marker's block-axis paint position straight from its line box instead 
of
the truncated location(), so the glyph baseline keeps the same float precision 
as
inline text and device-pixel rounds identically. Limited to horizontal writing
modes; vertical writing modes have a separate marker line-box mispositioning
tracked by bug 319618.

* Source/WebCore/rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):

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



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

Reply via email to