2 <script src=
"../../resources/testharness.js"></script>
3 <script src=
"../../resources/testharnessreport.js"></script>
7 font:
6em/
1 Ahem; /* computes to
96px/
96px */
8 height:
99px; /* the height of the cat image */
9 -webkit-writing-mode: vertical-rl; /* for Webkit */
12 background-color: red;
13 font:
6em/
1 Ahem; /* computes to
96px/
96px */
14 height:
99px; /* the height of the cat image */
15 -webkit-writing-mode: vertical-lr; /* for Webkit */
18 background-color: red;
19 font:
6em/
1 Ahem; /* computes to
96px/
96px */
20 height:
199px; /* the height of the cat image */
21 -webkit-writing-mode: vertical-rl; /* for Webkit */
24 background-color: green;
25 vertical-align: baseline;
29 <p>Test passes if there is a cat and
<strong>no red
</strong>.
</p>
30 <p>Derived from
<a href=
"http://test.csswg.org/suites/css-writing-modes-3_dev/nightly-unstable/html/baseline-inline-replaced-002.htm">a CSS test
</a>.
</p>
31 <div id=
"rl"><img src=
"resources/oval.png" width=
"98" height=
"99"></div>
32 <div id=
"lr"><img src=
"resources/oval.png" width=
"98" height=
"99"></div>
35 function assertImageSize(element
) {
36 var img
= element
.querySelector("img");
37 assert_equals(element
.offsetWidth
, img
.offsetWidth
, "Width");
38 assert_equals(element
.offsetHeight
, img
.offsetHeight
, "Height");
41 test(function () { assertImageSize(rl
); }, "Baseline alignment of replaced elements in vertical-rl");
42 test(function () { assertImageSize(lr
); }, "Baseline alignment of replaced elements in vertical-lr");
44 if (window
.testRunner
)
45 container
.style
.display
= "none";