Closed Bug 519107 Opened 16 years ago Closed 16 years ago

SVGElement::isSupported is not supported

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: takenspc, Assigned: takenspc)

References

()

Details

Attachments

(4 files, 1 obsolete file)

Attached patch PatchSplinter Review
svgElement.isSupported(feature, version) is not yet implemented. We should implement it.
Attachment #403108 - Flags: review?(longsonr)
Attached image Testcase
Assignee: nobody → taken.spc
Status: NEW → ASSIGNED
http://www.w3.org/TR/DOM-Level-3-Core/core.html#Level-2-Core-Node-supports says This is the same name which can be passed to the method hasFeature on DOMImplementation. http://www.w3.org/TR/SVG/svgdom.html#FeatureStrings eventually leads to this set of feature strings... http://www.w3.org/TR/SVG/feature.html one of which you have in your testcase. nsGenericElement::InternalIsSupported certainly includes this via nsSVGFeatures::HaveFeature but it also includes much more. I must admit I'm not sure whether it is right to include things not listed in nsSVGFeatures::HaveFeature or not.
What do other browsers do? Can you get clarification from www-svg? Can we have a mochitest here? I guess somewhere we have tests for hasFeature with a list of test strings, can we just run all those tests on different kinds of elements as well?
Attached image More testcase
(In reply to comment #3) > What do other browsers do? Opera 10, Safari 4 and Chrome 3 support checking SVG feature strings and 'HTML', 'HTMLEvents', etc... for SVG elements # BTW, They (and Gecko) return |true| for SVG feature strings for HTML elements # http://taken.s101.xrea.com/tmp/isSupported.html
Can you produce a mochitest please?
Attachment #403108 - Flags: review?(longsonr) → review+
Attached patch mochitest (obsolete) — Splinter Review
Simple test determinants whether isSupported is available for SVGSVGElement. # Should I add a comment to nsSVGFeaturesList.h?
Attachment #403500 - Flags: review?(longsonr)
Comment on attachment 403500 [details] [diff] [review] mochitest >+ >+function testIsSupported(elem) { >+ for each (var [feature, version, excepted_result] in featurs) { I think the right semantics would be to call the variable accepted_result and the array should be called features >+ if (excepted_result) { >+ ok(elem.isSupported(feature, version), "isSupported(" + feature + ", " + version + ") returned wrong value, Was it chnaged to unsupported feature?"); "changed to an unupported feature" rather than "chnaged to..." >+ } else { >+ todo(elem.isSupported(feature, version), "isSupported(" + feature + ", " + version + ") is unsupported feature string"); >+ } Should probably include some non-SVG specific tests too i.e. HTML, HTML events etc.
Attachment #403500 - Attachment is obsolete: true
Attachment #403690 - Flags: review?(longsonr)
Attachment #403500 - Flags: review?(longsonr)
Attachment #403690 - Flags: review?(longsonr) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: