Closed Bug 739972 Opened 12 years ago Closed 12 years ago

Stop using GetChildAt in svg layout

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: longsonr, Assigned: longsonr)

References

Details

Attachments

(1 file)

Attached patch patchSplinter Review
Assignee: nobody → longsonr
Attachment #610116 - Flags: review?(dholbert)
Attachment #610116 - Flags: feedback?(Ms2ger)
Blocks: 739591
Comment on attachment 610116 [details] [diff] [review]
patch

Great, thanks a lot!
Attachment #610116 - Flags: feedback?(Ms2ger) → feedback+
Summary: Stop using GetChildAt svg/layout → Stop using GetChildAt in svg/layout
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.
Attachment #610116 - Flags: review?(dholbert) → review+
pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/55a95cfe5ab9
Flags: in-testsuite-
Target Milestone: --- → mozilla14
Summary: Stop using GetChildAt in svg/layout → Stop using GetChildAt in svg layout
https://hg.mozilla.org/mozilla-central/rev/55a95cfe5ab9
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: