Closed Bug 19961 Opened 26 years ago Closed 26 years ago

Table cell not obeying specified width, height

Categories

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

defect

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: richard, Assigned: karnaze)

References

()

Details

(Keywords: helpwanted, testcase, Whiteboard: [nsbeta2-] [rtm++] [rtm-] a=buster, r=dcone)

Attachments

(12 files)

The left cell is not obeying the width of 150 pixels given to it specifically when the right cell does not contain enough content to fill out the rest of the 100% width on the table. The engine should restrict the left column and let the right column (whose width is unspecified) stretch to the remainder of the table width regardless of the content therein. Renders properly in IE 4/5.
On NT 4.0 sp4, Mozilla-Win32-M11-fullcircle build 1999111520 and Netscape 4.7 behaves identically: neither one splits "too long" text line in the two lines and both allow left cell grow over 150 pixels. IE 5.00 honors left cell restriction. I think this is somewhat basic table handling. So it seems this behavior is more like a feature than a bug for NS-alike products :). Anyway, here's shrinken test case from given URL (XHTML things (XML) and unnecessary margin settings could be further removed): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd"> <html xmlns="http://www.w3.org/TR/xhtml1"> <head> </head> <body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0"> <table border="0" cellpadding="0" cellspacing="0" width="90%"> <tr> <td width="150"> Over 100 Local Wedding Professionals </td> <td> <font size="6">Business Directory</font> </td> </tr> </table> </body> </html>
Status: NEW → ASSIGNED
Adding layout keyword.
Target Milestone: M15
*** Bug 22533 has been marked as a duplicate of this bug. ***
*** Bug 20096 has been marked as a duplicate of this bug. ***
*** Bug 20224 has been marked as a duplicate of this bug. ***
*** Bug 20453 has been marked as a duplicate of this bug. ***
Attached file simplified testcase —
Whiteboard: [TESTCASE]
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
Whiteboard: [TESTCASE]
*** Bug 21260 has been marked as a duplicate of this bug. ***
*** Bug 22665 has been marked as a duplicate of this bug. ***
I'm adding HEIGHT since the same problem arises here. If you have a TABLE of height 100%, and two cells, one with a specified height, both grow to 50% of the table height. Attaching a testcase.
OS: Windows NT → All
Hardware: PC → All
Summary: Table cell not obeying specific width → Table cell not obeying specified width, height
*** Bug 26665 has been marked as a duplicate of this bug. ***
We could make it work this way in standard mode. Marking remind.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → REMIND
Spoke with Karnaze and he agreed that this bug is not REMIND. Reopening with new testcase and nominating it for beta2.
Status: RESOLVED → REOPENED
Keywords: nsbeta2
Resolution: REMIND → ---
*** Bug 36501 has been marked as a duplicate of this bug. ***
*** Bug 38155 has been marked as a duplicate of this bug. ***
Target Milestone: M15 → M17
Moving to M17.
Status: REOPENED → ASSIGNED
This bug has a lot of duplicates, justifying the nsbeta2 nomination.
*** Bug 31700 has been marked as a duplicate of this bug. ***
Attaching two testcases which are basicly the same. They tests both width and height. The first testcase has some scripts that allow easy viewing of all sizes as well as chaning size of the content of one cell. (The float:left is a workaround for bug 39683) The width of col 2 and the height of row 2 should be ~50px. col 1 and col 3 should have the same width. row 1 and row 3 should have the same height. The column widths seems to work in this testcases but the row heights dosn't. IE does not render this correctly.
Putting on [nsbeta2-] radar.
Whiteboard: [nsbeta2-]
Adding keyword, sorry for the spam!
Keywords: mostfreq
I'm not sure if this has to do with Mozilla's height stuff, or if perhaps it has more to do with its padding, but the following are examples of web sites where Mozilla adds some sort of padding to the cells while no padding or margins or any spacing should be there: http://www.gigabee.com http://konverse.sourceforge.net/default.php (right now that default.php is needed, FYI) I don't think any other browser is having problems with these two sites, including KDE2's Konqueror. They both contain valid code.
*** Bug 43773 has been marked as a duplicate of this bug. ***
Another example for problems with height/width results in wrapping cell content where none should be: http://www.evangelium.de The title bar normally is shown as a continuous shadowed bar with logo to the left an linkbar to the right. Also the two input fields should be shown side by side. IE and NC4.7x do not have problems with that.
This is not entirely fixed yet. The last 2 Test cases (5/17/00 18:38 and 5/17/00 18:41) seem to be fine, but the "testcase" to demonstrate problem 4/28/00 18:58) still shows that when you assign the first column to 150px, and leave the 2nd column unassigned, Mozilla ignores the 150px altogether, and the resulting column width is arbitrary.
Keywords: correctness, nsbeta3
Denying for beta3: not critical to release.
Whiteboard: [nsbeta2-] → [nsbeta2-] [nsbeta3-]
Target Milestone: M17 → Future
The two pages Bart Szyszka mentioned on 6-25 are duplicates of the invalid bug 22274 and are not related to this bug.
Help wanted.
Keywords: helpwanted
I am just trying to figure out what is going on in BasicLayoutStrategy. see: http://bugzilla.mozilla.org/showattachment.cgi?attach_id=5646
Going back to the original problem. A table has a width of 100% and contains 2 cells. The first cell has a specific width of 150px; the second cell has no specific width. The table should render the first cell at 150px and expand the second cell across the remaining table. Netscape 6 does not honor the 150px value until the second cell has enough content to push the first cell back to 150px. Simplified testcase attached. There is another bug #33137 with a similar generic summary (<td> width attribute ignored). The issue, however appears to be a separate one. Removing 'nsbeta3-' and renominating this bug for nsbeta3+ consideration.
Whiteboard: [nsbeta2-] [nsbeta3-] → [nsbeta2-]
Found a fix for the width, regression tests still ahead.
Whiteboard: [nsbeta2-] → [nsbeta2-][nsbeta3+]
*** Bug 50173 has been marked as a duplicate of this bug. ***
Who marked this NSBETA3+? Anyway, denying for beta3. Chris, please chek out the possibility of implementing the IE behavior in standard mode if it is correct. Current pages will be fine rendered as Nav does it, so this is not critical for RTM.
Whiteboard: [nsbeta2-][nsbeta3+] → [nsbeta2-][nsbeta3-]
Marc according to "View Bug Activity" http://bugzilla.mozilla.org/show_activity.cgi?id=19961 chrisd@netscape.com Silly questions don't deserve answering. Useful questions do. Chris did you have a reason for +'ing this bug (including PDT consnet)? At the risk of being thuroughly annoying i should remove your [nsbeta3-] because chris can't work on it otherwise, and you just asked him to.
Attached file patch —
I just attached the patch in order to demonstrate the idea how one could solve the width problem. It fixes the testcases for the width. I am trying to check it against the regression tests (rtest.bat) but experience a lot of difficulties (isn't that a nice word for bug :-)).
And the regression test failed, due to a coding error. So please ignore the patch now, there will be soon something better.
A quote from: http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/nsTableFrame.cpp#3 459 which seems to be related to the height problem: // proportionately distribute the excess height to each row. Note that we // don't need to do this if it's an unconstrained reflow
Attached patch corrected patch — — Splinter Review
Attached patch regression tests — — Splinter Review
The proposed path fixes the width problems as outlined in this bug. I tested the patch against the table testcases as required in the regression tests. The patch fixes also the numerous duplicates. So it needs a review.
Keywords: patch
Keywords: review
Whiteboard: [nsbeta2-][nsbeta3-] → [nsbeta2-]
I was probably so impressed by my patch that I did not read the commented out code: http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/BasicTableLayoutSt rategy.cpp line 323 and 328ff. It does exactly the same. Only the nasty NavQuirks are there. :-( According to CVS blame this line was commented out for a fix of bug 14332. I think that it was not necessary to comment out these lines. They do not influence the testcases from bug 14332 (with and without NavQuirks).
Please don't do this in NavQuirks only. The *suggestion* from w3c on automatic tables isn't really useful and is (I think) mostly designed for backwards compability.
*** Bug 51534 has been marked as a duplicate of this bug. ***
In standard mode, the fixed width is now being honored. The height problem has not been addressed. I'm marking this nsbeta3-.
Whiteboard: [nsbeta2-] → [nsbeta2-] nsbeta3-
> In standard mode, the fixed width is now being honored. I'm sorry; I'm a bit new to the party, and I'm a bit confused. So if I am not making much sense, please bear with me, OK? Thanks. In bug 51534, which is a dup of this one, I made an attachment (http:// bugzilla.mozilla.org/showattachment.cgi?attach_id=14095) to illustrate this problem. Since this is supposedly fixed for widths, I'm trying to view it with the latest Moz build (2000090820 Mac). It has no DTD declaration, so it renders in quirks mode, and doesn't get this fix. But if I give it a DTD of Transitional HTML 4, it still renders incorrectly. (View the bug's URL referenced-page for a live example of the HTML marked as transitional.) Is there a quick explanation anywhere what makes gecko trigger quirks mode? Why is my sample still not laying out correctly?
Avi: The fix was checked in 9/10/2000. You are using a version of the browser from 9/8/2000. So I suggest you download today's daily build when it is ready, and try again.
The width problem has not been fixed (or has regressed). Removing nsbeta3- for reevaluating. The only attatched testcases where the width worked is the testcases from 05/17/00 (8817 & 8818). Tested on Win98SE with build 2000-09-12-08
Whiteboard: [nsbeta2-] nsbeta3- → [nsbeta2-]
Not fixed as of 9/12 build.
>>>In standard mode, the fixed width is now being honored. exactly here comes the line 326 from BasicTableLayoutStrategy.cpp PRBool onlyAllocateAutoCols = (totalCounts[DES_CON] > 0) && !mIsNavQuirksMode; That means all testcase, where the Quirkstylesheet is enabled will not render correctly. See my previous comment about NavQuirks. Also the behviour of the majority of the files listed in the regression test do not change theire buggy behaviour. The question here is whether one would like to propagate the buggy Nav behaviour into the future. Nobody (including the qa contact) will understand this ;-).
I would like very much to make it work correctly even in quirks mode. I'm CCing ekrock to see what he has to say.
Sorry about using 2000090820. That was the latest Mac nightly and I realized my mistake just after posting. That said, it still doesn't work in 2000091220 Mac.
*** Bug 44361 has been marked as a duplicate of this bug. ***
There is also another issue related to scrolling when a table has some padding or border AND width=100%, then the horizontal scrollbar kiks in. I think it also does for the height and the horizontal scrollbar...
Tested with current builds on Win, Mac and Linux. Fixed in 'standard' mode, behaves like Nav in 'quirks'. I guess this is pending a decision of whether to correct this in 'quikrs' mode.
There are quite a number of dups to this one and proboly all of them come from pages rendered in quirks mode. Also IE does this so noone should be surpriced if Mozilla does too. Furthermore it is more logical and intuitive behavoiur, not to mention the fact that the less quirks and normal differ, the better
What is the hesitation for doing this in quirks mode? If IE does it, what pages could it break?
Adding rtm+. It should work the same way in quirks and standard modes.
Keywords: rtm
Whiteboard: [nsbeta2-] → [nsbeta2-] [rtm+]
PDT marking [rtm need info] since it doesn't appear that code reviews are done for this patch.
Whiteboard: [nsbeta2-] [rtm+] → [nsbeta2-] [rtm need info]
Priority: P3 → P2
a=buster
Marking rtm+
Whiteboard: [nsbeta2-] [rtm need info] → [nsbeta2-] [rtm+ a=buster, r=dcone]
Whiteboard: [nsbeta2-] [rtm+ a=buster, r=dcone] → [nsbeta2-] [rtm+] a=buster, r=dcone
rtm++
Whiteboard: [nsbeta2-] [rtm+] a=buster, r=dcone → [nsbeta2-] [rtm++] a=buster, r=dcone
The width now works the same in standard mode and quirks mode so that portion is fixed. The height issues are not as compelling and will have to wait.
Verified this is fixed (width problem) in quirk and standard mode using 10/6 build on Win98. ChrisK. - can you mark this fixed?
It fixes only the width portion of the bug, which is the more important, nervertheless this bug should not be marked fixed, instead the keywords should move the remaining height problem after rtm.
Adding [rtm-] since the remaining part is not critical. This gets the bug out of some queries.
Whiteboard: [nsbeta2-] [rtm++] a=buster, r=dcone → [nsbeta2-] [rtm++] [rtm-] a=buster, r=dcone
Based on above comments, I'm marking this fixed (so that QA can do regression testing). Please open another bug for the remaining details. Thanks, Jim
Status: ASSIGNED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
The original problem in this bug was the width problem. That has been fixed and I am verifying it so (on branch). Adding vtrunk keyword.
Keywords: vtrunk
Verified Fixed on trunk builds with 8/23 testcase linux 101708 RedHat 6.2 win32 101704 NT 4 mac 101704 Mac OS9 Setting bug to Verified and removing vtrunk keyword
really removing vtrunk keyword and setting bug to verified. sorry for the spam.
Status: RESOLVED → VERIFIED
Keywords: vtrunk
What is the bug number on the remaining issues (heights)? (I assume such a bug has been filed since this bug is marked verified.)
david, they are working(?) on the table height issue in bug #26183,
That bug is unrelated. Since there were no other responses to my question, I filed bug 58402.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: