Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2d5bf1919563cafb8fe4139eb04a381e309c9149
      
https://github.com/WebKit/WebKit/commit/2d5bf1919563cafb8fe4139eb04a381e309c9149
  Author: Alan Baradlay <[email protected]>
  Date:   2026-01-09 (Fri, 09 Jan 2026)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/position-relative-percentage-top-001.html

  Log Message:
  -----------
  [subpixel-inline-layout] Test cases rely on specific default font metrics 
(part2)
https://bugs.webkit.org/show_bug.cgi?id=305215

Reviewed by Simon Fraser.

An inline box's (e.g. <label>) offsetTop is computed from the geometry of its 
generated display boxes.
In this case, the first (and only) display box for the inline box has a 0.5px 
block-direction offset,
which corresponds to the half-leading introduced by the 1px line gap on iOS 
(default font).

It means that even 'position: relative; top: 0px' (note the 0px) would put the 
before side of the inline box at 0.5px.

 _____________________ block edge
||-------------------- line box edge (note that it's flush with the block edge)
||   ^
||   | 0.5px (half leading)
|| __v________________ inline box edge (<label>)
|||
||| some text content
|||

Fix this ambiguity by using Ahem font (alternatively we could make the <label> 
display: block).

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/position-relative-percentage-top-001.html:

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



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

Reply via email to