Bug 1507421 [wpt PR 14067] - Fix box-shadow clipping for opaque-background <body>, a=testonly
authorFlorin Malita <fmalita@chromium.org>
Mon, 19 Nov 2018 18:46:37 +0000
changeset 506789 96d50253f05de325a26b4dea7f24b44a1d9ce1dc
parent 506788 f62150dda3664620284888933718cef568d96558
child 506790 fd69b29dc52dcc0f5d931147c7b36e3cc74a16bc
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [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>