gecko-dev/layout/generic/crashtests/1825434.html
Ting-Yu Lin 75a2789586 Bug 1825434 - Use containing block's inline-size as percentage basis when computing abspos hypothetical position. r=AlaskanEmily
The containing block's block-size (`blockContentSize.BSize(wm)`) can be
unconstrained if the block has `position:relative` at the time we call the
`CalculateBorderPaddingMargin()`. That triggers the warning further down in the
stack in `ComputeCBDependentValue`.

However, the percentage margin and padding should resolve against the containing
block's inline-size rather than the block-size. Hence this patch.

Differential Revision: https://phabricator.services.mozilla.com/D174340
2023-04-01 04:48:53 +00:00

17 lines
184 B
HTML

<!DOCTYPE html>
<style>
.rel {
position: relative;
}
.abs {
width: 100%;
position: absolute;
padding-top: 50%;
}
</style>
<div class="rel">
<div class="abs"></div>
</div>