Bug 1507421 [wpt PR 14067] - Fix box-shadow clipping for opaque-background <body>, a=testonly
☠☠ backed out by 46ad93280b06 ☠ ☠
authorFlorin Malita <fmalita@chromium.org>
Mon, 19 Nov 2018 18:46:37 +0000
changeset 503754 d94695f279159a02b853a95ab4ea2f10a9e65d81
parent 503753 2b4e8d16551955833b71358bcf2f0ba617fcc3df
child 503755 f380f6a8f5c0f0dff12df5aa4214040aed998067
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1507421, 14067, 899342, 1336495, 609014
milestone65.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 1507421 [wpt PR 14067] - Fix box-shadow clipping for opaque-background <body>, a=testonly Automatic update from web-platform-testsFix box-shadow clipping for opaque-background <body> In the presence of an opaque background, BoxPainterBase::PaintNormalBoxShadow() insets the shadow clip by one unit (in order to mitigate seaming artifacs), effectively expanding the shadow inwards, and relies on the opaque background overdrawing this inset. But <body> doesn't paint its own background -- it gets transferred to the view and painted in a different context => the shadow inset remains visible. To address this, pass background-skip information to PaintNormalBoxShadow(), and disable the inset logic when the background is not being drawn. Bug: 899342 Change-Id: I5e04a1c17c2be324bf4c6767d2159372f546cc24 Reviewed-on: https://chromium-review.googlesource.com/c/1336495 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#609014} -- wpt-commits: 44a54b7ededf2dc68fe9b3d2d6f2dca4f1f8372d wpt-pr: 14067
testing/web-platform/tests/css/css-backgrounds/box-shadow-body.html
testing/web-platform/tests/css/css-backgrounds/reference/box-shadow-body-ref.html
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/box-shadow-body.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>CSS box-shadow Test: &lt;body&gt; shadow should look the same regardless of background color</title>
+    <link rel="author" title="fmalita" href="mailto:fmalita@chromium.org">
+    <link rel="help" href="https://www.w3.org/TR/css-backgrounds-3/#the-box-shadow">
+    <link rel="match" href="reference/box-shadow-body-ref.html">
+    <style type="text/css">
+    body {
+        position: relative;
+        box-shadow: 0 0 0 4px red;
+        height: 300px;
+        width: 600px;
+        margin: 20px auto;
+        background-color: white;
+    }
+    </style>
+</head>
+<body></body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/reference/box-shadow-body-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>CSS box-shadow Test Reference</title>
+    <link rel="author" title="fmalita" href="mailto:fmalita@chromium.org">
+    <style type="text/css">
+    html {
+        background-color: white;
+    }
+    body {
+        position: relative;
+        box-shadow: 0 0 0 4px red;
+        height: 300px;
+        width: 600px;
+        margin: 20px auto;
+    }
+    </style>
+</head>
+<body></body>
+</html>