Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e7f665b81ab03f6b7d916503d7405b8f83b93cd5
      
https://github.com/WebKit/WebKit/commit/e7f665b81ab03f6b7d916503d7405b8f83b93cd5
  Author: lilly <[email protected]>
  Date:   2026-06-11 (Thu, 11 Jun 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/border-shape/border-shape-ignore-radius-computed-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-computed-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-interpolation-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-invalid-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-valid-expected.txt
    M Source/WebCore/css/CSSProperties.json
    M Source/WebCore/css/scripts/process-css-properties.py
    M Source/WebCore/style/values/borders/StyleCornerShapeValue.cpp
    M Source/WebCore/style/values/borders/StyleCornerShapeValue.h

  Log Message:
  -----------
  corner-shape: superellipse uses non-negative exponent instead of spec's 
signed curvature, rejecting scoop/notch(-infinity)
https://bugs.webkit.org/show_bug.cgi?id=316579
rdar://179039849

Reviewed by Simon Fraser and Sam Weinig.

SuperellipseFunction now stores the spec's signed curvature K directly 
(previously stored a non-negative exponent n, incorrectly mapping
superellipse(K) as n = 2^K). The type is widened from Number<CSS::Nonnegative> 
to Number<> to accept negative values and -infinity, and keyword
constants are remapped to their correct curvature values per spec: round=1, 
bevel=0, scoop=-1, squircle=2, notch=-∞, square=∞.

CornerShapeValue is converted from a variant-like type to a type wrapper, 
switchOn is removed and replaced with DEFINE_TYPE_WRAPPER_GET and
DEFINE_TUPLE_LIKE_CONFORMANCE_FOR_TYPE_WRAPPER. Computed style always 
serializes as superellipse(K), matching the spec's requirement that computed
values are expressed in canonical superellipse() form.

The interpolation functions are updated to implement the spec's anti-symmetric 
formula: k = 2^|s|, convexHalfCorner = 0.5^(1/k), with concave values
(s < 0) mapping to 1 - convexHalfCorner. This ensures that symmetric pairs like 
round/scoop interpolate through bevel at the midpoint, and that
extrapolation into negative curvature is correct.

This fixes negative curvature values (scoop, notch, superellipse(-infinity)) 
being rejected, fixes mis-mapped positives (superellipse(2) previously
resolved to round's exponent rather than curvature 2), and fixes interpolation 
between convex and concave shapes.
Spec reference: https://drafts.csswg.org/css-borders/#funcdef-superellipse

Changes pass the existing wpt parsing tests

* LayoutTests/TestExpectations:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/border-shape/border-shape-ignore-radius-computed-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-computed-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-interpolation-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-invalid-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-valid-expected.txt:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/scripts/process-css-properties.py:
(Name):
* Source/WebCore/style/values/borders/StyleCornerShapeValue.cpp:
(WebCore::Style::CSSValueConversion<CornerShapeValue>::operator):
(WebCore::Style::convertCurvatureToInterpolationValue):
(WebCore::Style::convertInterpolationValueToCurvature):
(WebCore::Style::Blending<CornerShapeValue>::blend):
(WebCore::Style::convertExponentToInterpolationValue): Deleted.
(WebCore::Style::convertInterpolationValueToExponent): Deleted.
* Source/WebCore/style/values/borders/StyleCornerShapeValue.h:
(WebCore::Style::CornerShapeValue::CornerShapeValue):
(WebCore::Style::CornerShapeValue::switchOn const):

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



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

Reply via email to