Closed Bug 1395945 Opened 7 years ago Closed 7 years ago

Remove child array getter

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: catalinb, Assigned: catalinb)

References

Details

Attachments

(1 file)

This is an easy one. Get rid of ::GetChildArray.
Attachment #8903571 - Flags: review?(ehsan)
Comment on attachment 8903571 [details] [diff] [review] Remove child array getter. Review of attachment 8903571 [details] [diff] [review]: ----------------------------------------------------------------- Nice, thank you! ::: dom/base/nsINode.h @@ +1281,2 @@ > > + return count > 0 ? GetChildAt(count - 1) : nullptr; Hmm... Do we have a plan to get rid of this call to GetChildAt() at some point too somehow?
Attachment #8903571 - Flags: review?(ehsan) → review+
(In reply to :Ehsan Akhgari (needinfo please, extremely long backlog) from comment #2) > Comment on attachment 8903571 [details] [diff] [review] > Remove child array getter. > > Review of attachment 8903571 [details] [diff] [review]: > ----------------------------------------------------------------- > > Nice, thank you! > > ::: dom/base/nsINode.h > @@ +1281,2 @@ > > > > + return count > 0 ? GetChildAt(count - 1) : nullptr; > > Hmm... Do we have a plan to get rid of this call to GetChildAt() at some > point too somehow? Yes, GetLastChild() will return mFirstChild->mPreviousChild which is the last child.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: