Closed Bug 388700 Opened 17 years ago Closed 16 years ago

"ASSERTION: Failed to find cell frame for cell data: 'Error'" with contenteditable and border-collapse table

Categories

(Core :: Layout: Tables, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: bernd_mozilla)

References

Details

(Keywords: assertion, testcase)

Attachments

(5 files, 3 obsolete files)

Attached file testcase
When the testcase is loaded, I get this assertion for every caret blink:

###!!! ASSERTION: Failed to find cell frame for cell data: 'Error', file /Users/jruderman/trunk/mozilla/layout/tables/nsTableRowGroupFrame.cpp, line 1617
nsTableRowGroupFrame::GetLine just looks weird to me.  First of all, it's possible that there are in fact no cells in the row in question or anywhere above it (as in this testcase).  So the assertion is just bogus.

But even so, is returning a cell originating in another row while returning the number of cells originating in this row as the number of frames in line correct?  I'm not sure what this API is expecting, exactly...
Component: Editor → Layout: Tables
QA Contact: editor → layout.tables
Oh, and that nsILineIterator docs don't really say much about what they assume about what they get out here...
Flags: blocking1.9?
nsILineIterator is supposed to return the first cell intersecting the given row, and the number of frames in the line should be the number of frame retrievable using GetNextSiblingOnLine.  (I won't vouch for the correctness of this design, but that's how it was written.)
At the risk of stating the obvious, nsILineIterator is a mess and needs a good cleanup --- deCOMtamination if nothing else.
nsTableRowGroupFrame::GetNextSiblingOnLine seems to be busted if there are colspans around...

Bernd, you want to give making this stuff sane a shot?
Flags: blocking1.9? → blocking1.9-
Whiteboard: [wanted-1.9]
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Hmm I did review a very similiar thing for accessibility, where the function is inside the cellmap where it belongs IMHO.
I do not understand why this interface is at the rwogroup frame level and not the table frame level. I am not sure that this will work with multiple rowgroups.
There is not a single function in this interface that is now flawed.
The patch is a comment only change to describe what is going on. It also describes what I believe this interface should do. If I get an OK on this implementing it correctly is a nobrainer.
Attachment #301834 - Flags: superreview?(roc)
Attachment #301834 - Flags: review?(roc)
Attachment #301834 - Attachment is patch: true
Attached patch patch (obsolete) — Splinter Review
this is what the function should do IMHO
Assignee: nobody → bernd_mozilla
Status: NEW → ASSIGNED
Attachment #301837 - Flags: superreview?(roc)
Attachment #301837 - Flags: review?(roc)
The patch does not fix the assert, the assert is bogus if there are no cells in a row, then there is no need for whining.
Attached patch the right oneSplinter Review
Attachment #301837 - Attachment is obsolete: true
Attachment #301839 - Flags: superreview?(roc)
Attachment #301839 - Flags: review?(roc)
Attachment #301837 - Flags: superreview?(roc)
Attachment #301837 - Flags: review?(roc)
Attachment #301839 - Flags: superreview?(roc)
Attachment #301839 - Flags: superreview+
Attachment #301839 - Flags: review?(roc)
Attachment #301839 - Flags: review+
Attachment #301834 - Flags: superreview?(roc)
Attachment #301834 - Flags: superreview+
Attachment #301834 - Flags: review?(roc)
Attachment #301834 - Flags: review+
Attachment #301834 - Flags: approval1.9?
Attachment #301839 - Flags: approval1.9?
Attachment #301839 - Flags: approval1.9? → approval1.9+
Comment on attachment 301834 [details] [diff] [review]
design review of the iterator interface

Clearing approval since the later patch seems to be the one - if this is a mistake please re-ask
Attachment #301834 - Flags: approval1.9?
Comment on attachment 301834 [details] [diff] [review]
design review of the iterator interface

this is comment only change that describes the interface.It should be documented anyway. I would like to check this in in case that the real fix for the mistakes will be postponed past 3.0
Attachment #301834 - Flags: approval1.9?
Attachment #301834 - Flags: approval1.9? → approval1.9+
Attachment #302334 - Attachment is patch: true
Attached patch next rev (obsolete) — Splinter Review
Comment on attachment 302336 [details] [diff] [review]
next rev

I did not invent FindFrameAt its from the lineiterator adapted.
Attachment #302336 - Flags: superreview?(roc)
Attachment #302336 - Flags: review?(roc)
Attachment #302334 - Attachment is obsolete: true
How hard would it be to actually move the iterator off the rowgroup frame and to the table where it seems to belong?
I think it belongs into the rowgroup as it plays the role of the containing block for the lines (rows). I am afraid of special casing in the callers.
Hum. But it returns the number of lines in the table and the line numbers are for the whole table. Should it return the number of lines in the rowgroup and line numbers relative to the rowgroup instead?
Attachment #302336 - Attachment is obsolete: true
Attachment #302336 - Flags: superreview?(roc)
Attachment #302336 - Flags: review?(roc)
Comment on attachment 304161 [details] [diff] [review]
patch relative to the rowgroup

Robert I was to paranoid with the rowgroup offset. The computation is pretty cheap as we will only hit a rowgroup that has at least a row as a child.
Attachment #304161 - Flags: superreview?(roc)
Attachment #304161 - Flags: review?(roc)
Comment on attachment 304161 [details] [diff] [review]
patch relative to the rowgroup

//nsILineIterator methods for nsTableFrame

Fix this comment?

I think you need to change comments here:
http://mxr.mozilla.org/seamonkey/source/layout/tables/nsTableRowGroupFrame.h#227
Attachment #304161 - Flags: superreview?(roc)
Attachment #304161 - Flags: superreview+
Attachment #304161 - Flags: review?(roc)
Attachment #304161 - Flags: review+
Attachment #304405 - Flags: approval1.9?
Attachment #304405 - Flags: approval1.9? → approval1.9+
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Depends on: 423514
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: