Call nsINode::GetChildAt less

RESOLVED FIXED in mozilla9

Status

()

defect
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: dzbarsky, Assigned: dzbarsky)

Tracking

Trunk
mozilla9
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

No description provided.
Blocks: 651120
Assignee: nobody → dzbarsky
Posted patch content/ patch (obsolete) — Splinter Review
Attachment #556231 - Flags: review?(jonas)
Comment on attachment 556231 [details] [diff] [review]
content/ patch

>--- a/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp
>+++ b/content/svg/content/src/SVGMotionSMILAnimationFunction.cpp
> GetFirstMpathChild(nsIContent* aElem)

>+  for (nsIContent* child = aElem->GetFirstChild();
>+         child;
>+         child = child->GetNextSibling()) {

Indentation is off.
Posted patch content/ patch (obsolete) — Splinter Review
Attachment #556231 - Attachment is obsolete: true
Attachment #556231 - Flags: review?(jonas)
Attachment #556275 - Flags: review?(jonas)
Comment on attachment 556275 [details] [diff] [review]
content/ patch

Olli, could you take this review.

David: One comment is that it should be possible to change nsContentIterator to not use GetChildAt *at all*, and instead use GetFirstChild/GetNextSibling/etc to do all its iteration. This would let you get rid of the array of indexes as well.

It's probably better to do that as a separate patch though.
Attachment #556275 - Flags: review?(jonas) → review?(Olli.Pettay)
Comment on attachment 556275 [details] [diff] [review]
content/ patch


>-static void
>-GetImmediateChild(nsIContent* aContent, nsIAtom *aTag, nsIContent** aResult) 
>+static already_AddRefed<nsIContent>
>+GetImmediateChild(nsIContent* aContent, nsIAtom *aTag) 
This is unrelated change, but ok.
Attachment #556275 - Flags: review?(Olli.Pettay) → review+
Attachment #556275 - Attachment is obsolete: true
Attachment #562543 - Flags: checkin?
Keywords: checkin-needed
Attachment #562543 - Flags: checkin?
https://hg.mozilla.org/mozilla-central/rev/80ff402f2f7e
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.