position:absolute child with 'auto' position in <legend> doesn't have the correct position
Categories
(Core :: Layout: Form Controls, defect, P5)
Tracking
()
People
(Reporter: TYLin, Unassigned)
Details
Attachments
(3 files)
Steps to reproduce:
Load the attached test case.
Expected results:
There's a blue box after "Legend".
Actual result:
No blue box after "Legend".
Reporter | ||
Comment 1•5 years ago
|
||
The legend frame is reparented under fieldset frame [1], but the absolute:position children in <legend>
is still parented under the inner anonymous frame of fieldset, not the fieldset frame. Maybe that's why the position of the blue box isn't correct.
Comment 2•5 years ago
|
||
I debugged this a bit and it turns out the position of the abs.pos. frame
is actually correct. The reason it's invisible is that overflow:hidden
clips it. Similar to this testcase.
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
So, given our box tree, I think the current rendering is correct.
Normally, overflow != visible makes the scroll frame the abs.pos.
container and by default everything that is top/left of the scroll
origin is clipped.
I guess we could make the (outer) nsFieldsetFrame the abs.pos.
container instead (for children of the "rendered legend" only),
but that might cause other issues...
We should probably wait for Chrome to fix this bug first:
https://bugs.chromium.org/p/chromium/issues/detail?id=786475
I suspect that if they do, they might get the same rendering
for these testcases.
Reporter | ||
Comment 5•5 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #4)
So, given our box tree, I think the current rendering is correct.
Normally, overflow != visible makes the scroll frame the abs.pos.
container and by default everything that is top/left of the scroll
origin is clipped.
I didn't think overflow:hidden could be the issue. Thanks for debugging this.
I guess we could make the (outer) nsFieldsetFrame the abs.pos.
container instead (for children of the "rendered legend" only),
but that might cause other issues...
Right. It's doable to reparent absolute frames, but it's a rare practice in our frame constructor.
We should probably wait for Chrome to fix this bug first:
https://bugs.chromium.org/p/chromium/issues/detail?id=786475
I suspect that if they do, they might get the same rendering
for these testcases.
<fieldset> with overflow scrolling on Chrome looks so wrong to me ;)
Updated•2 years ago
|
Description
•