Skip to content

Commit 681f253

Browse files
dholbertmoz-wptsync-bot
authored andcommitted
Bug 2012579 [wpt PR 57340] - Use Ahem font in WPT old-content-is-inline.html, a=testonly
Automatic update from web-platform-tests Use Ahem font in WPT old-content-is-inline.html (#57340) This testcase is only valid (i.e. it only actually matches its reference case) if the text doesn't linewrap. So it needs to specify a specific font in order to have some guarantees that linewrapping won't happen. Hence, this patch switches to the Ahem font, and reduces the length of the strings so that they're short enough to fit on a single line in that font. This patch also removes the styling that was making the text transparent, and makes the text blue instead; with the Ahem font, we're not at as much risk of fuzzy failures from subtle antialiasing differences. Fixes web-platform-tests/interop#1250 -- wpt-commits: fadfaa1a530fbbc35dddef0d2651f89a8a24a23d wpt-pr: 57340
1 parent c6640a3 commit 681f253

2 files changed

Lines changed: 24 additions & 16 deletions

File tree

testing/web-platform/tests/css/css-view-transitions/old-content-is-inline-ref.html

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22
<title>View transitions: Old content is an inline element (ref)</title>
33
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
44
<link rel="author" href="mailto:bokan@chromium.org">
5+
<link rel="stylesheet" href="/fonts/ahem.css">
56

67
<style>
7-
:root { background-color: rebeccapurple; }
8+
:root {
9+
background-color: rebeccapurple;
10+
font: 20px/1 Ahem;
11+
}
12+
813
body { margin: 0; }
914

1015
.container {
@@ -31,7 +36,7 @@
3136

3237
.inline {
3338
background-color: limegreen;
34-
color: rgba(0, 0, 0, 0);
39+
color: blue;
3540
}
3641

3742
.transitioned .inline {
@@ -49,20 +54,20 @@
4954
</style>
5055

5156
<div class="container start">
52-
<span>FILLER FILLER</span>
53-
<span id="start" class="inline">INLINE INLINE INLINE INLINE</span>
57+
<span>FILL FILL</span>
58+
<span id="start" class="inline">INL INL</span>
5459
<p>START STATE</p>
5560
</div>
5661

5762
<div class="container end transitioned">
58-
<span>FILLER FILLER</span>
59-
<span id="end" class="inline">INLINE INLINE INLINE INLINE</span>
63+
<span>FILL FILL</span>
64+
<span id="end" class="inline">INL INL</span>
6065
<p>END STATE</p>
6166
</div>
6267

6368
<div id="dummyEndInline">
64-
<span style="opacity:0">FILLER FILLER</span>
65-
<span class="inline">INLINE INLINE INLINE INLINE</span>
69+
<span style="opacity:0">FILL FILL</span>
70+
<span class="inline">INL INL</span>
6671
</div>
6772
<script>
6873
let endWidth = document.getElementById('end').getBoundingClientRect().width;

testing/web-platform/tests/css/css-view-transitions/old-content-is-inline.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
<link rel="help" href="https://www.w3.org/TR/css-view-transitions-1/">
55
<link rel="author" href="mailto:bokan@chromium.org">
66
<link rel="match" href="old-content-is-inline-ref.html">
7-
<meta name="fuzzy" content="maxDifference=0-255; totalPixels=0-500">
7+
<link rel="stylesheet" href="/fonts/ahem.css">
88
<script src="/common/reftest-wait.js"></script>
99

1010
<style>
11-
body { margin : 0; }
11+
body {
12+
margin : 0;
13+
font: 20px/1 Ahem;
14+
}
15+
1216
.container {
1317
position: absolute;
1418
left: 100px;
@@ -35,8 +39,7 @@
3539

3640
.inline {
3741
background-color: limegreen;
38-
/* allow small pixel diff in text */
39-
color: rgba(0, 0, 0, 0);
42+
color: blue;
4043
}
4144

4245
.start .inline {
@@ -105,8 +108,8 @@
105108
starting position.
106109
-->
107110
<div class="container start">
108-
<span>FILLER FILLER</span>
109-
<span id="start" class="inline">INLINE INLINE INLINE INLINE</span>
111+
<span>FILL FILL</span>
112+
<span id="start" class="inline">INL INL</span>
110113
<p>START STATE</p>
111114
</div>
112115

@@ -115,8 +118,8 @@
115118
ending position.
116119
-->
117120
<div class="container end">
118-
<span>FILLER FILLER</span>
119-
<span id="end" class="inline">INLINE INLINE INLINE INLINE</span>
121+
<span>FILL FILL</span>
122+
<span id="end" class="inline">INL INL</span>
120123
<p>END STATE</p>
121124
</div>
122125

0 commit comments

Comments
 (0)