Closed Bug 47739 Opened 25 years ago Closed 25 years ago

[FLOAT] 'clear' property fails on TABLE element

Categories

(Core :: Layout: Tables, defect, P2)

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ian, Assigned: ian)

References

()

Details

(Keywords: css1, testcase, Whiteboard: hit during nsbeta2 standards compliance testing)

Attachments

(2 files)

The TABLE element does not clear floats when given the 'clear' property. STEPS TO REPRODUCE: See http://www.webstandards.org/css/winie/shame2/floatclear.html You may need to force Standards Mode to give Gecko a chance to get it right. ACTUAL RESULTS: It appears that a floated TABLE element doesn't clear previous floats even if it has clear:both. TESTED ON: Windows 2000 Commercial Build 6.0.17.2000080404.
Keywords: correctness, css1
QA Contact: chrisd → py8ieh=bugzilla
Whiteboard: hit during nsbeta2 standards compliance testing (py8ieh:minimise test case)
It turns out the 'clear' property seems to be simply _not working at all_ for the TABLE element. How peculiar. Nominating for nsbeta3; this occurs on a high profile test case (the Web Standards Project's list of IE complaints) and Microsoft have now fixed this bug, so it would look particularly bad to be buggy. The bug itself is quite bad too, as is explained on the test case given in the URL field.
Blocks: html4.01
Keywords: 4xp, nsbeta3, testcase
Summary: [FLOAT] Floated TABLE element doesn't clear (?) → [FLOAT] 'clear' property fails on TABLE element
Whiteboard: hit during nsbeta2 standards compliance testing (py8ieh:minimise test case) → hit during nsbeta2 standards compliance testing
Approving for beta3: into buster's list...
Assignee: karnaze → buster
Whiteboard: hit during nsbeta2 standards compliance testing → hit during nsbeta2 standards compliance testing [nsbeta3+]
This is a bug for either chris or marc. The problem is the "clear" property is getting mapped into the inner table frame's style context, and not getting propagated to the outer table frame's style context. The layout code is behaving correctly, given the style it's seeing. The style context of the frame that is floated, the table outer frame, has only the default value for the clear property. I imagine there are other properties that need to be propagated from the inner table frame's style context to the outer table frame's style context. However that is done, it should be done for "clear" as well. For your amusement, here's the relevant part of the style context dump for the first test case that contains the floated table with clear set: 00FCDCA0(5) { http://www.w3.org/1999/xhtml|table weight: 1 { display: 8[0x8]enum margin-top: 0pt margin-bottom: 0pt box-sizing: 2[0x2]enum border-collapse: 1[0x 1]enum border-x-spacing: 2px border-y-spacing: 2px } http://www.w3.org/1999/xhtml|*:first-node > http://www.w3.org/1999 /xhtml|body weight: 257 { margin-top: 0pt } *|*.b weight: 256 { background-color: "fuchsia" background-image: none background-repeat: 3[0x3]enum background-attachment: 0[0x0]enum background- x-position: 0% background-y-position: 0% float: 1[0x1]enum clear: 3[0x3]enum wid th: 100px height: 100px } } 00FCE8F0(1) :table-outer { *|:table-outer weight: 0 { opacity: inherit display: 8[0x8]enum float: inherit clip: inherit inherit inherit inherit margin-top: 0px margin-righ t: 0px margin-bottom: 0px margin-left: 0px padding-top: 0px padding-right: 0px p adding-bottom: 0px padding-left: 0px border-top-width: 0px border-right-width: 0 px border-bottom-width: 0px border-left-width: 0px border-style: none none none none position: inherit width: 0px height: 0px z-index: inherit top: inherit righ t: inherit bottom: inherit left: inherit } }
Assignee: buster → attinasi
Chris, since the outer is a child of the inner this probably should inherit, however 'clear' does not inherit by default. Should we make it inherit (via html.css) or do you have an internal mechanism for this kind of propagation?
Status: NEW → ASSIGNED
Looks like the mechanism is html.css: :table-outer { display: table; margin: 0px; border: 0px; padding: 0px; float: inherit; position: inherit; top: inherit; right: inherit; bottom: inherit; left: inherit; z-index: inherit; clip: inherit; opacity: inherit; width: 0px; /* hack for boxes */ height: 0px; /* hack for boxes */ } I can fix that easily when I do the rest of the ua.css changes (this week I hope, if the builds remain stable for long enough). My fix would be to change it to: :table-outer { display: table; margin: 0; border: none; /* '0' is not useful border value */ padding: 0; width: 0; /* move up and remove comment */ height: 0; /* move up and remove comment */ float: inherit; clear: inherit; /* add clear */ position: inherit; top: inherit; right: inherit; bottom: inherit; left: inherit; z-index: inherit; clip: inherit; opacity: inherit; } r=?
Assignee: attinasi → py8ieh=bugzilla
Status: ASSIGNED → NEW
Priority: P3 → P1
QA Contact: py8ieh=bugzilla → attinasi
Target Milestone: --- → M18
Ian, the change looks great. I was hoping it would be that easy... I like the clean-up as well (the comments were just for illustration, right? they should be removed). r=attinasi@netscape.com
ok, cool. (yes comments were for illustration only)
Status: NEW → ASSIGNED
Whiteboard: hit during nsbeta2 standards compliance testing [nsbeta3+] → hit during nsbeta2 standards compliance testing [nsbeta3+] [have fix]
Depends on: 3935
No longer depends on: 3935
Blocks: 6625
The proposed fix works.
Whiteboard: hit during nsbeta2 standards compliance testing [nsbeta3+] [have fix] → hit during nsbeta2 standards compliance testing [nsbeta3+] [FIX IN HAND]
This one's not a show stopper for ship. PDTP2.
Priority: P1 → P2
Whiteboard: hit during nsbeta2 standards compliance testing [nsbeta3+] [FIX IN HAND] → hit during nsbeta2 standards compliance testing [nsbeta3+] [FIX IN HAND][PDTP2]
Gulp. This is a pretty major standards-compliance bug, with a really easy fix.
David: I think ian has this one well in hand. Don't sweat it, we'll get it in.
fix was checked in, i think
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
blake: Did you check that the fix was checked in? Anyway, FIXED by making :table-outer inherit the 'clear' property in html.css.
works with webstandards, and both attached testcases with 2000092608 on win2000
Works for Me Platform: PC OS: Windows 98 Mozilla Version: 2000100508 Marking as Verified
Status: RESOLVED → VERIFIED
Whiteboard: hit during nsbeta2 standards compliance testing [nsbeta3+] [FIX IN HAND][PDTP2] → hit during nsbeta2 standards compliance testing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: