3 <style type="text/css">
4 /* Make sure the console and the description don't interfere with the rest of the layout. */
11 border: 10px dotted gray;
21 border: 1px solid blue;
22 border-left: 10px dotted blue;
23 border-top: 10px dotted blue;
33 -webkit-flow-from: flow1;
34 border: 10px dotted red;
43 border: 5px solid blue;
45 -webkit-flow-into: flow1;
49 border: 1px solid green;
64 border-right: 1px solid blue;
75 border-bottom: 1px solid blue;
130 <script src="../../../resources/js-test.js"></script>
135 <div id="divText"><b>divText</b><br/></div>
136 <span class="inlineElements" id="inlineElement" style="color: #000099; position: relative; top: 30px; left: 40px;">Inline element in divMain</span>
139 <div id="regionParent"><span style="float: right; margin: 10px; color: blue;">This is regionParent</span>
140 <div class="region1" id="region"></div>
143 <div id="grid1" class="grid">100px</div>
144 <div id="grid2" class="grid">200px</div>
145 <div id="grid3" class="grid">300px</div>
146 <div id="grid4" class="grid">400px</div>
147 <div id="grid5" class="grid">500px</div>
148 <div id="grid6" class="grid">600px</div>
149 <div id="grid7" class="grid">700px</div>
151 <div id="vgrid1" class="vgrid"></div>
152 <div id="vgrid2" class="vgrid">100px</div>
153 <div id="vgrid3" class="vgrid">200px</div>
154 <div id="vgrid4" class="vgrid">300px</div>
155 <div id="vgrid5" class="vgrid">400px</div>
156 <div id="vgrid6" class="vgrid">500px</div>
157 <div id="vgrid7" class="vgrid">600px</div>
158 <div id="vgrid8" class="vgrid">700px</div>
161 description("Test offsetLeft and offsetTop for blocks and inlines in a named flow when the region's offsetParent is NOT the body.<br/>This test also covers borders.")
163 shouldBe("divText.offsetParent", "document.body");
164 shouldBe("divText.offsetLeft", "300");
165 shouldBe("divText.offsetTop", "350");
167 shouldBe("regionParent.offsetLeft", "200");
169 shouldBe("region.offsetParent", "regionParent");
170 shouldBe("region.offsetLeft", "30");
171 shouldBe("region.offsetTop", "20");
173 shouldBe("inlineElement.offsetParent", "document.body");
174 shouldBe("inlineElement.offsetLeft", "300");
175 shouldBe("inlineElement.offsetTop", "550");
177 if (window.testRunner) {
178 var allGraphicElements = document.querySelectorAll(".region1, #divMain, #divText, .grid, .vgrid, #regionParent, .inlineElements, #regionInfo");
179 for (var i=0; i<allGraphicElements.length; i++)
180 allGraphicElements[i].style.display = "none";