Closed
Bug 519107
Opened 16 years ago
Closed 16 years ago
SVGElement::isSupported is not supported
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: takenspc, Assigned: takenspc)
References
()
Details
Attachments
(4 files, 1 obsolete file)
|
796 bytes,
patch
|
longsonr
:
review+
|
Details | Diff | Splinter Review |
|
640 bytes,
image/svg+xml
|
Details | |
|
4.06 KB,
image/svg+xml
|
Details | |
|
7.36 KB,
patch
|
longsonr
:
review+
|
Details | Diff | Splinter Review |
svgElement.isSupported(feature, version) is not yet implemented. We should implement it.
Attachment #403108 -
Flags: review?(longsonr)
| Assignee | ||
Comment 1•16 years ago
|
||
Assignee: nobody → taken.spc
Status: NEW → ASSIGNED
Comment 2•16 years ago
|
||
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?
| Assignee | ||
Comment 4•16 years ago
|
||
(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
Comment 5•16 years ago
|
||
Can you produce a mochitest please?
Updated•16 years ago
|
Attachment #403108 -
Flags: review?(longsonr) → review+
| Assignee | ||
Comment 6•16 years ago
|
||
Simple test determinants whether isSupported is available for SVGSVGElement.
# Should I add a comment to nsSVGFeaturesList.h?
Attachment #403500 -
Flags: review?(longsonr)
Comment 7•16 years ago
|
||
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.
| Assignee | ||
Comment 8•16 years ago
|
||
Attachment #403500 -
Attachment is obsolete: true
Attachment #403690 -
Flags: review?(longsonr)
Attachment #403500 -
Flags: review?(longsonr)
Updated•16 years ago
|
Attachment #403690 -
Flags: review?(longsonr) → review+
Comment 9•16 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Comment 10•16 years ago
|
||
Flags: in-testsuite? → in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•