Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cbf44125e63ae2079d99d27f049cd7b70a3b3f89
      
https://github.com/WebKit/WebKit/commit/cbf44125e63ae2079d99d27f049cd7b70a3b3f89
  Author: Taher Ali <[email protected]>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/box-shadow-inset-spread-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/box-shadow-inset-spread.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/reference/box-shadow-inset-spread-ref.html
    M Source/WebCore/rendering/BorderShape.cpp
    M Source/WebCore/rendering/BorderShape.h

  Log Message:
  -----------
  Inset box-shadow spread renders uneven thickness at fractional zoom
https://bugs.webkit.org/show_bug.cgi?id=306014
rdar://169167365

Reviewed by Simon Fraser.

An inset box-shadow used as a 1px rule (e.g. `box-shadow: inset 0 0 0 1px`)
rendered thicker on some sides than others at fractional zoom, because the
outer border box and the inner hole were snapped to device pixels
independently and a fractional-width spread rounded up on one side and down
on the other.

Derive the snapped inner rect from the already-snapped outer rect, insetting
each side by the width rounded to whole device pixels, so the thickness is
uniform on all four sides regardless of sub-pixel position.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/box-shadow-inset-spread-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/box-shadow-inset-spread.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-viewport/zoom/reference/box-shadow-inset-spread-ref.html:
 Added.
* Source/WebCore/rendering/BorderShape.cpp:
(WebCore::BorderShape::fillRectWithInnerHoleShape const):
(WebCore::BorderShape::snappedInnerEdgeRectForPainting const):
* Source/WebCore/rendering/BorderShape.h:

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



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

Reply via email to