blob: a40baa61a28dc25f51365b4230a8f2476131e198 [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="assert" content="This checks that 'box-sizing: border-box' doesn't have any effect on a positioned element when the height is set by the offset properties.">
<style>
.wrapper {
position: relative;
width: 200px;
height: 200px;
}
.positioned {
border: 10px solid magenta;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.fill-available {
border: 20px dotted cyan;
background: yellow;
width: -webkit-fill-available;
height: -webkit-fill-available;
}
.border-box {
box-sizing: border-box;
}
</style>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../resources/check-layout-th.js"></script>
<body onload="checkLayout('.wrapper')">
<div id="log"></div>
<div class="wrapper" data-expected-width="200" data-expected-height="200">
<div class="positioned" data-expected-width="200" data-expected-height="200">
<div class="fill-available" data-expected-width="180" data-expected-height="180"></div>
</div>
</div>
<!-- This is failing due to bug https://webkit.org/b/178790. -->
<div class="wrapper" data-expected-width="200" data-expected-height="200">
<div class="positioned" data-expected-width="200" data-expected-height="200">
<div class="fill-available border-box" data-expected-width="180" data-expected-height="180"></div>
</div>
</div>
<div class="wrapper" data-expected-width="200" data-expected-height="200">
<div class="positioned border-box" data-expected-width="200" data-expected-height="200">
<div class="fill-available" data-expected-width="180" data-expected-height="180"></div>
</div>
</div>
<!-- This is failing due to bug https://webkit.org/b/178790. -->
<div class="wrapper" data-expected-width="200" data-expected-height="200">
<div class="positioned border-box" data-expected-width="200" data-expected-height="200">
<div class="fill-available border-box" data-expected-width="180" data-expected-height="180"></div>
</div>
</div>
</body>