Stop using GetChildAt in svg layout

RESOLVED FIXED in mozilla14

Status

()

Core
SVG
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Robert Longson, Assigned: Robert Longson)

Tracking

Trunk
mozilla14
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
See bug 739591 comment 3
(Assignee)

Comment 1

5 years ago
Created attachment 610116 [details] [diff] [review]
patch
Assignee: nobody → longsonr
Attachment #610116 - Flags: review?(dholbert)
Attachment #610116 - Flags: feedback?(Ms2ger)
(Assignee)

Updated

5 years ago
Blocks: 739591
Comment on attachment 610116 [details] [diff] [review]
patch

Great, thanks a lot!
Attachment #610116 - Flags: feedback?(Ms2ger) → feedback+
(Assignee)

Updated

5 years ago
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+
(Assignee)

Comment 4

5 years ago
pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/55a95cfe5ab9
Flags: in-testsuite-
Target Milestone: --- → mozilla14
(Assignee)

Updated

5 years ago
Summary: Stop using GetChildAt in svg/layout → Stop using GetChildAt in svg layout
https://hg.mozilla.org/mozilla-central/rev/55a95cfe5ab9
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.