Closed
Bug 1289
Opened 26 years ago
Closed 21 years ago
Absolutely positioning of table elements [ABS POS]
Categories
(Core :: Layout: Tables, defect, P4)
Core
Layout: Tables
Tracking
()
RESOLVED
INVALID
Future
People
(Reporter: rh, Unassigned)
References
()
Details
(Keywords: css2, qawanted, testcase, Whiteboard: [bae:20011119](py8ieh:recheck with wg that cells cannot be floated)[nsbeta3-])
In this document there is a table with an absolutely positioned table with
absolutely specified dimiensions. The table frame bottom edge is wrong. (works
fine in IE).
Updated•26 years ago
|
Summary: table frame extends too low → Abs. positioining of DIV in a table increases table height
Comment 1•26 years ago
|
||
Note to bug reporter: please do not submit bugs like this. Instead, narrow it
down to simple test case. Here is the simple test case for this bug:
It appears the absolutely positioned DIV inside the last cell is causing the
problem. This looks like malformed content, but I didn't see the DIV being
rendered anywhere. Source code is below.
Adding Steve to the cc: list becuase I'm not sure if this is a layout thing or a
tables thing.
<TABLE border=1 cellSpacing=0
style="LEFT: 74pt; POSITION: absolute; TOP: 128pt; WIDTH: 464pt">
<TR style="HEIGHT: 17pt">
<TD align=left style="WIDTH: 114pt" vAlign=top>
Feature</TD>
<TD align=middle style="WIDTH: 116pt" vAlign=top>
1970s</TD>
<TD align=middle style="WIDTH: 115pt" vAlign=top>
1980s</TD>
<TD align=left style="WIDTH: 115pt" vAlign=top>
1990s
<DIV class=f4 style="LEFT: 533pt; POSITION: absolute; TOP:
130pt">foo</DIV></TD></TR>
</TABLE>
Changing summary to reflect problem.
This is indeed malformed HTML. sorry for your trouble. (IE does seem to be
better at recovering from it though).
Comment 4•26 years ago
|
||
per leger, assigning QA contacts to all open bugs without QA contacts according
to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
troy: this is crashing in an assertion in the nsFrameList code because the
expected parent of the absolute item being appended != the actual parent. Maybe
the assertion is wrong? However, since I don't see any (obvious) code in
nsAreaFrame for reparenting the absolute children, I'm guessing its a frame
construction bug...
Chris, the table related frame construction code seems to be doing the wrong
thing for absolutely positioned elements inside of tables which is why the
parent frame is wrong. Here's the stack trace for the assert:
NTDLL! 77f76148()
nsDebug::Assertion(const char * 0x00730a44, const char * 0x00730a30, const char
* 0x00730a04, int 343) line 140 + 13 bytes
nsFrameList::VerifyParent(nsIFrame * 0x01065620) line 343 + 34 bytes
nsFrame::AppendFrames(nsFrame * const 0x01065620, nsIPresContext & {...},
nsIPresShell & {...}, nsIAtom * 0x01084090 {"Absolute-list"}, nsIFrame *
0x0106ec50) line 260
nsBlockFrame::AppendFrames(nsBlockFrame * const 0x01065620, nsIPresContext &
{...}, nsIPresShell & {...}, nsIAtom * 0x01084090 {"Absolute-list"}, nsIFrame *
0x0106ec50) line 3287 + 25 bytes
nsCSSFrameConstructor::ContentAppended(nsCSSFrameConstructor * const 0x01059d10,
nsIPresContext * 0x010842b0, nsIContent * 0x0106686c, int 0) line 3150
StyleSetImpl::ContentAppended(StyleSetImpl * const 0x0105c120, nsIPresContext *
0x010842b0, nsIContent * 0x0106686c, int 0) line 739
PresShell::ContentAppended(PresShell * const 0x01059138, nsIDocument *
0x01086980, nsIContent * 0x0106686c, int 0) line 1605 + 33 bytes
nsDocument::ContentAppended(nsDocument * const 0x01086980, nsIContent *
0x0106686c, int 0) line 1242
nsHTMLDocument::ContentAppended(nsHTMLDocument * const 0x01086980, nsIContent *
0x0106686c, int 0) line 684
HTMLContentSink::WillInterrupt(HTMLContentSink * const 0x010863f0) line 1507
CNavDTD::WillInterruptParse(CNavDTD * const 0x01058d50) line 2719 + 27 bytes
nsParser::ResumeParse(nsIDTD * 0x00000000) line 766
nsParser::OnDataAvailable(nsParser * const 0x01086564, nsIURL * 0x01084610,
nsIInputStream * 0x01086d10, unsigned int 583) line 968 + 17 bytes
nsDocumentBindInfo::OnDataAvailable(nsDocumentBindInfo * const 0x01085b40,
nsIURL * 0x01084610, nsIInputStream * 0x01086d10, unsigned int 583) line 1783 +
24 bytes
OnDataAvailableProxyEvent::HandleEvent(OnDataAvailableProxyEvent * const
0x01084ab0) line 632
StreamListenerProxyEvent::HandlePLEvent(PLEvent * 0x01084ab4) line 471 + 12
bytes
PL_HandleEvent(PLEvent * 0x01084ab4) line 476 + 10 bytes
PL_ProcessPendingEvents(PLEventQueue * 0x00f9ebf0) line 437 + 9 bytes
_md_EventReceiverProc(HWND__ * 0x6f6b009a, unsigned int 49436, unsigned int 0,
long 16378864) line 799 + 9 bytes
USER32! 77e71250()
00f9ebf0()
Updated•26 years ago
|
Status: NEW → ASSIGNED
Comment 7•26 years ago
|
||
I'm inserting some comments from Troy for future use.
The table code should behave the same as the other code (e.g., block). Sort of.
:-)
Assuming that the table itself isn't absolutely positioned (ignore that issue
for a second), then yes you should check if you have
children that are absolutely positioned and then give them a different parent
(the one passed in to the function) and return that
child back in the list of absolutely positioned children. Don't add it to your
list of flowed children, because it's being moved out
of the flow.
However (there's always a 'however'), you probably don't want to let people
absolutely position (or float) row groups, rows, or
cells; and certainly not col groups or cols. The CSS2 spec discourages this as
well.
Comment 8•25 years ago
|
||
Moving to M8
Comment 9•25 years ago
|
||
[TESTCASE]
CSS2 discourages this, but it *certainly* doesn't say you cannot do it. In fact,
it specifically says you can. (It also says you can float cells, but I have had
that revoked. The change should appear in a future errata). See section 17.5
I have created a self-explanatory test case for this:
http://www.bath.ac.uk/%7Epy8ieh/internet/projects/mozilla/tablepos.html
[Note. The original URI is now a 404, so I have changed it to the test case.]
[dbaron: I have cced you on this bug, since you have done a lot with absolute
positioning and may be interested in how this develops.]
Comment 10•25 years ago
|
||
You can relatively position table elements, but you *CANNOT ABSOLUTELY POSITION
ANY TABLE ELEMENT*, because CSS2, section 9.7 (
http://www.w3.org/TR/REC-CSS2/visuren.html#q24 ) says:
Otherwise, 'position' has the value 'absolute' or 'fixed', 'display' is set to
'block' and 'float' is set to 'none'.
Comment 11•25 years ago
|
||
(...sorry about splitting this comment. NN4.x decided not to let me type in the
text box...)
Therefore, the position:absolute on any table-type element makes it a block,
which means it is handled according to the rules on implied table elements,
which then recreates the appropriate missing element in the structure. So it's
not quite as messy as it seems. Considering the current serious problems with
implied table elements, I'm going to mark this bug as depending on bug 2479. I
don't think it's really worth trying to make sense of this until implied table
elements make sense.
Comment 12•25 years ago
|
||
Problem still occurs with the June 28th Build (1999062809)
Comment 13•25 years ago
|
||
Moving to M9.
Comment 14•25 years ago
|
||
David has convinced me that floating a table cell _does_ make sense. A floated
cell becomes a block box, and by CSS2's table creation rules, the block box is
assimilated into an anonymous cell. See CSS2 for the exact rules.
Updated•25 years ago
|
Whiteboard: [NOTESTCASENEEDED]
Updated•25 years ago
|
Target Milestone: M9 → M11
Updated•25 years ago
|
Target Milestone: M11 → M12
Comment 15•25 years ago
|
||
Moving to M12
Updated•25 years ago
|
QA Contact: petersen → chrisd
Updated•25 years ago
|
Summary: Abs. positioining of table elements → {css2} Absolutely positioning of table elements
Updated•25 years ago
|
Target Milestone: M12 → M14
Comment 16•25 years ago
|
||
mass move to m14.
Comment 17•25 years ago
|
||
Migrating from {css2} to css2 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
I am *really* sorry about the spam...
Comment 18•25 years ago
|
||
Changing [NOTESTCASENEEDED] code to new donttest keyword. Sorry for the spam!
Keywords: donttest
Whiteboard: [NOTESTCASENEEDED]
Updated•25 years ago
|
Summary: {css2} Absolutely positioning of table elements → Absolutely positioning of table elements
Comment 20•25 years ago
|
||
I have changed the anonymous table construction code and have another local
change that renders the following, but I'm not sure if it is correct. How should
the following be rendered? Can the <div> be absolutely positioned even if it
gets wraped in an anonymous table cell?
<ul style="display:table; border:1px solid black; padding:0px;
LEFT: 100px; POSITION: absolute; TOP: 150px; WIDTH: 200px">
<li style="display:table-row; padding:2px">
<div>foo</div>
</li>
<li style="display:table-row; padding:0px">
<DIV style="LEFT: 300px; POSITION: absolute; TOP: 100px">bar</DIV>
</li>
</ul>
Comment 21•25 years ago
|
||
The DIV should be absolutely positioned relative to the UL element (which is its
containing block). (Note that the UL element is not the anonymous table element
generated inside the UL element.)
Comment 23•24 years ago
|
||
Nom. nsbeta3. Recc. nsbeta3+. Want CSS2 positioning to work correctly; here it
would be broken for DIVs within TABLEs if not fixed.
Updated•24 years ago
|
Keywords: correctness
Comment 24•24 years ago
|
||
Encountered the following problem in M16 - is it related to this discussion?:
Unable to establish TABLE as a containing block with respect to which
descendents may be positioned absolutely.
The following HTML (with or without style="position:relative" in either the
TABLE or TD tags), will not cause the "absolute" DIV, or any other element, to
be absolutely positioned with respect to the TABLE.
<HTML>
outer<br>
<TABLE style="position:relative">
<tr><td>
inner<br>
<DIV id="absolute" style="position:absolute; top:0; left:0">
overwrite
</DIV>
</td></tr>
</TABLE>
</HTML>
Contents of DIV overwrite 'outer' text rather than 'inner', showing that the
absolutely positioned DIV is positioned with respect to initial containing
block rather than the TABLE.
Comment 25•24 years ago
|
||
As per meeting with ChrisD today, taking QA.
Comment 26•24 years ago
|
||
Denying beta3 nomination for absolute positioning problems in tables.
Whiteboard: (py8ieh:recheck with wg that cells cannot be floated) → (py8ieh:recheck with wg that cells cannot be floated)[nsbeta3-]
Updated•24 years ago
|
Target Milestone: M17 → Future
Comment 27•24 years ago
|
||
this is probably my bug, not chris'
Assignee: karnaze → buster
Status: ASSIGNED → NEW
Updated•24 years ago
|
Summary: Absolutely positioning of table elements → Absolutely positioning of table elements [ABS POS]
Updated•24 years ago
|
QA Contact: ian → amar
Comment 28•23 years ago
|
||
The comment Val Sharp mentioned above is bug 63895.
Comment 30•23 years ago
|
||
reducing priority
Priority: P2 → P4
Whiteboard: (py8ieh:recheck with wg that cells cannot be floated)[nsbeta3-] → [bae:20011119](py8ieh:recheck with wg that cells cannot be floated)[nsbeta3-]
Comment 31•22 years ago
|
||
Reconfirmed using FizzillaCFM/2002071208 to view testcase URL. Setting All/All.
OS: Windows NT → All
Hardware: PC → All
Comment 32•22 years ago
|
||
qawanted?
Comment 33•22 years ago
|
||
Yes. What does this bug really cover? The comments mention a wide variety of
issues; the testcase does as well. Is this a tracking bug?
Comment 34•22 years ago
|
||
attinasi will probably not work on those bugs :-(
Assignee: attinasi → table
QA Contact: amar → madhur
Target Milestone: Future → ---
Updated•22 years ago
|
Target Milestone: --- → Future
Comment 35•21 years ago
|
||
I think this bug is actually now INVALID. Here's why:
1) The listed URL is now a 404.
2) As bz mentioned above in comment 33, the bug addresses multiple issues.
3) The reporter admitted that the original test HTML was malformed.
4) Angus submitted a test case, but didn't attach it as an actual testcase
attachment (maybe this wasn't possible in 1998?). This makes it difficult for QA
to confirm the problem.
5) The issue mentioned by Val Sharp is another bug, as stated by dbaron.
If somebody wishes to reopen this bug... actually you probably shouldn't.
Instead, file a new bug that has a clear summary stating the specific problem
and an attached testcase, and CC me if you want it confirmed.
-M
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•