Bug 1705597 [wpt PR 28531] - Disable compositing for SVG elements with clip-path or mask, a=testonly
authorXianzhu Wang <wangxianzhu@chromium.org>
Fri, 23 Apr 2021 10:22:19 +0000
changeset 577291 2716efda21d9f51b00d9df209cd8206ceea4a036
parent 577290 94f6ff878b9f770209bd98bcf2380555bc7b8db8
child 577292 34c89e6bab413b6490f653705745efa00fff00dd
push id141827
push userwptsync@mozilla.com
push dateSat, 24 Apr 2021 02:11:12 +0000
treeherderautoland@3a7d9d49c316 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1705597, 28531, 2786129, 2787695, 1199515, 2828782, 873392
milestone90.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1705597 [wpt PR 28531] - Disable compositing for SVG elements with clip-path or mask, a=testonly Automatic update from web-platform-tests Disable compositing for SVG elements with clip-path or mask We are still unclear about the root cause of the hairlines around the bounding box of clip-path or mask. Expanding the mask layer caused other regressions. Now disable compositing until we address the root cause. The test cases are copied from crrev.com/c/2786129 and crrev.com/c/2787695 both of which have been reverted. Bug: 1199515 Change-Id: I9ccda705f160a2e9b8c0aa3d9c9c54e0f23c12c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2828782 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/master@{#873392} -- wpt-commits: b6df49dc07b08bcdcf575107c163cae3d10ff913 wpt-pr: 28531
testing/web-platform/tests/svg/painting/subpixel-clip-path-transform-ref.html
testing/web-platform/tests/svg/painting/subpixel-clip-path-transform.html
testing/web-platform/tests/svg/painting/text-clip-path-transform-ref.html
testing/web-platform/tests/svg/painting/text-clip-path-transform.html
testing/web-platform/tests/svg/painting/text-mask-transform.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/painting/subpixel-clip-path-transform-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<div style="position: absolute; top: 0; left: 0; width: 100px; height: 100px; background: green"></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/painting/subpixel-clip-path-transform.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<meta name="assert" content="There should be no hairline along the edges of clip-path bounding box">
+<link rel="match" href="subpixel-clip-path-transform-ref.html">
+<style>body { margin: 0 }</style>
+<svg style="background: green" width="200" height="200" viewBox="0 0 150 150">
+  <defs>
+    <clipPath id="clip">
+      <polygon points="130,5.4 132,5.4 132,132 5.4,132 5.4,130 130,130">
+    </clipPath>
+  </defs>
+  <rect style="will-change: transform; clip-path: url(#clip)" fill="red" x="0" y="0" width="200" height="200">
+</svg>
+<!-- cover the non-interesting part which is difficult to match a ref.
+     Overflow clip doesn't work to reproduce the issue. -->
+<div style="position: absolute; background: white; left: 100px; top: 0; width: 100px; height: 200px"></div>
+<div style="position: absolute; background: white; left: 0; top: 100px; width: 200px; height: 100px"></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/painting/text-clip-path-transform-ref.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<div style="position: absolute; background: green; left: 0; top: 0; width: 100px; height: 100px"></div>
+<div style="position: absolute; background: green; left: 100px; top: 100px; width: 100px; height: 100px"></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/painting/text-clip-path-transform.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta name="assert" content="There should be no hairline along the edges of clip-path bounding box">
+<link rel="match" href="text-clip-path-transform-ref.html">
+<style>body { margin: 0 }</style>
+<svg style="background: green" width="200" height="200" viewBox="0 0 150 150">
+  <defs>
+    <clipPath id="clip">
+      <text>
+        <tspan x="120" y="25">A</tspan>
+        <tspan x="8" y="140">B</tspan>
+      </text>
+    </clipPath>
+  </defs>
+  <rect style="will-change: transform; clip-path: url(#clip)" fill="red" x="0" y="0" width="200" height="200">
+</svg>
+<!-- cover the non-interesting part which is difficult to match a ref.
+     Overflow clip doesn't work to reproduce the issue. -->
+<div style="position: absolute; background: white; left: 100px; top: 0; width: 100px; height: 100px"></div>
+<div style="position: absolute; background: white; left: 0; top: 100px; width: 100px; height: 100px"></div>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/svg/painting/text-mask-transform.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<meta name="assert" content="There should be no hairline along the edges of mask bounding box">
+<link rel="match" href="text-clip-path-transform-ref.html">
+<style>body { margin: 0 }</style>
+<svg style="background: green" width="200" height="200" viewBox="0 0 150 150">
+  <defs>
+    <mask id="mask">
+      <text fill="white">
+        <tspan x="120" y="25">A</tspan>
+        <tspan x="8" y="140">B</tspan>
+      </text>
+    </mask>
+  </defs>
+  <rect style="will-change: transform; mask: url(#mask)" fill="red" x="0" y="0" width="200" height="200">
+</svg>
+<!-- cover the non-interesting part which is difficult to match a ref.
+     Overflow clip doesn't work to reproduce the issue. -->
+<div style="position: absolute; background: white; left: 100px; top: 0; width: 100px; height: 100px"></div>
+<div style="position: absolute; background: white; left: 0; top: 100px; width: 100px; height: 100px"></div>