Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 785dda5a7b969116787e33654a459c03ece58021
      
https://github.com/WebKit/WebKit/commit/785dda5a7b969116787e33654a459c03ece58021
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-04-06 (Mon, 06 Apr 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-inset-round-rendering-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-inset-round-rendering-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-inset-round-rendering.html
    M Source/WebCore/platform/graphics/Path.cpp

  Log Message:
  -----------
  clip-path: inset() border-radius dropped at specific sizes due to float 
precision
https://bugs.webkit.org/show_bug.cgi?id=258125
rdar://110847266

Reviewed by Simon Fraser.

Path::addRoundedRect() falls back to a plain rectangle when
FloatRoundedRect::isRenderable() returns false. After
calcBorderRadiiConstraintScaleFor() scales radii to fit the inset rect,
floating-point imprecision can cause the sum of adjacent scaled radii to
exceed the rect dimension by an epsilon, making isRenderable() fail.

Instead of dropping radii entirely, call adjustRadii() to re-constrain
them, matching the approach already used in
BackgroundPainter::clipRoundedInnerRect(). Only fall back to a plain
rect if adjustRadii() yields zero radii.

Tests: 
imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-inset-round-rendering-ref.html
 
imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-inset-round-rendering.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-inset-round-rendering-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-inset-round-rendering-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-inset-round-rendering.html:
 Added.
* Source/WebCore/platform/graphics/Path.cpp:
(WebCore::Path::addRoundedRect):

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



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

Reply via email to