Last Comment Bug 739972 - Stop using GetChildAt in svg layout
: Stop using GetChildAt in svg layout
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: Robert Longson
:
Mentors:
Depends on:
Blocks: 739591
  Show dependency treegraph
 
Reported: 2012-03-28 06:41 PDT by Robert Longson
Modified: 2012-03-29 08:39 PDT (History)
3 users (show)
longsonr: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (2.49 KB, patch)
2012-03-28 06:42 PDT, Robert Longson
dholbert: review+
Ms2ger: feedback+
Details | Diff | Splinter Review

Description Robert Longson 2012-03-28 06:41:24 PDT
See bug 739591 comment 3
Comment 1 Robert Longson 2012-03-28 06:42:19 PDT
Created attachment 610116 [details] [diff] [review]
patch
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-03-28 06:46:30 PDT
Comment on attachment 610116 [details] [diff] [review]
patch

Great, thanks a lot!
Comment 3 Daniel Holbert [:dholbert] 2012-03-28 10:21:07 PDT
Comment on attachment 610116 [details] [diff] [review]
patch

>+++ b/layout/svg/base/src/nsSVGFilterInstance.cpp
>@@ -194,34 +194,33 @@ nsSVGFilterInstance::BuildSources()
>   return NS_OK;
> }
> 
> nsresult
> nsSVGFilterInstance::BuildPrimitives()
> {
>   // First build mFilterInfo. It's important that we don't change that
>   // array after we start storing pointers to its elements!
>-  PRUint32 count = mFilterElement->GetChildCount();
>-  PRUint32 i;
>-  for (i = 0; i < count; ++i) {
>-    nsIContent* child = mFilterElement->GetChildAt(i);
>+  for (nsIContent* child = mFilterElement->nsINode::GetFirstChild();
>+      child;
>+      child = child->GetNextSibling()) {

Nit: those last 2 lines need 1 more space of indentation.

r=me with that fixed.
Comment 5 Matt Brubeck (:mbrubeck) 2012-03-29 08:39:49 PDT
https://hg.mozilla.org/mozilla-central/rev/55a95cfe5ab9

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