Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / borders / border-radius-child.html
blob7021bc3df68f1d077483882941266bc9ce933686
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script>
6 var x, y;
8 function offset(elem) {
9 var result = {top: 0, left: 0};
10 for (; elem; elem = elem.offsetParent) {
11 result.left += elem.offsetLeft;
12 result.top += elem.offsetTop;
14 return result;
17 function test() {
18 var innerBox = document.getElementById('innerBox');
19 x = offset(innerBox).left;
20 y = offset(innerBox).top;
21 shouldBe("document.elementFromPoint(x + 5, y - 5).id", "'outerBox'");
22 shouldBe("document.elementFromPoint(x + 5, y + 5).id", "'innerBox'");
23 shouldBe("document.elementFromPoint(x + 5, y + 95).id", "'innerBox'");
24 shouldBe("document.elementFromPoint(x + 5, y + 105).id", "'outerBox'");
25 shouldBe("document.elementFromPoint(x + 95, y - 5).id", "'outerBox'");
26 shouldBe("document.elementFromPoint(x + 95, y + 5).id", "'innerBox'");
27 shouldBe("document.elementFromPoint(x + 95, y + 95).id", "'innerBox'");
28 shouldBe("document.elementFromPoint(x + 95, y + 105).id", "'outerBox'");
29 shouldBe("document.elementFromPoint(x + 105, y - 5).id", "'container'");
30 shouldBe("document.elementFromPoint(x + 105, y + 5).id", "'innerBox'");
31 shouldBe("document.elementFromPoint(x + 105, y + 95).id", "'innerBox'");
32 shouldBe("document.elementFromPoint(x + 105, y + 105).id", "'container'");
33 shouldBe("document.elementFromPoint(x + 195, y - 5).id", "'container'");
34 shouldBe("document.elementFromPoint(x + 195, y + 5).id", "'innerBox'");
35 shouldBe("document.elementFromPoint(x + 195, y + 95).id", "'innerBox'");
36 shouldBe("document.elementFromPoint(x + 195, y + 105).id", "'container'");
37 isSuccessfullyParsed();
39 </script>
40 <style>
41 #container {
42 padding: 100px 150px 100px 50px;
43 width: 200px; height: 200px;
44 background-color: lightgray;
46 #outerBox {
47 width: 100px; height: 100px;
48 padding: 50px 0 50px 100px;
49 border-radius: 10px;
50 background-color: lightgreen;
52 #innerBox {
53 width: 200px; height: 100px;
54 background-color: green;
56 </style>
57 </head>
58 <body onload="test()">
59 <p>Test for <i>bug 113591</i>: <a href="https://bugs.webkit.org/show_bug.cgi?id=113591">https://bugs.webkit.org/show_bug.cgi?id=113591</a> REGRESSION (r145870): Can't get insertion point to appear in some input and textareas on wordpress</p>
60 <div id="container">
61 <div id="outerBox">
62 <div id="innerBox"></div>
63 </div>
64 </div>
65 <div id="console"></div>
66 </body>
67 </html>