Closed
Bug 46944
Opened 25 years ago
Closed 24 years ago
when using percentage width table layout differs from NN47 and IE
Categories
(Core :: Layout: Tables, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: devotip, Assigned: bernd_mozilla)
References
()
Details
(Keywords: testcase)
Attachments
(3 files)
|
1.24 KB,
text/html
|
Details | |
|
312 bytes,
text/html
|
Details | |
|
865 bytes,
patch
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; m17) Gecko/20000729
BuildID: 2000072904
the layout of the table is different from NN47 and is likely to be wrong in Mozilla
Reproducible: Always
Steps to Reproduce:
1.open the provided url or the attached simplified page
Actual Results: Both NN47 and mozilla are displaing the page but the layout is
dramatically different
Expected Results: same layout
| Reporter | ||
Comment 1•25 years ago
|
||
Comment 2•25 years ago
|
||
it doesn't really look like it's incorrect, even thought it's different - the
HTML is very screwy, and doesn't specifically say a fixed size for the columns.
| Reporter | ||
Comment 3•25 years ago
|
||
The layout I get from Mozilla is a two columns table, the left one is larger
then the right one, with NN47 the right one is the larger.
IMO the witdh=20% is setting the width of the left column to 20% of the current
margins so the NN47 behaviour is the correct one. IE5 is doing like NN47.
Comment 4•25 years ago
|
||
Comment 6•25 years ago
|
||
Even though the markup is screwy, we should still do this correctly for cross
browser compatibility. IE and Nav do this correctly.
Looking at the second test case (12121), using a fixed or auto width for the
first row with the colspan solves this problem. Percentage width is not being
calculated correctly and is throwing off the whole table.
| Reporter | ||
Comment 7•25 years ago
|
||
Still real with (win98 2000111720)
| Reporter | ||
Comment 8•24 years ago
|
||
Still real with win98 2001031604
Summary: table layout differs from NN47 → when using percentage width table layout differs from NN47 and IE
| Reporter | ||
Updated•24 years ago
|
Keywords: correctness,
mozilla0.9
| Assignee | ||
Comment 10•24 years ago
|
||
steeling this bug
| Assignee | ||
Comment 11•24 years ago
|
||
Analysis: In the attached testcase a colspan requires only 20% while covering
the all columns. Currently we take the authors intentions as real compute the
numbers based on the wrong assumption of 20% width and later grow the spanned
columns wrong.
http://lxr.mozilla.org/seamonkey/source/layout/html/table/src/BasicTableLayoutStrategy.cpp#1529
My guess is that IE5 and NN4 simply ignore the percent width for these colspans.
We could do the same by assuming a 100% width for this colspan.
see the following patch
@@ -1527,6 +1530,8 @@
float cellPct = 0.0f;
if (eStyleUnit_Percent == cellPosition->mWidth.GetUnit()) {
cellPct = cellPosition->mWidth.GetPercentValue();
+ if(colSpan == numEffCols)
+ cellPct=1.0f;
cellPctWidth = nsTableFrame::RoundToPixel(NSToCoordRound(
((float)basis) * cellPct ), aPixelToTwips);
if (!mIsNavQuirksMode) {
// need to add padding
The patch passes the table regression tests
Status: NEW → ASSIGNED
Comment 12•24 years ago
|
||
r=karnaze. Bernd, please make whitespace consistent with the rest of the code,
please make an attachment out of the patch. Thanks.
| Assignee | ||
Comment 13•24 years ago
|
||
Comment 14•24 years ago
|
||
Looks good to me. sr=attinasi Thanks again Bernd!
| Assignee | ||
Comment 15•24 years ago
|
||
fix + testcase checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 16•24 years ago
|
||
I dont see any differences in the testcase between NS6.1 and NS4.77, IE 5.0
Platform : win98
Build ID# 2001060409
marking verified
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•