Bug 1513753 [wpt PR 14483] - Reland "Fix SVG-As-Background sizing", a=testonly
authorStephen Chenney <schenney@chromium.org>
Wed, 19 Dec 2018 11:05:33 +0000
changeset 515004 a889ac5bb985d7ce222fc131316c76f721568f66
parent 515003 97b7940ad33797819927c4a30756e8d59db71ed8
child 515005 1d5fbbff75bbaa2b59cfbac579ae69ce94b2270a
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1513753, 14483, 1373285, 1373509, 855882, 1370486, 615798, 1373286, 615840
milestone66.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 1513753 [wpt PR 14483] - Reland "Fix SVG-As-Background sizing", a=testonly Automatic update from web-platform-tests Reland "Fix SVG-As-Background sizing" This is a reland of aed99d7e12bd036ab3ebb4fe522ce8faf347a32f It was reverted in https://chromium-review.googlesource.com/c/chromium/src/+/1373285 But the real culprit is a recipe change which is being reverted in https://chromium-review.googlesource.com/c/chromium/tools/build/+/1373509 Original change's description: > Fix SVG-As-Background sizing > > Addresses a TODO where we were snapping the intrinsic size of an SVG image, > even when that is no longer useful. This was posing issues with operations > using aspect ratio, because the computed aspect ratio on the snapped value > was wrong when then used on un-snapped values. > > R=fs@opera.com > BUG=855882 > > Change-Id: I0c14c0109da4c5ca5e52aebf408e9b702eda799c > Reviewed-on: https://chromium-review.googlesource.com/c/1370486 > Commit-Queue: Stephen Chenney <schenney@chromium.org> > Reviewed-by: Fredrik Söderquist <fs@opera.com> > Cr-Commit-Position: refs/heads/master@{#615798} Bug: 855882 Change-Id: Icdd1ad0af2aaae6f633b8940522115e9742d1d7f Reviewed-on: https://chromium-review.googlesource.com/c/1373286 Reviewed-by: Shuotao Gao <stgao@chromium.org> Reviewed-by: Fredrik Söderquist <fs@opera.com> Commit-Queue: Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#615840} -- wpt-commits: e90dc4781e54e9b73fe21e2b5c04449beeb2de80 wpt-pr: 14483
testing/web-platform/tests/css/css-backgrounds/background-size/background-size-cover-svg.html
testing/web-platform/tests/css/css-backgrounds/background-size/reference/background-size-cover-svg-ref.html
testing/web-platform/tests/css/css-backgrounds/background-size/support/rectangle-2560x208.svg
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/background-size/background-size-cover-svg.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Background Test: A SVG background should fully cover the positioning area</title>
+  <link rel="author" title="schenney" href="mailto:schenney@chromium.org">
+  <link rel="help" href="http://www.w3.org/TR/css3-background">
+  <link rel="match" href="reference/background-size-cover-svg-ref.html">
+  <style>
+    div {
+      height: 400px;
+      width: 600px;
+      position: relative;
+      background-color: red;
+      background-size: cover;
+      background-repeat: no-repeat;
+      background-position: bottom center;
+      background-image: url("support/rectangle-2560x208.svg");
+    }
+  </style>
+</head>
+
+<body>
+  <div></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/background-size/reference/background-size-cover-svg-ref.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Background Test Reference</title>
+  <link rel="author" title="schenney" href="mailto:schenney@chromium.org">
+  <style>
+    div {
+      height: 400px;
+      width: 600px;
+      position: relative;
+      background-color: red;
+      background-repeat: repeat;
+      background-position: bottom center;
+      background-image: url("../support/50x50-green.png");
+    }
+  </style>
+</head>
+
+<body>
+  <div></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/background-size/support/rectangle-2560x208.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2560 208">
+    <rect fill="green" width="2560" height="208"/>
+</svg>