Last Comment Bug 682367 - Call nsINode::GetChildAt less
: Call nsINode::GetChildAt less
Product: Core
Classification: Components
Component: General (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: David Zbarsky (:dzbarsky)
Depends on:
Blocks: 651120
  Show dependency treegraph
Reported: 2011-08-26 12:20 PDT by David Zbarsky (:dzbarsky)
Modified: 2011-09-27 05:36 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

content/ patch (73.70 KB, patch)
2011-08-27 01:00 PDT, David Zbarsky (:dzbarsky)
no flags Details | Diff | Splinter Review
content/ patch (73.71 KB, patch)
2011-08-27 10:18 PDT, David Zbarsky (:dzbarsky)
bugs: review+
Details | Diff | Splinter Review
content/ patch r=smaug (73.71 KB, patch)
2011-09-26 14:48 PDT, David Zbarsky (:dzbarsky)
no flags Details | Diff | Splinter Review

Description David Zbarsky (:dzbarsky) 2011-08-26 12:20:24 PDT

Comment 1 David Zbarsky (:dzbarsky) 2011-08-27 01:00:33 PDT
Created attachment 556231 [details] [diff] [review]
content/ patch
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2011-08-27 01:15:23 PDT
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.
Comment 3 David Zbarsky (:dzbarsky) 2011-08-27 10:18:57 PDT
Created attachment 556275 [details] [diff] [review]
content/ patch
Comment 4 Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-08-29 18:40:05 PDT
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.
Comment 5 Olli Pettay [:smaug] 2011-09-07 04:48:16 PDT
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.
Comment 6 David Zbarsky (:dzbarsky) 2011-09-26 14:48:18 PDT
Created attachment 562543 [details] [diff] [review]
content/ patch r=smaug
Comment 8 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-09-27 05:36:59 PDT

Note You need to log in before you can comment on or make changes to this bug.