Closed
Bug 546785
Opened 14 years ago
Closed 14 years ago
nsSVGElement::DidAnimatePreserveAspectRatio function signature doesn't get overridden correctly
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(2 files)
1.52 KB,
patch
|
jwatt
:
review+
|
Details | Diff | Splinter Review |
1005 bytes,
image/svg+xml
|
Details |
When building mozilla-central, I get this warning: > content/svg/content/src/nsSVGElement.h:162: warning: ‘virtual void nsSVGElement::DidAnimatePreserveAspectRatio()’ was hidden > content/svg/content/src/nsSVGFilters.h:224: warning: by ‘virtual void nsSVGFE::DidAnimatePreserveAspectRatio(PRUint8)’ Both methods were added in bug 541882, and the warning indicates that the subclass method isn't correctly overriding the inherited method -- because the function signatures don't match. This can be fixed by adding a PRUint8 argument to nsSVGElement::DidAnimatePreserveAspectRatio (which would make it match all the other nsSVGElement::DidAnimateXXX methods).
Assignee | ||
Comment 1•14 years ago
|
||
Alternately, we can remove the PRUint8 arg from nsSVGFE::DidAnimatePreserveAspectRatio -- that might be better, given that there's only one preserveAspectRatio argument, so there's no reason we'd need an attribute index.
Assignee | ||
Comment 2•14 years ago
|
||
(In reply to comment #1) > there's only one preserveAspectRatio argument er, s/argument/attribute/
Assignee | ||
Updated•14 years ago
|
OS: Linux → All
Hardware: x86 → All
Assignee | ||
Comment 3•14 years ago
|
||
This patch removes the argument in nsSVGFE's specialization of the method, as described in comment 1.
Assignee | ||
Updated•14 years ago
|
Attachment #427473 -
Flags: review? → review?(jwatt)
Comment 4•14 years ago
|
||
Comment on attachment 427473 [details] [diff] [review] fix Yikes! Well spotted.
Attachment #427473 -
Flags: review?(jwatt) → review+
Comment 5•14 years ago
|
||
Is it possible to mochitest or reftest this?
Assignee | ||
Comment 6•14 years ago
|
||
So, the question is, what should be broken, without this fix... The only place we call "DidAnimatePreserveAspectRatio()" is inside of nsSVGPreserveAspectRatio::SetAnimValue, here: http://mxr.mozilla.org/mozilla-central/source/content/svg/content/src/nsSVGPreserveAspectRatio.cpp#302 So from that call, we'll currently call the nsSVGElement version, missing the nsSVGFE specialization. This means we miss a call to "DidAnimateAttr" in nsSVGFilters.cpp, and that method would just call InvalidateRenderingObservers on our frame. So: without this bug's patch, we should be missing some calls to InvalidateRenderingObservers on the frame for our nsSVGFE element. I'd imagine that issue would be reftestable (though I'm not sure, given that the reftests included with Bug 541882 have apparently been passing). I'll see if I can make a failing reftest...
Comment 7•14 years ago
|
||
You would need to use MozReftestInvalidate
Comment 8•14 years ago
|
||
The only filter effect to use preserveAspectRatio in feImage. This bug was my oversight, so let me whip up a reftest for you.
Comment 9•14 years ago
|
||
Assignee | ||
Comment 10•14 years ago
|
||
Thanks jwatt! That reftest (with some MozReftestInvalidate magic added -- thanks for the heads-up Robert) indeed fails pre-patch, and passes post-patch. (Needed to add the MozReftestInvalidate listener to get it to fail without the patch.)
Assignee | ||
Comment 11•14 years ago
|
||
Landed patch: http://hg.mozilla.org/mozilla-central/rev/34bacacfb0bf And reftest: http://hg.mozilla.org/mozilla-central/rev/35c956a007a2
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•