Closed Bug 831561 Opened 7 years ago Closed 7 years ago

SVGClipPathElement should inherit from SVGElement

Categories

(Core :: SVG, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: dzbarsky, Assigned: dzbarsky)

Details

Attachments

(1 file, 1 obsolete file)

This code asserts:
var clipPath = document.createElementNS("http://www.w3.org/2000/svg", "clipPath");
clipPath["hasExtension"].apply(clipPath,[]);
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → dzbarsky
Attachment #703091 - Flags: review?(longsonr)
Comment on attachment 703091 [details] [diff] [review]
Patch

ClipPath elements are transformable. In SVG 2 they implement SVGTransformable so you need to add in the 

    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGLocatable);
    DOM_CLASSINFO_MAP_ENTRY(nsIDOMSVGTransformable);

bits in clipPath that GRAPHIC_ELEMENT gave you.

Please add the testcase as a crashtest and test the above transformable interface (by replacing hasExtension with transform I imagine).

r=longsonr with the above things fixed.
Attachment #703091 - Flags: review?(longsonr) → review+
I already removed nsIDOMSVGLocatable and nsIDOMSVGTransformable because I forgot that ClipPath is transformable.  I have patches that convert it to WebIDL bindings, so once I land those things will be ok again.
In that case, just comment 0 as a crashtest and then add a test that clipPath is transformable with the WebIDL clipPath patch.
Summary: Classinfo should not claim that ClipPathElement implements SVGTests → SVGClipPathElement should inherit from SVGElement
Attached patch PatchSplinter Review
We can inherit from SVGTransformableElement in content to avoid code duplication, but we shouldn't expose that through dom bindings.
Attachment #703091 - Attachment is obsolete: true
Attachment #705144 - Flags: review?(longsonr)
Attachment #705144 - Flags: review?(longsonr) → review+
https://hg.mozilla.org/mozilla-central/rev/29c7a6d9ec8b
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.