2 <script src=
"../../../resources/js-test.js"></script>
4 description("Test that getBoundingClientRect works as expected on a float in the second column - writing-mode is vertical-lr.");
6 <body style=
"-webkit-writing-mode:vertical-lr;">
7 <div id=
"multicol" style=
"-webkit-column-count:2; -webkit-column-gap:0; column-fill:auto; width:300px; height:600px;">
8 <div style=
"width:280px;"></div>
9 <div id=
"f1" style=
"border:5px solid black; float:left;">
10 <img style=
"display:block; height:140px; width:80px;">
14 function floatOffset(float)
16 var parentRect
= document
.getElementById("multicol").getBoundingClientRect();
17 var rect
= float.getBoundingClientRect();
18 return { left
: rect
.left
- parentRect
.left
, top
: rect
.top
- parentRect
.top
};
21 var result
= floatOffset(document
.getElementById("f1"));
22 shouldBe("result.left", "0");
23 shouldBe("result.top", "300");