Use firstElementChild/lastElementChild/nextElementSibling instead of firstChild/lastChild/nextSibling when possible

RESOLVED FIXED in Firefox 20

Status

()

Firefox
SocialAPI
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jaws, Assigned: jaws)

Tracking

Trunk
Firefox 20
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 683385 [details] [diff] [review]
Patch

There are a couple loops within socialchat.xml that use firstChild/nextSibling/lastChild to iterate through the chats, but it actually only cares about the <chatbox> elements.

I attached a patch to clean this up. I didn't touch the
> this.selectedChat = aChatbox.previousSibling ? aChatbox.previousSibling : aChatbox.nextSibling
line since bug 808235 already fixes this instance.
Attachment #683385 - Flags: review?(felipc)
Attachment #683385 - Flags: review?(felipc) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/1aab9de3c554
https://hg.mozilla.org/mozilla-central/rev/1aab9de3c554
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
You need to log in before you can comment on or make changes to this bug.