Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / multicol / vertical-lr / image-inside-nested-blocks-with-border.html
blobe9a6e703a30c829deb254d118b3ed33fee5e0b4d
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script>
4 description("Test that getBoundingClientRect works as expected on a float in the second column - writing-mode is vertical-lr.");
5 </script>
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;">
11 </div>
12 </div>
13 <script>
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");
24 </script>
25 </body>