Bug 1523562 [wpt PR 14871] - Fix numerical inaccuracy in background-size auto, a=testonly
authorStephen Chenney <schenney@chromium.org>
Thu, 31 Jan 2019 18:56:28 +0000
changeset 458017 068bf4bc1cf1497466b1a0d79d7d1c132e8f5afa
parent 458016 84b64c2fc1f6288d5ab556066d1aa267ad69d86b
child 458018 2f1dd60f5c17bcc35fe18046ca7076db4e25385b
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1523562, 14871, 921269, 1413175, 623564
milestone67.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 1523562 [wpt PR 14871] - Fix numerical inaccuracy in background-size auto, a=testonly Automatic update from web-platform-tests Fix numerical inaccuracy in background-size auto We were using intrinsic_width * tile_size / intrinsic_height to compute the auto size when only one dimension is given. The values are in LayoutUnits and the expression overflows when the tile is large and the image is large, resulting in significant distortion of the background. The effect is most prominant on high-dpi devices but also manifests at high zoom. Bug: 921269 Change-Id: I78c2d0adf3c23b1b9d4158d2ffe8d775b3f5b9f4 Reviewed-on: https://chromium-review.googlesource.com/c/1413175 Reviewed-by: Fredrik Söderquist <fs@opera.com> Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Stephen Chenney <schenney@chromium.org> Cr-Commit-Position: refs/heads/master@{#623564} -- wpt-commits: b01839aa6b032b70ec7ead85f6ef73bbbe5d3b12 wpt-pr: 14871
testing/web-platform/tests/css/css-backgrounds/background-image-large-with-auto.html
testing/web-platform/tests/css/css-backgrounds/reference/background-image-large-with-auto-ref.html
testing/web-platform/tests/css/css-backgrounds/support/green-1000x10.png
testing/web-platform/tests/css/css-backgrounds/support/green-10x1000.png
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/background-image-large-with-auto.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Background Test: Large images with one auto size are correctly sized</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-image-large-with-auto-ref.html">
+  <style>
+    .wide-div {
+      background-image: url(support/green-1000x10.png);
+      background-repeat: no-repeat;
+      background-size: 10000px auto;
+      width: 1000px;
+      height: 100px;
+      border: 1px solid black;
+    }
+
+    .high-div {
+      background-image: url(support/green-10x1000.png);
+      background-repeat: no-repeat;
+      background-size: auto 10000px;
+      width: 100px;
+      height: 1000px;
+      border: 1px solid black;
+    }
+  </style>
+</head>
+
+<body>
+  <div class='wide-div'></div>
+  <div class='high-div'></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/css/css-backgrounds/reference/background-image-large-with-auto-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Background Test Reference</title>
+  <link rel="author" title="schenney" href="mailto:schenney@chromium.org">
+  <style>
+    .wide-div {
+      background-image: url(../support/green-1000x10.png);
+      background-repeat: no-repeat;
+      background-size: 10000px 100px;
+      width: 1000px;
+      height: 100px;
+      border: 1px solid black;
+    }
+
+    .high-div {
+      background-image: url(../support/green-10x1000.png);
+      background-repeat: no-repeat;
+      background-size: 100px 10000px;
+      width: 100px;
+      height: 1000px;
+      border: 1px solid black;
+    }
+  </style>
+</head>
+
+<body>
+  <div class='wide-div'></div>
+  <div class='high-div'></div>
+</body>
+</html>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8ce354cfb755921397b1e3fcb78cb6be07ef5c7a
GIT binary patch
literal 128
zc%17D@N?(olHy`uVBq!ia0y~yV15B)b8#>M$rVc<F9%ZYo-U3d6}R4AbL3@U;5f2@
z`KiZoHkGw4d&6b|Wsh%VVPHtO!^pt!n2&+sm@ET>!8-<qhC+6TfJ8Y1!+{;l3<u1)
YSL!oNsi@i!0Mx|b>FVdQ&MBb@09LLd_5c6?
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c7fd6eee5c276eb1dd0dc2c03cc88eb98e7dde98
GIT binary patch
literal 161
zc%17D@N?(olHy`uVBq!ia0vp^KsNIW4kjQg!{o<55asFO7*cWT?a76V3=AC13tm2*
rm$#vsF+^*!yLwdi+O5~9L!>imDscoXDr1%g+R5PQ>gTe~DWM4fFaJZ?