part 2: Use 0 margin and Ahem font in WPT clip-path-polygon-013.html, to make its computations less likely to produce fractional-pixel sizes with fuzzy failures.
The standard WPT viewport is 800px wide, which (as a multiple of 100) can
conveniently resolve whole-number percentages without creating a fractional
size. But the default body-margins reduce it by 16px, to 784, which is less of
a round-number percent basis.
This was producing some fractional-pixel sizes in this test, which were causing
a fuzzy failure, due to antialiasing differences between how "width" and
"clip-path" handle fractional pixel sizes.
So, this patch just removes those margins, to give us 800px as our percent
basis, which avoids fractional-pixel sizes in this test.
Similarly: this patch also makes us use the Ahem font so that the test's "ex"
units will resolve to a predictable value, instead of whatever
potentially-fractional-value the default font would yield.
Differential Revision: https://phabricator.services.mozilla.com/D172917
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1821793
gecko-commit: ba75fe8fb8c03f0884b95a9056b548bb78d09e38
gecko-reviewers: emilio
diff --git a/css/css-masking/clip-path/clip-path-polygon-013.html b/css/css-masking/clip-path/clip-path-polygon-013.html
index 8d2c049..23c93f3 100644
--- a/css/css-masking/clip-path/clip-path-polygon-013.html
+++ b/css/css-masking/clip-path/clip-path-polygon-013.html
@@ -10,13 +10,19 @@
polygon coordinates. The test passes if you see a multiple green and blue
stripe pairs. For each pair, the blue and green stripe must be of same
length.">
+ <meta name="flags" content="ahem">
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
+body {
+ margin: 0;
+}
div {
width: 100%;
height: 20px;
background-color: green;
padding: 0;
margin: 0;
+ font: 20px/1 Ahem;
}
div:nth-child(odd) {
margin-bottom: 5px;
@@ -43,4 +49,4 @@
<div style="clip-path: polygon(0 0, 30ex 0, 30ex 20px, 0 20px)"></div>
<div style="width: 30ex"></div>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/css/css-masking/clip-path/reference/clip-path-stripes-003-ref.html b/css/css-masking/clip-path/reference/clip-path-stripes-003-ref.html
index e31282c..f4b7fa1 100644
--- a/css/css-masking/clip-path/reference/clip-path-stripes-003-ref.html
+++ b/css/css-masking/clip-path/reference/clip-path-stripes-003-ref.html
@@ -3,12 +3,18 @@
<head>
<title>CSS Masking: Reftest reference</title>
<link rel="author" title="Dirk Schulze" href="mailto:dschulze@adobe.com">
+ <meta name="flags" content="ahem">
+ <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
+body {
+ margin: 0;
+}
div {
height: 20px;
background-color: green;
padding: 0;
margin: 0;
+ font: 20px/1 Ahem;
}
div:nth-child(odd) {
margin-bottom: 5px;
@@ -35,4 +41,4 @@
<div style="width: 30ex"></div>
<div style="width: 30ex"></div>
</body>
-</html>
\ No newline at end of file
+</html>