Last Comment Bug 739591 - Implement filter xlink:href
: Implement filter xlink:href
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: Robert Longson
:
Mentors:
http://hoffmann.bplaced.net/svgtest/f...
Depends on: 739972
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-27 07:25 PDT by Robert Longson
Modified: 2012-03-29 08:40 PDT (History)
2 users (show)
longsonr: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch with reftest (16.74 KB, patch)
2012-03-27 07:26 PDT, Robert Longson
roc: review+
Details | Diff | Splinter Review

Description Robert Longson 2012-03-27 07:25:26 PDT
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.
Comment 1 Robert Longson 2012-03-27 07:26:14 PDT
Created attachment 609706 [details] [diff] [review]
patch with reftest
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2012-03-28 05:57:05 PDT
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())
Comment 4 Robert Longson 2012-03-28 06:04:54 PDT
(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.
Comment 5 Marco Bonardo [::mak] 2012-03-29 08:40:20 PDT
https://hg.mozilla.org/mozilla-central/rev/24b7f6c27ee1

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