summaryrefslogtreecommitdiffstats
path: root/layout/reftests/writing-mode/1117210-1-vertical-baseline-snap.html
blob: 88eca655e0d444b219668b02002ee4d5fdd98aa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
@font-face {
  font-family: ahem;
  src: url(../fonts/Ahem.ttf);
}

div {
  font-family: ahem;
  font-size: 10px;
}

.lr {
  writing-mode: vertical-lr;
  text-orientation: sideways-right;
  height: 40px;
}
.rl {
  writing-mode: vertical-rl;
  text-orientation: sideways-right;
  height: 40px;
}

.a { position: relative; top: 10px; left: 10px; }
.b { position: relative; top: 10px; left: 10px; }
.c { position: relative; top: 10px; left: 10px; }
.d { position: relative; top: 10px; left: 10px; }
.e { position: relative; top: 10px; left: 10px; }

/* resolution-dependent offsets: we want CSS px values that will correspond
   to less that 0.5 device pixels either side of where 10px falls, so they
   all snap to the same device-pixel value */

/* XXX For higher-than-retina density, we punt; the test becomes a no-op */

@media (max-resolution: 2dppx) {
  .a { left: 9.8px; }
  .b { left: 9.9px; }
  .c { left: 10px; }
  .d { left: 10.1px; }
  .e { left: 10.2px; }
}

@media (max-resolution: 1.5dppx) {
  .a { left: 9.7px; }
  .b { left: 9.85px; }
  .c { left: 10px; }
  .d { left: 10.15px; }
  .e { left: 10.3px; }
}

@media (max-resolution: 1dppx) {
  .a { left: 9.6px; }
  .b { left: 9.8px; }
  .c { left: 10px; }
  .d { left: 10.2px; }
  .e { left: 10.4px; }
}

</style>
</head>

<body>
<div class="lr a">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>
<div class="lr b">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>
<div class="lr c">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>
<div class="lr d">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>
<div class="lr e">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>

<br>

<div class="rl a">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>
<div class="rl b">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>
<div class="rl c">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>
<div class="rl d">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>
<div class="rl e">abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc<br>abc</div>

</body>
</html>