Closed Bug 739591 Opened 8 years ago Closed 8 years ago

Implement filter xlink:href

Categories

(Core :: SVG, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: longsonr, Assigned: longsonr)

References

()

Details

Attachments

(1 file)

Should be able to link filters via xlink:href so that any attributes which are defined on the referenced ‘filter’ element which are not defined on the current element are inherited.

We already implement this for gradients and patterns and the new code follows the approach taken there.
Assignee: nobody → longsonr
Attachment #609706 - Flags: review?(roc)
pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/24b7f6c27ee1
Flags: in-testsuite+
Target Milestone: --- → mozilla14
Comment on attachment 609706 [details] [diff] [review]
patch with reftest

Review of attachment 609706 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/svg/base/src/nsSVGFilterFrame.cpp
@@ +304,5 @@
> +nsSVGFilterFrame::GetFilterContent(nsIContent *aDefault)
> +{
> +  PRUint32 count = mContent->GetChildCount();
> +  for (PRUint32 i = 0; i < count; ++i) {
> +    nsIContent* child = mContent->GetChildAt(i);

This will be O(n^2) once we remove the array-based storage... We've been working to remove this pattern in favour of

for (nsIContent* child = mContent->GetFirstChild();
     child;
     child = child->GetNextSibling())
(In reply to Ms2ger from comment #3)
Probably best to raise another bug so that http://mxr.mozilla.org/mozilla-central/source/layout/svg/base/src/nsSVGFilterInstance.cpp#202 can be addressed too.
Depends on: 739972
https://hg.mozilla.org/mozilla-central/rev/24b7f6c27ee1
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.