Closed
Bug 266850
Opened 20 years ago
Closed 20 years ago
[FIX]Table with position:absolute (and no top/left specified) inside div is positioned incorrectly
Categories
(Core :: Layout: Positioned, defect)
Core
Layout: Positioned
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha5
People
(Reporter: uriber, Assigned: bzbarsky)
References
Details
(Keywords: regression, testcase)
Attachments
(4 files, 1 obsolete file)
348 bytes,
text/html
|
Details | |
10.96 KB,
image/png
|
Details | |
11.25 KB,
image/png
|
Details | |
8.22 KB,
patch
|
MatsPalmgren_bugz
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
When a table is contained within a div, the table is absolutely-positioned, and
no values are given for "top" or "left", the table is positioned regardless of
the position of the containing div.
Seeing this on:
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041028
Firefox/0.9.1+
Assuming this is a valid bug, it is a recent regression. The 20041026 Firefox
trunk build displayes the table just below the text in the containing div.
(there was no 20041027 mac trunk build so I couldn't test it).
Originally saw this when investigating bug 266715.
Testcase and screenshot coming up.
Reporter | ||
Comment 1•20 years ago
|
||
Testcase. In recent nightlies, the table is overlayed on the text (dots) above
the div in which it is contained.
Reporter | ||
Comment 2•20 years ago
|
||
Screenshot of testcase in:
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041028
Firefox/0.9.1+
Reporter | ||
Comment 3•20 years ago
|
||
Screenshot of testcase in:
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041026
Firefox/0.9.1+
Reporter | ||
Updated•20 years ago
|
Comment 4•20 years ago
|
||
Regression window on Linux: 2004102606 -- 2004102705 (bug 263406?)
Component: Layout: Tables → Layout: R & A Pos
QA Contact: core.layout.tables → core.layout.r-and-a-pos
Comment 5•20 years ago
|
||
Applying attachment 163244 [details] [diff] [review] to a recent but pre-263406 tree introduces the error.
Comment 6•20 years ago
|
||
The problem is that the place holder frame has the wrong parent...
Before bug 263406:
MATS: CreatePlaceholderFrameFor aFrame=TableOuter(table)(1)@0x84d6460
aParentFrame=Block(div)(7)@0x84d61f8
After bug 263406:
MATS: CreatePlaceholderFrameFor aFrame=TableOuter(table)(1)@0x84bae20
aParentFrame=Area(html)(-1)@0x84b9b00
Assignee: nobody → mats.palmgren
Assignee | ||
Comment 7•20 years ago
|
||
Perhaps we need to add an assert to SetInitialChildList() that all the incoming
frames have our frame as the parent or something?
The issue seems to be that in ConstructTableFrame() we have both
aGeometricParent (the area frame in this case) and aContentParent (the div in
this case). We use the aGeometricParent to create our pseudoframes as needed
(which I guess makes some sense). But we init parentFrame to the geometric
parent too. That's the part that's wrong, though I'm not sure what the best fix is.
I hate table pseudo-frames. :(
Comment 8•20 years ago
|
||
Assignee | ||
Comment 9•20 years ago
|
||
Oh, and maybe we can make the layout regression tests keep track of parent
frames? Or do they already?
Updated•20 years ago
|
Attachment #163996 -
Flags: superreview?(bzbarsky)
Attachment #163996 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 10•20 years ago
|
||
Mats, I'm not sure that's right. In particular, consider the following situation:
<div style="display: table-row">
<div style="display: table">
</div>
</div>
In this case aContentParent should be the table-row, but the frame we actually
want to use as the parent of the placeholder is the cell-inner block inside the
anonymous cell...
Comment 11•20 years ago
|
||
(In reply to comment #9)
> Oh, and maybe we can make the layout regression tests keep track of parent
> frames? Or do they already?
Are you saying that the layout regression tests is working again?
I think this would have been caught anyway since the position is wrong.
Comment 12•20 years ago
|
||
(In reply to comment #10)
> In this case aContentParent should be the table-row, but the frame we actually
> want to use as the parent of the placeholder is the cell-inner block inside the
> anonymous cell...
OK, I see what you mean...
Updated•20 years ago
|
Attachment #163996 -
Attachment is obsolete: true
Attachment #163996 -
Flags: superreview?(bzbarsky)
Attachment #163996 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 13•20 years ago
|
||
> Are you saying that the layout regression tests is working again?
They've been working all along.... Build the layout-debug extension, run
"mozilla -layoutdebug", load the .lst file is as the regression test, etc.
There are instructions somewhere on Mozilla.org.
Note that I did run the regression tests on the patch in bug 263406.
I agree that they would have caught this anyway, except they have a _lot_ of
false positives and I was looking for frame tree changes (since I was changing
frame construction) and just skimming over the layout changes..... so I may
well have missed this, since it wasn't flagged as a frame tree change.
Assignee | ||
Comment 14•20 years ago
|
||
I think the right thing to do is to eliminate the aGeometricParent argument
altogether. It's only used in one place, and that's the one that's messing up.
We recompute the geometric parent inside this method anyway.
Patch coming up in a second.
Assignee | ||
Comment 15•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #163999 -
Flags: superreview?(roc)
Attachment #163999 -
Flags: review?(mats.palmgren)
Comment 16•20 years ago
|
||
(In reply to comment #13)
> They've been working all along.... Build the layout-debug extension, run
> "mozilla -layoutdebug", load the .lst file is as the regression test, etc.
Thanks, I got it running now.
> There are instructions somewhere on Mozilla.org.
Not really, http://www.mozilla.org/newlayout/regress.html
Assignee | ||
Comment 17•20 years ago
|
||
I thought we had a more up-to-date document, but maybe it was just a newsgroup
post David made?
David, bernd, do you think it would make sense to keep track of parent frames in
the regression tests?
Reporter | ||
Comment 18•20 years ago
|
||
(Made summary more readable).
Summary: table with position:absolute and no top/left specified inside div is positioned incorrectly → Table with position:absolute (and no top/left specified) inside div is positioned incorrectly
Comment 19•20 years ago
|
||
Comment on attachment 163999 [details] [diff] [review]
Like so
Just for fun I ran the regression tests on this patch and it
resulted in 42 failed files (not counting false positives).
I checked a few manually but saw nothing wrong.
Does everyone else also get this many false alarms?
The patch looks fine to me.
Attachment #163999 -
Flags: review?(mats.palmgren) → review+
Comment 20•20 years ago
|
||
(In reply to comment #17)
> but maybe it was just a newsgroup post David made?
I googled for it but could not find it...
Updated•20 years ago
|
Assignee: mats.palmgren → bzbarsky
Assignee | ||
Comment 21•20 years ago
|
||
> Does everyone else also get this many false alarms?
Yes. There are a lot of tests which simply have nondeterministic frame bounding
boxes (generally this involves comboboxes). So they flag a bunch of stuff as a
failure, and since its nondeterministic only some of them overlap with the
baseline.... :(
Assignee | ||
Updated•20 years ago
|
Summary: Table with position:absolute (and no top/left specified) inside div is positioned incorrectly → [FIX]Table with position:absolute (and no top/left specified) inside div is positioned incorrectly
Target Milestone: --- → mozilla1.8alpha5
Attachment #163999 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 22•20 years ago
|
||
Fixed
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•