{inc} Wrong position for dynamically-inserted absolutely positioned child of display:inline
Categories
(Core :: Layout: Positioned, defect)
Tracking
()
People
(Reporter: dholbert, Unassigned)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
STR:
- Load attached testcase.
EXPECTED RESULTS:
The cyan element that appears should exactly cover up the red target.
ACTUAL RESULTS:
The cyan element ends up near the top left of the viewport, which is well outside of its abspos containing block.
This is an incremental-layout bug -- if I adjust the testcase to have the cyan (abspos) element already-present up-front, or if I force frame reconstruction by temporarily toggling display:none
on the html
or body
element, then the cyan element mostly covers up the red target area. It's only when it's dynamically inserted that we end up giving it the completely wrong position.
This is related to bug 489100, but a bit worse -- in bug 489100, the abspos thing is still ending up positioned with respect to part of its (inline-level) containing block, whereas here we seem to be escaping it entirely.
This seems to be the underlying cause of webcompat site-report bug 1911066.
Reporter | ||
Comment 1•6 days ago
|
||
Reporter | ||
Comment 2•6 days ago
•
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0)
This is an incremental-layout bug -- if I adjust the testcase to have the cyan (abspos) element already-present up-front, or if I force frame reconstruction by temporarily toggling
display:none
on thehtml
orbody
element, then the cyan element mostly covers up the red target area. It's only when it's dynamically inserted that we end up giving it the completely wrong position.
Here's a "semi-reference case" to demonstrate this^.
This "semi-reference" ends up with the exact same DOM/styling as in testcase 1, but here we just append the abspos element before the first full layout. We render this version somewhat better, with the cyan element mostly covering up the red area -- just shifted upwards a little bit (I think that slight offset is bug 489100 or something similar).
Description
•