commit 4dea06aa2fedd46ab199ec6cafa86d68e195b4a0 parent fcdf32bd6b9853c694573c4c7a8d2f51d6785d34 Author: Daniil Sakhapov <sakhapov@chromium.org> Date: Fri, 7 Nov 2025 08:57:06 +0000 Bug 1998565 [wpt PR 55881] - Reland "Fix border-shape painting", a=testonly Automatic update from web-platform-tests Reland "Fix border-shape painting" This is a reland of commit b574b7f4b2336830564c5579cf45208a883dff56 The fix is to check if inline fragment has layout object, as it can be nullptr sometimes. Original change's description: > Fix border-shape painting > > For painting we should use outer path without a stroke data applied. > > Also, this CL fixes which geometry box is used for shadow painting. > > Bug: 448653232 > Change-Id: Ic82dbd1a6f3406d19934c30369a8038a11844002 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7101318 > Reviewed-by: Philip Rogers <pdr@chromium.org> > Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1539255} Bug: 448653232 Change-Id: Idb0b4d5cf3a544f72feff1fe7ebcbff2b8faf742 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7124307 Reviewed-by: Philip Rogers <pdr@chromium.org> Commit-Queue: Daniil Sakhapov <sakhapov@chromium.org> Cr-Commit-Position: refs/heads/main@{#1540719} -- wpt-commits: eb0600157cdbb4fee68c7ae5863dd78699ecd8ae wpt-pr: 55881 Diffstat:
7 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/testing/web-platform/tests/css/css-borders/border-shape-absolute-coords-shape-ref.tentative.html b/testing/web-platform/tests/css/css-borders/border-shape-absolute-coords-shape-ref.tentative.html @@ -8,11 +8,11 @@ height: 200px; overflow: visible; stroke: purple; - stroke-width: 20px; + stroke-width: 10px; + border: 5px solid transparent; fill: green; - border: 20px solid transparent; } </style> <svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> - <polygon points="6,0 194,0, 100,188" /> + <polygon points="0,0 200,0, 100,200" /> </svg> diff --git a/testing/web-platform/tests/css/css-borders/border-shape-absolute-coords-shape.tentative.html b/testing/web-platform/tests/css/css-borders/border-shape-absolute-coords-shape.tentative.html @@ -3,16 +3,15 @@ <link rel="help" href="https://www.w3.org/TR/css-borders-4/#propdef-border-shape"> <link rel="help" href="https://drafts.csswg.org/css-shapes-1/#shape-function"> <link rel="match" href="border-shape-absolute-coords-shape-ref.tentative.html"> -<meta name="fuzzy" content="maxDifference=0-70;totalPixels=0-1200"> <style> .bs-target { position: absolute; top: 200px; - left: 0; - width: 200px; - height: 200px; + left: 0px; + width: 190px; + height: 190px; border-shape: shape(from 0% 0%, line to 100% 0%, line to 50% 100%, close); - border: 20px solid purple; + border: 10px solid purple; background: green; } </style> diff --git a/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-clips-background-ref.html b/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-clips-background-ref.html @@ -15,5 +15,5 @@ circle { } </style> <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> - <circle cx="50" cy="50" r="50" /> + <circle cx="50" cy="50" r="55" /> </svg> diff --git a/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-clips-background.html b/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-clips-background.html @@ -1,7 +1,6 @@ <!DOCTYPE html> <link rel="help" href="https://drafts.csswg.org/css-borders-4/#border-shape"> <link rel="match" href="border-shape-clips-background-ref.html"> -<meta name="fuzzy" content="maxDifference=0-110;totalPixels=0-200"> <style> #target { width: 100px; diff --git a/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-shadow-ref.html b/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-shadow-ref.html @@ -8,17 +8,19 @@ width: 200px; height: 200px; overflow: visible; - border: 2px solid transparent; + border: 5px solid transparent; } .shadow { fill: purple; transform: translate(10px, 20px); + stroke: purple; + stroke-width: 10px; } .target { fill: green; stroke: black; - stroke-width: 2px; + stroke-width: 10px; } </style> diff --git a/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-shadow.html b/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-shadow.html @@ -1,19 +1,19 @@ <!DOCTYPE html> <link rel="help" href="https://drafts.csswg.org/css-borders-4/#border-shape"> <link rel="match" href="border-shape-shadow-ref.html"> -<meta name="fuzzy" content="maxDifference=0-110;totalPixels=0-2500"> +<meta name="fuzzy" content="maxDifference=0-80;totalPixels=0-450"> <style> body { margin: 0; } #target { - width: 200px; - height: 200px; + width: 190px; + height: 190px; border-shape: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); position: relative; background: green; box-shadow: 10px 20px 0 0px purple; - border: 2px solid black; + border: 10px solid black; } </style> <div id="target"> diff --git a/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-stroke-from-border-ref.html b/testing/web-platform/tests/css/css-borders/tentative/border-shape/border-shape-stroke-from-border-ref.html @@ -42,16 +42,16 @@ body { </style> <div class="container"> <svg class="target case1" viewBox="0 0 120 120"> - <circle cx="59" cy="51" r="36" fill="none" stroke="rgb(220, 0, 0)" stroke-width="18"/> + <circle cx="59" cy="51" r="45" fill="none" stroke="rgb(220, 0, 0)" stroke-width="18"/> </svg> <svg class="target case2" viewBox="0 0 120 120"> - <circle cx="59" cy="51" r="42" fill="none" stroke="rgb(0, 0, 220)" stroke-width="6"/> + <circle cx="59" cy="51" r="45" fill="none" stroke="rgb(0, 0, 220)" stroke-width="6"/> </svg> <svg class="target case3" viewBox="0 0 120 120"> - <circle cx="65" cy="51" r="36" fill="none" stroke="rgb(220, 0, 0)" stroke-width="18"/> + <circle cx="65" cy="51" r="45" fill="none" stroke="rgb(220, 0, 0)" stroke-width="18"/> </svg> <svg class="target case4" viewBox="0 0 120 120"> - <circle cx="65" cy="51" r="40" fill="none" stroke="rgb(0, 140, 0)" stroke-width="10"/> + <circle cx="65" cy="51" r="45" fill="none" stroke="rgb(0, 140, 0)" stroke-width="10"/> </svg> </div> <div class="container">