blob: bb31c77ec0cddef94e35ef7b93560ab858345206 [file] [log] [blame]
<!DOCTYPE html>
<style>
.container { width: 0; position: relative; }
.test { white-space: nowrap; border: 2px solid green; }
#float { float:left; }
#inline-block { display: inline-block; }
#absolute { position: absolute; }
span { background: yellow; width: 16px; height: 16px; float: left }
</style>
<body>
<script src="../../resources/check-layout.js"></script>
<p> webkit.org/b/114879: Respect http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins when calculating the min/max width of
non-replaced absolute, floating an inline-block containers - i.e. they should shrink-to-fit.
<div class="container">
<div id="float" class="test" data-expected-width=20><span></span><span></span></div>
<div id="inline-block" class="test" data-expected-width=20><span></span><span></span></div>
<div id="absolute" class="test" data-expected-width=20><span></span><span></span></div>
</div>
<script>
checkLayout('body > div > div');
</script>
</body>