Skip to content

[css-borders-4] Update box-shadow interaction with border-shape#13730

Merged
danielsakhapov merged 1 commit into
mainfrom
danielsakhapov-patch-1
Mar 26, 2026
Merged

[css-borders-4] Update box-shadow interaction with border-shape#13730
danielsakhapov merged 1 commit into
mainfrom
danielsakhapov-patch-1

Conversation

@danielsakhapov

Copy link
Copy Markdown
Contributor

No description provided.

@danielsakhapov danielsakhapov requested a review from noamr March 26, 2026 15:16
@danielsakhapov danielsakhapov merged commit 48ca237 into main Mar 26, 2026
1 check passed
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2026
This patch updates the border-shape box-shadow implementation to align
with the latest specification.
Spec changes: w3c/csswg-drafts#13730

Key changes:
- Corrected spread expansion: Replaced bounding-box scaling (which
  non-uniformly distorted shapes) with mathematically correct SkPath
  operations.
  - Outer box shadows expand via Path union and contract via Path
    difference of the stroked outer border edge.
  - Inset box shadows correctly expand/contract the 'hole' via Path
    difference/union of the stroked inner border edge.
- Shadow paths are no longer artificially inflated by the blur radius,
  preventing 'over-inflated' shadows. Blur is now handled exclusively
  by the paint looper.
- Fixed a bug where transparent/semi-transparent shadows were
  double-drawing the caster shape by correctly using black to
  generate the looper shadow mask.
- Cleaned up OverflowClipInnerPath as the overflow-clip-margin
  expansion applies to the reference box earlier in the pipeline.
- Updated outdated WPT test references that misaligned with the new
  specification's geometry logic, keeping minimum required fuzzy tags
  for anti-aliasing differences between Skia paths and SVG stroke
  rendering.

Fixed: 496140391
Change-Id: I2ac7fcd9132135a6de7e5bd412b234d8c5a89ff9
beckysiegel pushed a commit to chromium/chromium that referenced this pull request Mar 28, 2026
This patch updates the border-shape box-shadow implementation to align
with the latest specification.
Spec changes: w3c/csswg-drafts#13730

Key changes:
- Corrected spread expansion: Replaced bounding-box scaling (which
  non-uniformly distorted shapes) with mathematically correct SkPath
  operations.
  - Outer box shadows expand via Path union and contract via Path
    difference of the stroked outer border edge.
  - Inset box shadows correctly expand/contract the 'hole' via Path
    difference/union of the stroked inner border edge.
- Shadow paths are no longer artificially inflated by the blur radius,
  preventing 'over-inflated' shadows. Blur is now handled exclusively
  by the paint looper.
- Fixed a bug where transparent/semi-transparent shadows were
  double-drawing the caster shape by correctly using black to
  generate the looper shadow mask.
- Cleaned up OverflowClipInnerPath as the overflow-clip-margin
  expansion applies to the reference box earlier in the pipeline.
- Updated outdated WPT test references that misaligned with the new
  specification's geometry logic, keeping minimum required fuzzy tags
  for anti-aliasing differences between Skia paths and SVG stroke
  rendering.

Fixed: 496140391
Change-Id: I2ac7fcd9132135a6de7e5bd412b234d8c5a89ff9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7706396
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1606659}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2026
This patch updates the border-shape box-shadow implementation to align
with the latest specification.
Spec changes: w3c/csswg-drafts#13730

Key changes:
- Corrected spread expansion: Replaced bounding-box scaling (which
  non-uniformly distorted shapes) with mathematically correct SkPath
  operations.
  - Outer box shadows expand via Path union and contract via Path
    difference of the stroked outer border edge.
  - Inset box shadows correctly expand/contract the 'hole' via Path
    difference/union of the stroked inner border edge.
- Shadow paths are no longer artificially inflated by the blur radius,
  preventing 'over-inflated' shadows. Blur is now handled exclusively
  by the paint looper.
- Fixed a bug where transparent/semi-transparent shadows were
  double-drawing the caster shape by correctly using black to
  generate the looper shadow mask.
- Cleaned up OverflowClipInnerPath as the overflow-clip-margin
  expansion applies to the reference box earlier in the pipeline.
- Updated outdated WPT test references that misaligned with the new
  specification's geometry logic, keeping minimum required fuzzy tags
  for anti-aliasing differences between Skia paths and SVG stroke
  rendering.

Fixed: 496140391
Change-Id: I2ac7fcd9132135a6de7e5bd412b234d8c5a89ff9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7706396
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1606659}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Mar 28, 2026
This patch updates the border-shape box-shadow implementation to align
with the latest specification.
Spec changes: w3c/csswg-drafts#13730

Key changes:
- Corrected spread expansion: Replaced bounding-box scaling (which
  non-uniformly distorted shapes) with mathematically correct SkPath
  operations.
  - Outer box shadows expand via Path union and contract via Path
    difference of the stroked outer border edge.
  - Inset box shadows correctly expand/contract the 'hole' via Path
    difference/union of the stroked inner border edge.
- Shadow paths are no longer artificially inflated by the blur radius,
  preventing 'over-inflated' shadows. Blur is now handled exclusively
  by the paint looper.
- Fixed a bug where transparent/semi-transparent shadows were
  double-drawing the caster shape by correctly using black to
  generate the looper shadow mask.
- Cleaned up OverflowClipInnerPath as the overflow-clip-margin
  expansion applies to the reference box earlier in the pipeline.
- Updated outdated WPT test references that misaligned with the new
  specification's geometry logic, keeping minimum required fuzzy tags
  for anti-aliasing differences between Skia paths and SVG stroke
  rendering.

Fixed: 496140391
Change-Id: I2ac7fcd9132135a6de7e5bd412b234d8c5a89ff9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7706396
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1606659}
beckysiegel pushed a commit to chromium/chromium that referenced this pull request Mar 31, 2026
Original change's description:
> [border-shape] Align box-shadow with CSS Borders 4 spec
>
> This patch updates the border-shape box-shadow implementation to align
> with the latest specification.
> Spec changes: w3c/csswg-drafts#13730
>
> Key changes:
> - Corrected spread expansion: Replaced bounding-box scaling (which
>   non-uniformly distorted shapes) with mathematically correct SkPath
>   operations.
>   - Outer box shadows expand via Path union and contract via Path
>     difference of the stroked outer border edge.
>   - Inset box shadows correctly expand/contract the 'hole' via Path
>     difference/union of the stroked inner border edge.
> - Shadow paths are no longer artificially inflated by the blur radius,
>   preventing 'over-inflated' shadows. Blur is now handled exclusively
>   by the paint looper.
> - Fixed a bug where transparent/semi-transparent shadows were
>   double-drawing the caster shape by correctly using black to
>   generate the looper shadow mask.
> - Cleaned up OverflowClipInnerPath as the overflow-clip-margin
>   expansion applies to the reference box earlier in the pipeline.
> - Updated outdated WPT test references that misaligned with the new
>   specification's geometry logic, keeping minimum required fuzzy tags
>   for anti-aliasing differences between Skia paths and SVG stroke
>   rendering.
>
> Fixed: 496140391
> Change-Id: I2ac7fcd9132135a6de7e5bd412b234d8c5a89ff9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7706396
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1606659}

(cherry picked from commit 776a2c5)

Bug: 497163292,496140391
Change-Id: I2ac7fcd9132135a6de7e5bd412b234d8c5a89ff9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7707059
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Chrome Cherry Picker <chrome-cherry-picker@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/7727@{#1885}
Cr-Branched-From: ce01102-refs/heads/main@{#1596535}
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Apr 4, 2026
… Borders 4 spec, a=testonly

Automatic update from web-platform-tests
[border-shape] Align box-shadow with CSS Borders 4 spec

This patch updates the border-shape box-shadow implementation to align
with the latest specification.
Spec changes: w3c/csswg-drafts#13730

Key changes:
- Corrected spread expansion: Replaced bounding-box scaling (which
  non-uniformly distorted shapes) with mathematically correct SkPath
  operations.
  - Outer box shadows expand via Path union and contract via Path
    difference of the stroked outer border edge.
  - Inset box shadows correctly expand/contract the 'hole' via Path
    difference/union of the stroked inner border edge.
- Shadow paths are no longer artificially inflated by the blur radius,
  preventing 'over-inflated' shadows. Blur is now handled exclusively
  by the paint looper.
- Fixed a bug where transparent/semi-transparent shadows were
  double-drawing the caster shape by correctly using black to
  generate the looper shadow mask.
- Cleaned up OverflowClipInnerPath as the overflow-clip-margin
  expansion applies to the reference box earlier in the pipeline.
- Updated outdated WPT test references that misaligned with the new
  specification's geometry logic, keeping minimum required fuzzy tags
  for anti-aliasing differences between Skia paths and SVG stroke
  rendering.

Fixed: 496140391
Change-Id: I2ac7fcd9132135a6de7e5bd412b234d8c5a89ff9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7706396
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1606659}

--

wpt-commits: 86410041c6121bcb229b1a2b3e0d600bd94fa00f
wpt-pr: 58835
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Apr 9, 2026
… Borders 4 spec, a=testonly

Automatic update from web-platform-tests
[border-shape] Align box-shadow with CSS Borders 4 spec

This patch updates the border-shape box-shadow implementation to align
with the latest specification.
Spec changes: w3c/csswg-drafts#13730

Key changes:
- Corrected spread expansion: Replaced bounding-box scaling (which
  non-uniformly distorted shapes) with mathematically correct SkPath
  operations.
  - Outer box shadows expand via Path union and contract via Path
    difference of the stroked outer border edge.
  - Inset box shadows correctly expand/contract the 'hole' via Path
    difference/union of the stroked inner border edge.
- Shadow paths are no longer artificially inflated by the blur radius,
  preventing 'over-inflated' shadows. Blur is now handled exclusively
  by the paint looper.
- Fixed a bug where transparent/semi-transparent shadows were
  double-drawing the caster shape by correctly using black to
  generate the looper shadow mask.
- Cleaned up OverflowClipInnerPath as the overflow-clip-margin
  expansion applies to the reference box earlier in the pipeline.
- Updated outdated WPT test references that misaligned with the new
  specification's geometry logic, keeping minimum required fuzzy tags
  for anti-aliasing differences between Skia paths and SVG stroke
  rendering.

Fixed: 496140391
Change-Id: I2ac7fcd9132135a6de7e5bd412b234d8c5a89ff9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7706396
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1606659}

--

wpt-commits: 86410041c6121bcb229b1a2b3e0d600bd94fa00f
wpt-pr: 58835
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants