Remove use of no-longer-needed out param nsresult on nsIHTMLCollection

RESOLVED FIXED in mozilla6

Status

()

Core
DOM
P1
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

Trunk
mozilla6
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments, 1 obsolete attachment)

Now that we have infallible new, the table code can no longer fail.  Patches coming up to remove the gunk.
Created attachment 525993 [details] [diff] [review]
part 1.  Stop touching rv in DO_FOR_EACH_ROWGROUP on table rows collections.
Attachment #525993 - Flags: review?(peterv)
Created attachment 525995 [details] [diff] [review]
diff -w of part 1, just in case
Created attachment 525996 [details] [diff] [review]
part 2.  Change nsIHTMLCollection::GetNodeAt to not use an nsresult outparam.
Created attachment 525997 [details] [diff] [review]
part 2.  Change nsIHTMLCollection::GetNodeAt to not use an nsresult outparam.
Attachment #525997 - Flags: review?(peterv)
Attachment #525996 - Attachment is obsolete: true
Created attachment 525998 [details] [diff] [review]
part 3.  Change nsIHTMLCollection::GetNamedItem to not use an nsresult outparam.
Attachment #525998 - Flags: review?(peterv)
Whiteboard: [need review]
Comment on attachment 525993 [details] [diff] [review]
part 1.  Stop touching rv in DO_FOR_EACH_ROWGROUP on table rows collections.

This relies on GetTHead/GetTBodies/GetTFoot never returning an error except OOM. Could we replace GetTHead/GetTFoot with nsHTMLTableElement::GetSection (would need to make it public) and maybe have a nsHTMLTableElement::GetTBodies that returns a nsContentList*? nsHTMLTableElement::GetSection should also return a nsIContent*, but I disgress :-/.
Attachment #525993 - Flags: review?(peterv) → review+
Attachment #525997 - Flags: review?(peterv) → review+
Attachment #525998 - Flags: review?(peterv) → review+
> nsHTMLTableElement::GetSection should also return a nsIContent*

That would involve QIs at all the callsites.  I don't think that really helps anything.

I added public inline GetTHead and GetTFoot methods that take no args and don't fail and that call GetSection() appropriately.  I then made the existing GetTHead and GetTFoot use those, and made DO_FOR_EACH_ROWGROUP do likewise.

I added a TBodies() function that returns nsContentList and used it in DO_FOR_EACH_ROWGROUP as well.
Created attachment 528127 [details] [diff] [review]
Interdiff for the part 1 changes
Whiteboard: [need review] → [need landing]
Pushed:

  http://hg.mozilla.org/mozilla-central/rev/05d0635e2840
  http://hg.mozilla.org/mozilla-central/rev/55e55b249876
  http://hg.mozilla.org/mozilla-central/rev/23b222c43690

then pushed http://hg.mozilla.org/mozilla-central/rev/b1c530bf15f3 to fix an issue ms2ger noticed in patch2.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Whiteboard: [need landing]
Target Milestone: --- → mozilla6
(In reply to comment #8)
> Interdiff for the part 1 changes

Sweet, thanks!

(In reply to comment #9)
> then pushed http://hg.mozilla.org/mozilla-central/rev/b1c530bf15f3 to fix an
> issue ms2ger noticed in patch2.

Ouch, sorry for missing that :-(.
You need to log in before you can comment on or make changes to this bug.