The bug happens when we reconstruct the abspos element inside the IB-split block-wrapper where the inline element is an absolute containing block. In `GetAbsoluteContainingBlock()`, when `absPosCBCandidate` is the `MozBlockInsideInlineWrapper`, redirect the candidate to the first IB-split sibling that is the absolute containing block. Otherwise, the function will continue going up the parent chain until it finds `nsCanvasFrame` (the initial containing block). Differential Revision: https://phabricator.services.mozilla.com/D303124
37 lines
1.0 KiB
HTML
37 lines
1.0 KiB
HTML
<!DOCTYPE html>
|
|
<title>CSS Positioned Test: an absolutely positioned element whose containing block is an inline element resolves its percentage width correctly after revealing itself via display:block</title>
|
|
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
|
<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
|
|
<link rel="help" href="https://drafts.csswg.org/css-position-3/#absolute-cb">
|
|
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1978619">
|
|
<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
|
|
|
|
<style>
|
|
#absCB {
|
|
position: relative;
|
|
}
|
|
#abs {
|
|
position: absolute;
|
|
width: 80%;
|
|
background: red;
|
|
display: none;
|
|
}
|
|
#green {
|
|
width: 100px;
|
|
height: 100px;
|
|
background: green;
|
|
}
|
|
</style>
|
|
|
|
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
|
|
<span id="absCB">
|
|
<div>
|
|
<div id="abs"><div id="green"></div></div>
|
|
</div>
|
|
</span>
|
|
|
|
<script>
|
|
document.documentElement.offsetTop;
|
|
abs.style.display = "block";
|
|
</script>
|