Closed
Bug 47432
Opened 25 years ago
Closed 24 years ago
different result with table in mozilla and NS 4/IE 5
Categories
(Core :: Layout, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: asmozilla2, Assigned: bernd_mozilla)
Details
(Keywords: memory-leak, testcase, Whiteboard: fix for mozilla 0.9?)
Attachments
(9 files)
|
487 bytes,
text/html
|
Details | |
|
991 bytes,
text/html
|
Details | |
|
730 bytes,
text/html
|
Details | |
|
2.17 KB,
patch
|
Details | Diff | Splinter Review | |
|
451 bytes,
text/html
|
Details | |
|
514 bytes,
text/html
|
Details | |
|
2.11 KB,
text/html
|
Details | |
|
2.11 KB,
patch
|
Details | Diff | Splinter Review | |
|
874 bytes,
patch
|
Details | Diff | Splinter Review |
BuildID: 20000080208
The code included renders differently in Mozilla and NS 4/IE 5
Reducing by 1 the two colspans will fix it - but the code as is is legal and
possibly shows an error.
| Reporter | ||
Comment 1•25 years ago
|
||
Comment 2•25 years ago
|
||
confirmed on 080308, win95...confirming bug.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 3•25 years ago
|
||
Re-assigning bugs on Clayton's list opened between 7/29 and 8/4 to Kevin for
further triage.
Assignee: clayton → kmcclusk
Comment 4•25 years ago
|
||
Setting the width of the table to 732 prevents it from placing the last image
on the second column. Setting table width to 731 or lower causes the last image
to wrap.
It looks like its using the width of the colspan to determine the width of the
rest of the table.
Assignee: kmcclusk → karnaze
Comment 5•25 years ago
|
||
Comment 6•25 years ago
|
||
Look on the previous testcase with Mozilla and Nav in parallel and look how they
fail. It seems that the redistribution of the excess space to the third column
is wrong. IMHO on the third table the width of the third column is equaly to the
desired content width of the column in the first row. (700-180=520).The bug
arises from AssignNonPctColWidths (look on the table dumps). Checked with
2000091905 under Win98.
Updated•25 years ago
|
Comment 7•25 years ago
|
||
Comment 8•25 years ago
|
||
This bug arrises from a wrong algorithm inside ComputeNonPctColspanWidths.
Please have a look on the third column of the table frame dump:
AssignNonPctColWidths ex
***START TABLE DUMP***
mColWidths=1395 1395 495
col frame cache ->
0=00BC19C0 1=00BC1A28 2=00BC1A90
**START COL DUMP** colIndex=0 isAnonymous=0 constraint=0
widths=0 0 -1 1395 3855 -1 -1 -1 -1 **END COL DUMP**
**START COL DUMP** colIndex=1 isAnonymous=0 constraint=0
widths=0 0 -1 1395 3855 -1 -1 -1 -1 **END COL DUMP**
**START COL DUMP** colIndex=2 isAnonymous=0 constraint=0
widths=120 120 -1 495 8400 -1 -1 -1 -1 **END COL DUMP** ***END TABLE DUMP***
The algorithm sees in the first row a colspan=3. All the excess width should be
distributed to the cells below. As the first two cells belong to another colspan
they have a width of -1 and as a result *all* the excess goes to third column.
http://bugzilla.mozilla.org/showattachment.cgi?attach_id=15926 shows what
happens if the rows are reversed. It seems: under these conditions the algorithm
is correct.
A correct algorithm should take into account that a colspan can consist not only
of auto, percentage and fixed width cells but also of cells that belong to
another colspan.
Comment 10•25 years ago
|
||
Netscape's standard compliance QA team reorganised itself once again, so taking
remaining non-tables style bugs. Sorry about the spam. I tried to get this done
directly at the database level, but apparently that is "not easy because of the
shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian
Updated•24 years ago
|
QA Contact: ian → amar
| Assignee | ||
Comment 12•24 years ago
|
||
| Assignee | ||
Comment 13•24 years ago
|
||
The idea behind the patch is to sort the information from the rows in such a
manner that the smaller colspans are treated first. The patch passed the
regression tests and makes us look better than some competitor (M+%&!"t).
Comment 14•24 years ago
|
||
bug 38173 is proposing ns[Auto]UInt32Array which might be useful here.
| Assignee | ||
Comment 15•24 years ago
|
||
| Assignee | ||
Comment 16•24 years ago
|
||
| Assignee | ||
Comment 17•24 years ago
|
||
| Assignee | ||
Comment 18•24 years ago
|
||
Comment 19•24 years ago
|
||
Bernd, r=karnaze if you add some comments indicating the reordering you are
doing. Don't go overboard - maybe 2 lines of comments in a couple of places.
| Assignee | ||
Comment 20•24 years ago
|
||
my new comment will be:
//if more than one colspan originate in a column, resort the access to
//the rows so that the inner colspans are handled first
Comment 21•24 years ago
|
||
This looks good, but you might want to address the possible memory leak here:
+ PRInt32* rowIndices = new PRInt32[numRows];
+ if(!rowIndices)
+ return;
The previous allocation, numColSpans, will not be deleted in this unlikely error
condition. Like rbs suggested, an auto-array would solve the problem nicely.
sr=attinasi
| Assignee | ||
Comment 22•24 years ago
|
||
fix checked in
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Reopening. The last part of the patch (the two calls to |delete[]|) was not
checked in, so this leaks. (Also, shouldn't the |delete| you added in response
to review comments be |delete[]| instead?)
Whiteboard: fix for mozilla 0.9?
| Assignee | ||
Comment 24•24 years ago
|
||
Comment 25•24 years ago
|
||
Yes, please check in the patch that cleans up! [s]r=attinasi
Comment 26•24 years ago
|
||
r=karnaze
Comment 27•24 years ago
|
||
a=asa@mozilla.org (on behalf of drivers) for checkin to 0.9
| Assignee | ||
Comment 28•24 years ago
|
||
fix checked in. David can you verify?
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Comment 29•24 years ago
|
||
when I look at the HTML testcases attached NS6.1 seems to work fine. But the
same HMTL renders differently in NS4.77 and IE... But I think NS6.1 is rendering
the HTML correctly where as NS4.77 and IE does not.. Can some have a look at
this and correct me I am wrong..
Leaving bug as resolved..............
| Reporter | ||
Comment 30•23 years ago
|
||
Verifying, (a little late I know).
Should it also be closed?
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•