Closed Bug 284575 Opened 19 years ago Closed 19 years ago

Crash when dynamically adding rowspan and border to table-cells [@ TableBackgroundPainter::PaintCell ]

Categories

(Core :: Layout: Tables, defect)

x86
Windows 2000
defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: martijn.martijn, Assigned: bernd_mozilla)

Details

(Keywords: crash, regression, testcase)

Crash Data

Attachments

(2 files)

See upcoming testcase. The testcase crashes my current trunk build for 100%.
Talkback is currently down.

This looks like a regression:
Doesn't crash in 2004-04-16 8:45am
Crashes in 2004-04-20 12:42am
The only bug that might have got something to do with it, as far as I can see,
is bug 237078.
Attached file Testcase
It crashes in background painting as the columns are not correct. The testcase
with standards rendering mode should crash even before.


Martijn. if you file a crash bug into the layout-table component please put me
on CC.
Assignee: nobody → bernd_mozilla
Talkback ID: TB4084829K
(Mozilla 1.8b2 build 2005022504)
Summary: Crash when dynamically adding rowspan and border to table-cells → Crash when dynamically adding rowspan and border to table-cells [@ TableBackgroundPainter::PaintCell ]
Attached patch patchSplinter Review
Attachment #176442 - Flags: superreview?(roc)
Attachment #176442 - Flags: review?(mats.palmgren)
Comment on attachment 176442 [details] [diff] [review]
patch

The change looks reasonable and it does fix the crash.
I don't know the table code well enough yet to feel comfortable doing
reviews on it though, sorry. Bumping the request to Boris.
Attachment #176442 - Flags: review?(mats.palmgren) → review?(bzbarsky)
So why are we using aColIndex + 1 and not aColIndex + numNewCells?
Its enough 
          for (PRInt32 cellX = 0; cellX < numNewCells; cellX++) {
             nsTableCellFrame* cell =
(nsTableCellFrame*)aCellFrames->ElementAt(cellX);
             if (cell) {
               AppendCell(aMap, cell, rowX, PR_FALSE, aDamageArea);
             }
           }
will append all cells that we want. We might assert on numOrigCols >= aColIndex
There should *never* aColIndex be by say 5 larger than numOrigCols. 
I checked in patch mentioning this bug, but that was wrong it was bug 280009.
Attachment #176442 - Flags: superreview?(roc) → superreview+
Comment on attachment 176442 [details] [diff] [review]
patch

Add that assert that numOrigCols >= aColIndex and r=bzbarsky
Attachment #176442 - Flags: review?(bzbarsky) → review+
fix checked in
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
Crash Signature: [@ TableBackgroundPainter::PaintCell ]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: