|
1 <!DOCTYPE HTML> |
|
2 <html style="margin: 5px; border: 0; padding: 1px;"> |
|
3 <head> |
|
4 <title>HTML Tests for offset/client/scroll properties</title> |
|
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
6 <script type="text/javascript" src="test_offsets.js"></script> |
|
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"> |
|
8 |
|
9 <style> |
|
10 input { |
|
11 box-sizing: content-box; |
|
12 } |
|
13 </style> |
|
14 </head> |
|
15 <body id="body" onload="setTimeout(testElements, 0, 'testelements', SimpleTest.finish);" |
|
16 style="margin: 1px; border: 2px solid black; padding: 4px;"> |
|
17 |
|
18 <div id="testelements" style="margin: 0; border: 0; padding: 0;"> |
|
19 <div id="div1" style="margin: 0; margin-left: 6px; margin-top: 2px; border: 1px solid green; padding: 6px; width: 50px; height: 20px" |
|
20 _offsetLeft="13" _offsetTop="9" _offsetWidth="64" _offsetHeight="34" |
|
21 _scrollWidth="62" _scrollHeight="32" |
|
22 _clientLeft="1" _clientTop="1" _clientWidth="62" _clientHeight="32"></div> |
|
23 <div id="noscroll" style="margin: 2px; border: 1px solid blue; padding: 3px;" |
|
24 _offsetLeft="10" _offsetTop="12" _offsetWidth="64" _offsetHeight="34" |
|
25 _scrollWidth="62" _scrollHeight="32" |
|
26 _clientLeft="1" _clientTop="1" _clientWidth="62" _clientHeight="32"> |
|
27 <div id="inner">Inner Text</div> |
|
28 </div> |
|
29 |
|
30 <div id="absolute" style="position: absolute; margin: 5px; border: 2px solid blue; padding: 0;"> |
|
31 <div id="absolute-block" _offsetParent="absolute"> |
|
32 <div id="absolute-replaced" _offsetParent="absolute" style="margin: 1px; border: 0; padding: 3px;"></div> |
|
33 </div> |
|
34 </div> |
|
35 |
|
36 <div id="absolutelr" style="position: absolute; margin: 5px; border: 2px solid blue; padding: 0; left: 90px; top: 130px;"> |
|
37 This is some absolute positioned text. |
|
38 <div id="absolutelr-block" _offsetParent="absolutelr"> |
|
39 <div id="absolutelr-replaced" _offsetParent="absolutelr" style="margin: 1px; border: 0; padding: 3px;"></div> |
|
40 </div> |
|
41 </div> |
|
42 |
|
43 <div id="relative" style="position: relative; margin: 2px; border: 1px solid orange; padding: 7px; left: 10px; top: 5px;"> |
|
44 This is some relative positioned text. |
|
45 <div id="relative-block" _offsetParent="relative"> |
|
46 <div id="relative-replaced" _offsetParent="relative" style="margin: 1px; border: 0; padding: 3px;"></div> |
|
47 </div> |
|
48 </div> |
|
49 |
|
50 <div id="fixed" style="position: fixed; margin: 2px; border: 1px solid orange; padding: 7px; left: 87px; top: 12px;"> |
|
51 This is some fixed positioned text. |
|
52 <div id="fixed-block" _offsetParent="fixed"> |
|
53 <div id="fixed-replaced" _offsetParent="fixed" style="margin: 1px; border: 0; padding: 3px;"></div> |
|
54 </div> |
|
55 </div> |
|
56 |
|
57 <div id="scrollbox" |
|
58 style="overflow: scroll; padding-left: 0px; margin: 3px; border: 4px solid green; max-width: 80px; max-height: 70px;" |
|
59 _scrollWidth="62" _scrollHeight="32" |
|
60 _clientLeft="1" _clientTop="1" _clientWidth="62" _clientHeight="32"><p id="p1" style="margin: 0; padding: 0;">One</p> |
|
61 <p id="p2">Two</p> |
|
62 <p id="scrollchild">Three</p> |
|
63 <p id="lastlinebox" style="margin: 0; padding: 0;"><input id="lastline" type="button" |
|
64 style="margin: 0px; border: 2px solid red;" |
|
65 value="This button is much longer than the others"> |
|
66 </p></div> |
|
67 |
|
68 <div id="overflow-visible" style="width:100px; height:100px;"> |
|
69 <div id="overflow-visible-1" style="width:200px; height:1px; background:yellow;"></div> |
|
70 <div id="overflow-visible-2" style="height:200px; background:lime;"></div> |
|
71 </div> |
|
72 |
|
73 <div id="div-displaynone" style="display: none; border: 0; padding: 0;" |
|
74 _offsetParent="null"></div> |
|
75 <p id="p3" style="margin: 2px; border: 0; padding: 1px;" |
|
76 _offsetLeft="9" _offsetTop="9" _offsetWidth="64" _offsetHeight="34" |
|
77 _scrollWidth="62" _scrollHeight="32" |
|
78 _clientLeft="1" _clientTop="1" _clientWidth="62" _clientHeight="32"> |
|
79 <div id="div-nosize" style="width: 0; height: 0; margin: 0; border: 0; padding: 0;"></div> |
|
80 </p> |
|
81 |
|
82 </div> |
|
83 |
|
84 <div id="scrollbox-test" style="float: left; overflow: scroll; margin: 0; border: 0; padding: 0"></div> |
|
85 |
|
86 <script type="application/javascript"> |
|
87 SimpleTest.waitForExplicitFinish(); |
|
88 </script> |
|
89 |
|
90 <p id="display"></p> |
|
91 <div id="content" style="display: none"> |
|
92 |
|
93 </div> |
|
94 |
|
95 </body> |
|
96 </html> |