Skip to content

Commit

Permalink
Bug 1838089: Change WPTs svg-scale-013 and -014 to use whole-number p…
Browse files Browse the repository at this point in the history
…ixel values, to avoid depending on precise pixel snapping behavior. r=TYLin

These tests were making unjustified subpixel-positioning assumptions about
rects with positions and sizes of 133.333px; and the tests were also not
accounting the fact that 1.5 * 133.333px is technically not-quite-200px.

This patch addresses these issues by using 1.25 * 160px instead -- testing the
same thing, but with a whole-number pixel value that doesn't require a
truncated decimal approximation.

This addresses web-platform-tests/interop#359

Differential Revision: https://phabricator.services.mozilla.com/D180749
  • Loading branch information
dholbert committed Jun 15, 2023
1 parent a4d1b9a commit 1c2f783
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Transforms Test: SVG presentation attribute and scale horizontally -0.5 and vertically -1.5</title>
<title>CSS Transforms Test: SVG presentation attribute and scale horizontally -0.5 and vertically -1.25</title>
<link rel="author" title="Rebecca Hauck" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform">
<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#two-d-transform-functions">
Expand All @@ -20,7 +20,7 @@
<body>
<p>The test passes if you see a green square and no red.</p>
<svg>
<rect x="-400" y="-133.333" width="400" height="133.333" fill="green" transform="scale(-0.5, -1.5)"/>
<rect x="-400" y="-160" width="400" height="160" fill="green" transform="scale(-0.5, -1.25)"/>
</svg>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>CSS Transforms Test: SVG presentation attribute and scale horizontally -1.5 and vertically -0.5</title>
<title>CSS Transforms Test: SVG presentation attribute and scale horizontally -1.25 and vertically -0.5</title>
<link rel="author" title="Rebecca Hauck" href="mailto:[email protected]">
<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform">
<link rel="help" href="http://www.w3.org/TR/css-transforms-1/#two-d-transform-functions">
Expand All @@ -20,7 +20,7 @@
<body>
<p>The test passes if you see a green square and no red.</p>
<svg>
<rect x="-133.333" y="-400" width="133.333" height="400" fill="green" transform="scale(-1.5, -0.5)"/>
<rect x="-160" y="-400" width="160" height="400" fill="green" transform="scale(-1.25, -0.5)"/>
</svg>
</body>
</html>
</html>

0 comments on commit 1c2f783

Please sign in to comment.