Index: LayoutTests/fast/block/positioning/static-to-abspos-parent-is-stf.html |
diff --git a/LayoutTests/fast/block/positioning/static-to-abspos-parent-is-stf.html b/LayoutTests/fast/block/positioning/static-to-abspos-parent-is-stf.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9fac651adba8a3605c3be29cef2e427ee2dfc9fe |
--- /dev/null |
+++ b/LayoutTests/fast/block/positioning/static-to-abspos-parent-is-stf.html |
@@ -0,0 +1,15 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/check-layout.js"></script> |
+<p>Change from position:static to position:absolute when the parent is a shrink-to-fit container. |
+ The parent needs to recalculate its intrinsic size when this happens.</p> |
+<p>There should be a black <em>square</em> below.</p> |
+<div id="container" style="float:left; border:20px solid black;" data-expected-width="40" data-expected-height="40"> |
+ <div id="test" style="width:100px; height:100px;"></div> |
+</div> |
+<p id="result" style="clear:both;"></p> |
+<script> |
+ var test = document.getElementById("test"); |
+ test.offsetTop; |
+ test.style.position = "absolute"; |
+ checkLayout("#container", document.getElementById("result")); |
+</script> |