Closed Bug 417912 Opened 17 years ago Closed 17 years ago

GetCellDataAt callers that expect an error if no cell is found are wrong

Categories

(Core :: Disability Access APIs, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bernd_mozilla, Assigned: surkov)

Details

Attachments

(1 file, 2 obsolete files)

if GetCellDataAt does not find a table cell it will return NS_TABLELAYOUT_CELL_NOT_FOUND this is not a severe error but a success code http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/layout/base/nsLayoutErrors.h&rev=1.11&mark=43-44#40 as a consequence NS_ENSURE_SUCCESS(rv, rv); calls afterward will not ensure that you have a cell you have to check also like the editor does http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/editor/libeditor/html/nsTableEditor.cpp&rev=1.76&mark=2868-2869#2856
Assignee: aaronleventhal → surkov.alexander
Attached patch patch (obsolete) — Splinter Review
Attachment #303862 - Flags: review?(bernd_mozilla)
Attachment #303862 - Flags: review?(marco.zehe)
Status: NEW → ASSIGNED
if you don't get a cell back thats perfectly legimate, it says only that the arguments (row/column) are wrong <table> <tr><td><td><td rowspan="3"></tr> <tr><td></tr> <tr><td><td></tr> </table> if you now query the element at 1,1 you will hit a cellmap hole. I would say its not an "unexpected error" but rather the args are invalid.
Comment on attachment 303862 [details] [diff] [review] patch will file new patch per Bernd's comment.
Attachment #303862 - Attachment is obsolete: true
Attachment #303862 - Flags: review?(marco.zehe)
Attachment #303862 - Flags: review?(bernd_mozilla)
Attached patch patch2 (obsolete) — Splinter Review
I'm sure we don't use nsHTMLEditor here
Attachment #303966 - Flags: review?(bernd_mozilla)
Attachment #303966 - Flags: review?(Evan.Yan)
(In reply to comment #4) > Created an attachment (id=303966) [details] > patch2 > > I'm sure we don't use nsHTMLEditor here > ah, misread you that was an example with editor :)
Attachment #303966 - Flags: review?(Evan.Yan) → review+
Bernd, do you have any comments for the patch?
Attachment #303966 - Flags: review?(bernd_mozilla) → review+
stop, a mochitest where you hit this code would be cool <table> <tr><td><td><td rowspan=3> <tr><td> <tr><td><td> </table> and then access the cell at row 1 and column 1
Attached patch patch3Splinter Review
with mochitest
Attachment #303966 - Attachment is obsolete: true
Attachment #306209 - Flags: approval1.9?
Comment on attachment 306209 [details] [diff] [review] patch3 a1.9=beltzner
Attachment #306209 - Flags: approval1.9? → approval1.9+
checked in /cvsroot/mozilla/accessible/src/html/nsHTMLTableAccessible.cpp,v <-- nsHTMLTableAccessible.cpp new revision: 1.61; previous revision: 1.60 done Checking in accessible/tests/mochitest/test_nsIAccessibleTable_2.html; /cvsroot/mozilla/accessible/tests/mochitest/test_nsIAccessibleTable_2.html,v <-- test_nsIAccessibleTable_2.html new revision: 1.2; previous revision: 1.1 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: