4 <script src=
"../../resources/js-test.js"></script>
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
;
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();
42 padding:
100px
150px
100px
50px;
43 width:
200px; height:
200px;
44 background-color: lightgray;
47 width:
100px; height:
100px;
48 padding:
50px
0 50px
100px;
50 background-color: lightgreen;
53 width:
200px; height:
100px;
54 background-color: green;
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>
62 <div id=
"innerBox"></div>
65 <div id=
"console"></div>