| Index: LayoutTests/fast/dom/partial-layout-block.html
|
| diff --git a/LayoutTests/fast/dom/partial-layout-block.html b/LayoutTests/fast/dom/partial-layout-block.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..67d2f05690df0c915da5e39b13e8e24299c8c14d
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/dom/partial-layout-block.html
|
| @@ -0,0 +1,56 @@
|
| +<!DOCTYPE HTML>
|
| +<html>
|
| +<script src="../js/resources/js-test-pre.js"></script>
|
| +<head>
|
| +<style>
|
| +html, body {
|
| + margin: 0;
|
| + padding: 0;
|
| +}
|
| +#measure {
|
| + margin: 10px;
|
| + padding: 10px;
|
| +}
|
| +#fixedsize {
|
| + width: 100px;
|
| + height: 100px;
|
| +}
|
| +</style>
|
| +<script>
|
| + description('Test that partial layout works for offset{width, height, left, top} methods.');
|
| + if (window.testRunner)
|
| + testRunner.dumpAsText();
|
| + if (window.internals)
|
| + window.internals.setUsesOverlayScrollbars(true);
|
| +
|
| + function checkSize() {
|
| + var measure = document.getElementById('measure');
|
| +
|
| + // Record partial layout values for offset*.
|
| + var measureWidth = measure.offsetWidth;
|
| + var measureHeight = measure.offsetHeight;
|
| + var measureTop = measure.offsetTop;
|
| + var measureLeft = measure.offsetLeft;
|
| +
|
| + // Invalidate measure and force a full layout.
|
| + var child = measure.firstChild;
|
| + measure.removeChild(child);
|
| + document.body.clientHeight;
|
| + measure.appendChild(child);
|
| + var forceLayout = document.body.clientHeight;
|
| +
|
| + var childOffsetTop = child.offsetTop;
|
| +
|
| + shouldBe(measureWidth, "document.body.offsetWidth - 20");
|
| + shouldBe(measureHeight, "measure.offsetHeight");
|
| + shouldBe(measureTop, childOffsetTop - 10);
|
| + shouldBe(measureLeft, "measure.offsetLeft");
|
| + finishJSTest();
|
| + }
|
| +</script>
|
| +</head>
|
| +<body onload="checkSize()">
|
| +<div id="measure"><div id="fixedsize"></div></div>
|
| +<script src="../js/resources/js-test-post.js"></script>
|
| +</body>
|
| +</html>
|
|
|