+2006-08-08 Rob Buis <buis@kde.org>
+
+ Reviewed by Darin.
+
+ Test case for
+ <http://bugzilla.opendarwin.org/show_bug.cgi?id=10230>
+ SVGDOMImplementation should die (and be rolled into DOMImplementation)
+
+ * svg/custom/svg-features-expected.txt: Added.
+ * svg/custom/svg-features.html: Added.
+
2006-08-05 Darin Adler <darin@apple.com>
Reviewed by Hyatt.
--- /dev/null
+"org.w3c.svg", "1.0": true, true
+"org.w3c.svg.static", "1.0": true, true
+"org.w3c.svg.animation", "1.0": false, false
+"org.w3c.svg.dynamic", "1.0": false, false
+"org.w3c.dom", "1.0": true, true
+"org.w3c.dom.svg", "1.0": true, true
+"org.w3c.dom.svg.static", "1.0": true, true
+"org.w3c.dom.svg.animation", "1.0": false, false
+"org.w3c.dom.svg.dynamic", "1.0": false, false
+"org.w3c.svg.all", "1.0": false, false
+"org.w3c.dom.svg.all", "1.0": false, false
+"http://www.w3.org/TR/SVG11/feature#SVG", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#SVGDOM", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#SVG-static", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#SVGDOM-static", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#SVG-animation", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#SVGDOM-animation", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#SVG-dynamic", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#SVGDOM-dynamic", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#CoreAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Structure", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#ContainerAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#ConditionalProcessing", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Image", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Style", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#ViewportAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Shape", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Text", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#BasicText", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#PaintAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#BasicPaintAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#OpacityAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#GraphicsAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#BaseGraphicsAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Marker", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#ColorProfile", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#Gradient", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Pattern", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Clip", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#BasicClip", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Mask", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Filter", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#BasicFilter", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#DocumentEventsAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#GraphicalEventsAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#AnimationEventsAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Cursor", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#Hyperlinking", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#XlinkAttribute", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#ExternalResourcesRequired", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#View", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#Script", "1.1": true, true
+"http://www.w3.org/TR/SVG11/feature#Animation", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#Font", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#BasicFont", "1.1": false, false
+"http://www.w3.org/TR/SVG11/feature#Extensibility", "1.1": true, true
--- /dev/null
+<script>
+
+function test() {
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+
+ var undefined;
+
+ var features = [
+ ["org.w3c.svg", "1.0"],
+ ["org.w3c.svg.static", "1.0"],
+ ["org.w3c.svg.animation", "1.0"],
+ ["org.w3c.svg.dynamic", "1.0"],
+ ["org.w3c.dom", "1.0"],
+ ["org.w3c.dom.svg", "1.0"],
+ ["org.w3c.dom.svg.static", "1.0"],
+ ["org.w3c.dom.svg.animation", "1.0"],
+ ["org.w3c.dom.svg.dynamic", "1.0"],
+ ["org.w3c.svg.all", "1.0"],
+ ["org.w3c.dom.svg.all", "1.0"],
+
+ ["http://www.w3.org/TR/SVG11/feature#SVG", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#SVGDOM", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#SVG-static", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#SVGDOM-static", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#SVG-animation", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#SVGDOM-animation", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#SVG-dynamic", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#SVGDOM-dynamic", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#CoreAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Structure", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#ContainerAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#ConditionalProcessing", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Image", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Style", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#ViewportAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Shape", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Text", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#BasicText", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#PaintAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#BasicPaintAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#OpacityAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#GraphicsAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#BaseGraphicsAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Marker", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#ColorProfile", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Gradient", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Pattern", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Clip", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#BasicClip", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Mask", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Filter", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#BasicFilter", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#DocumentEventsAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#GraphicalEventsAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#AnimationEventsAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Cursor", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Hyperlinking", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#XlinkAttribute", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#ExternalResourcesRequired", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#View", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Script", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Animation", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Font", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#BasicFont", "1.1"],
+ ["http://www.w3.org/TR/SVG11/feature#Extensibility", "1.1"]]
+
+ for (var i = 0; i < features.length; ++i)
+ {
+ var item = features[i];
+ if (item[1] == "omitted") {
+ var hasFeature = document.implementation.hasFeature(item[0]);
+ var isSupported = document.body.isSupported(item[0]);
+ } else {
+ var hasFeature = document.implementation.hasFeature(item[0], item[1]);
+ var isSupported = document.body.isSupported(item[0], item[1]);
+ }
+
+ var item0String = item[0];
+ if (typeof item0String == "string")
+ item0String = '"' + item0String + '"';
+ var item1String = item[1];
+ if (typeof item1String == "string" && item[1] != "omitted")
+ item1String = '"' + item1String + '"';
+ var message = item0String + ', ' + item1String + ': ' + hasFeature + ', ' + isSupported;
+
+ var div = document.createElement('div');
+ div.innerHTML = message;
+ document.body.appendChild(div);
+ }
+}
+
+</script>
+
+<body onload="test()">
+</body>
+2006-08-08 Rob Buis <buis@kde.org>
+
+ Reviewed by Darin.
+
+ http://bugzilla.opendarwin.org/show_bug.cgi?id=10230
+ SVGDOMImplementation should die (and be rolled into DOMImplementation)
+
+ Delete SVGDOMImplementation and references to it. The
+ svg specific functionality is now in DOMImplementation.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/DOMImplementation.cpp:
+ (WebCore::svgFeatureSet):
+ (WebCore::DOMImplementation::hasFeature):
+ (WebCore::DOMImplementation::createDocument):
+ (WebCore::DOMImplementation::createSVGDocument):
+ * dom/DOMImplementation.h:
+ * ksvg2/bindings/idl/svg/SVGDOMImplementation.idl: Removed.
+ * ksvg2/misc/KSVGTimeScheduler.cpp:
+ * ksvg2/svg/SVGColor.cpp:
+ * ksvg2/svg/SVGComponentTransferFunctionElement.cpp:
+ * ksvg2/svg/SVGDocument.cpp:
+ (WebCore::SVGDocument::SVGDocument):
+ * ksvg2/svg/SVGDocument.h:
+ * ksvg2/svg/SVGElement.cpp:
+ (WebCore::SVGElement::isSupported):
+ * ksvg2/svg/SVGFEBlendElement.cpp:
+ * ksvg2/svg/SVGFEColorMatrixElement.cpp:
+ * ksvg2/svg/SVGFEComponentTransferElement.cpp:
+ * ksvg2/svg/SVGFECompositeElement.cpp:
+ * ksvg2/svg/SVGFEDiffuseLightingElement.cpp:
+ * ksvg2/svg/SVGFEDisplacementMapElement.cpp:
+ * ksvg2/svg/SVGFEFloodElement.cpp:
+ * ksvg2/svg/SVGFEGaussianBlurElement.cpp:
+ * ksvg2/svg/SVGFELightElement.cpp:
+ * ksvg2/svg/SVGFEMergeElement.cpp:
+ * ksvg2/svg/SVGFEOffsetElement.cpp:
+ * ksvg2/svg/SVGFESpecularLightingElement.cpp:
+ * ksvg2/svg/SVGFETileElement.cpp:
+ * ksvg2/svg/SVGFETurbulenceElement.cpp:
+ * ksvg2/svg/SVGGradientElement.cpp:
+ * ksvg2/svg/SVGPatternElement.cpp:
+ * ksvg2/svg/SVGPolyElement.cpp:
+ * ksvg2/svg/SVGStopElement.cpp:
+ * ksvg2/svg/SVGStyledElement.cpp:
+ * ksvg2/svg/SVGStyledTransformableElement.cpp:
+ * ksvg2/svg/SVGTests.cpp:
+ (WebCore::SVGTests::isValid):
+ * ksvg2/svg/SVGTransformable.cpp:
+ * page/Frame.cpp:
+ (WebCore::Frame::begin):
+
2006-08-07 Brady Eidson <beidson@apple.com>
Reviewed by Anders and John
A88AD44A095248F0001DD196 /* SVGDescElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F836089701F300BA5114 /* SVGDescElement.h */; };
A88AD44B095248F0001DD196 /* SVGDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F837089701F300BA5114 /* SVGDocument.cpp */; };
A88AD44C095248F0001DD196 /* SVGDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F838089701F300BA5114 /* SVGDocument.h */; };
- A88AD44D095248F0001DD196 /* SVGDOMImplementation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F839089701F300BA5114 /* SVGDOMImplementation.cpp */; };
- A88AD44E095248F0001DD196 /* SVGDOMImplementation.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F83A089701F300BA5114 /* SVGDOMImplementation.h */; };
A88AD44F095248F0001DD196 /* SVGElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8C0F83B089701F300BA5114 /* SVGElement.cpp */; };
A88AD450095248F0001DD196 /* SVGElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F83C089701F300BA5114 /* SVGElement.h */; };
A88AD452095248F0001DD196 /* SVGElementInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = A8C0F83E089701F300BA5114 /* SVGElementInstance.h */; };
A8C0F836089701F300BA5114 /* SVGDescElement.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGDescElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F837089701F300BA5114 /* SVGDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGDocument.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F838089701F300BA5114 /* SVGDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGDocument.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- A8C0F839089701F300BA5114 /* SVGDOMImplementation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGDOMImplementation.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- A8C0F83A089701F300BA5114 /* SVGDOMImplementation.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGDOMImplementation.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F83B089701F300BA5114 /* SVGElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGElement.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F83C089701F300BA5114 /* SVGElement.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = SVGElement.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F83D089701F300BA5114 /* SVGElementInstance.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGElementInstance.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
A8C0F837089701F300BA5114 /* SVGDocument.cpp */,
A8C0F838089701F300BA5114 /* SVGDocument.h */,
A833B9930A2B77D500D57664 /* SVGDocument.idl */,
- A8C0F839089701F300BA5114 /* SVGDOMImplementation.cpp */,
- A8C0F83A089701F300BA5114 /* SVGDOMImplementation.h */,
A8C0F83B089701F300BA5114 /* SVGElement.cpp */,
A8C0F83C089701F300BA5114 /* SVGElement.h */,
A833C5E70A2CCBA400D57664 /* SVGElement.idl */,
A88AD448095248F0001DD196 /* SVGDefsElement.h in Headers */,
A88AD44A095248F0001DD196 /* SVGDescElement.h in Headers */,
A88AD44C095248F0001DD196 /* SVGDocument.h in Headers */,
- A88AD44E095248F0001DD196 /* SVGDOMImplementation.h in Headers */,
A88AD450095248F0001DD196 /* SVGElement.h in Headers */,
A88AD452095248F0001DD196 /* SVGElementInstance.h in Headers */,
A88AD454095248F0001DD196 /* SVGElementInstanceList.h in Headers */,
A88AD447095248F0001DD196 /* SVGDefsElement.cpp in Sources */,
A88AD449095248F0001DD196 /* SVGDescElement.cpp in Sources */,
A88AD44B095248F0001DD196 /* SVGDocument.cpp in Sources */,
- A88AD44D095248F0001DD196 /* SVGDOMImplementation.cpp in Sources */,
A88AD44F095248F0001DD196 /* SVGElement.cpp in Sources */,
A88AD455095248F0001DD196 /* SVGEllipseElement.cpp in Sources */,
A88AD457095248F0001DD196 /* SVGExternalResourcesRequired.cpp in Sources */,
#include "RegularExpression.h"
#include "TextDocument.h"
+#ifdef SVG_SUPPORT
+#include "SVGNames.h"
+#include "SVGDocument.h"
+#endif
+
namespace WebCore {
// FIXME: An implementation of this is still waiting for me to understand the distinction between
return false;
}
+#ifdef SVG_SUPPORT
+
+#define SVGFEATURE2(name, value) AtomicString SVGFEATURE_##name(#value); \
+ svgFeatures.add(SVGFEATURE_##name.impl());
+#define SVGFEATURE(feature) AtomicString SVGFEATURE_##feature(#feature); \
+ svgFeatures.add(SVGFEATURE_##feature.impl());
+
+bool isSVG10Feature(const String &feature)
+{
+ static bool initialized = false;
+ static HashSet<StringImpl*, CaseInsensitiveHash> svgFeatures;
+ if (!initialized) {
+ // TODO: features need to be uncommented when we implement them
+ // 1.0 features
+ SVGFEATURE2(SVG, svg)
+ SVGFEATURE2(SVG_STATIC, svg.static)
+// SVGFEATURE2(SVG_ANIMATION, svg.animation)
+// SVGFEATURE2(SVG_DYNAMIC, svg.dynamic)
+// SVGFEATURE2(DOM_SVG_ANIMATION, svg.dom.animation)
+// SVGFEATURE2(DOM_SVG_DYNAMIC, svg.dom.dynamic)
+ SVGFEATURE2(DOM, dom)
+ SVGFEATURE2(DOM_SVG, dom.svg)
+ SVGFEATURE2(DOM_SVG_STATIC, dom.svg.static)
+// SVGFEATURE2(SVG_ALL, svg.all)
+// SVGFEATURE2(DOM_SVG_ALL, dom.svg.all)
+ initialized = true;
+ }
+ return svgFeatures.contains(feature.impl());
+}
+
+bool isSVG11Feature(const String &feature)
+{
+ static bool initialized = false;
+ static HashSet<StringImpl*, CaseInsensitiveHash> svgFeatures;
+ if (!initialized) {
+ // TODO: features need to be uncommented when we implement them
+ // 1.1 features
+ SVGFEATURE(SVG)
+ SVGFEATURE(SVGDOM)
+ SVGFEATURE2(SVG_STATIC, SVG-static)
+ SVGFEATURE2(SVGDOM_STATIC, SVGDOM-static)
+// SVGFEATURE2(SVG_ANIMATION, SVG-animation)
+// SVGFEATURE2(SVGDOM_ANIMATION, SVGDOM-animation)
+// SVGFEATURE2(SVG_DYNAMIC, SVG-dynamic)
+// SVGFEATURE2(SVGDOM_DYNAMIC, SVGDOM-dynamic)
+ SVGFEATURE(CoreAttribute)
+ SVGFEATURE(Structure)
+ SVGFEATURE(BasicStructure)
+ SVGFEATURE(ContainerAttribute)
+ SVGFEATURE(ConditionalProcessing)
+ SVGFEATURE(Image)
+ SVGFEATURE(Style)
+ SVGFEATURE(ViewportAttribute)
+ SVGFEATURE(Shape)
+// SVGFEATURE(Text)
+// SVGFEATURE(BasicText)
+ SVGFEATURE(PaintAttribute)
+ SVGFEATURE(BasicPaintAttribute)
+ SVGFEATURE(OpacityAttribute)
+ SVGFEATURE(GraphicsAttribute)
+ SVGFEATURE(BaseGraphicsAttribute)
+ SVGFEATURE(Marker)
+// SVGFEATURE(ColorProfile)
+ SVGFEATURE(Gradient)
+ SVGFEATURE(Pattern)
+ SVGFEATURE(Clip)
+ SVGFEATURE(BasicClip)
+ SVGFEATURE(Mask)
+// SVGFEATURE(Filter)
+// SVGFEATURE(BasicFilter)
+ SVGFEATURE(DocumentEventsAttribute)
+ SVGFEATURE(GraphicalEventsAttribute)
+ SVGFEATURE(AnimationEventsAttribute)
+// SVGFEATURE(Cursor)
+ SVGFEATURE(Hyperlinking)
+ SVGFEATURE(XlinkAttribute)
+// SVGFEATURE(ExternalResourcesRequired)
+// SVGFEATURE(View)
+ SVGFEATURE(Script)
+// SVGFEATURE(Animation)
+// SVGFEATURE(Font)
+// SVGFEATURE(BasicFont)
+ SVGFEATURE(Extensibility)
+ initialized = true;
+ }
+ return svgFeatures.contains(feature.impl());
+}
+#endif
+
DOMImplementation::~DOMImplementation()
{
}
return version.isEmpty() || version == "2.0";
if (lower == "xpath")
return version.isEmpty() || version == "3.0";
+
+#ifdef SVG_SUPPORT
+ if ((version.isEmpty() || version == "1.1") && feature.startsWith("http://www.w3.org/tr/svg11/feature#", false)) {
+ if (isSVG11Feature(feature.right(feature.length() - 35)))
+ return true;
+ }
+
+ if ((version.isEmpty() || version == "1.0") && feature.startsWith("org.w3c.", false)) {
+ if (isSVG10Feature(feature.right(feature.length() - 8)))
+ return true;
+ }
+#endif
return false;
}
if (qualifiedNameIsMalformed(qualifiedName) ||
(colonpos >= 0 && namespaceURI.isNull()) ||
(colonpos == 3 && qualifiedName[0] == 'x' && qualifiedName[1] == 'm' && qualifiedName[2] == 'l' &&
+#ifdef SVG_SUPPORT
+ namespaceURI != SVGNames::svgNamespaceURI &&
+#endif
namespaceURI != "http://www.w3.org/XML/1998/namespace")) {
ec = NAMESPACE_ERR;
return 0;
}
- RefPtr<Document> doc = new Document(this, 0);
+ RefPtr<Document> doc;
+#ifdef SVG_SUPPORT
+ if (namespaceURI == SVGNames::svgNamespaceURI)
+ doc = new SVGDocument(this, 0);
+ else
+#endif
+ doc = new Document(this, 0);
// now get the interesting parts of the doctype
if (doctype)
return d.release();
}
+#ifdef SVG_SUPPORT
+PassRefPtr<SVGDocument> DOMImplementation::createSVGDocument(FrameView* v)
+{
+ return new SVGDocument(this, v);
+}
+#endif
+
}
class DocumentType;
class FrameView;
class HTMLDocument;
+#ifdef SVG_SUPPORT
+class SVGDocument;
+#endif
class String;
class TextDocument;
// Other methods (not part of DOM)
PassRefPtr<Document> createDocument(FrameView* = 0);
PassRefPtr<HTMLDocument> createHTMLDocument(FrameView* = 0);
+#ifdef SVG_SUPPORT
+ PassRefPtr<SVGDocument> createSVGDocument(FrameView* = 0);
+#endif
// Returns the static instance of this class - only one instance of this class should
// ever be present, and is used as a factory method for creating Document objects
+++ /dev/null
-/*
- * Copyright (C) 2006 Apple Computer, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-module svg
-{
- interface [nodptr, Conditional=SVG] SVGDOMImplementation : core::DOMImplementation {
- boolean hasFeature(in core::DOMString feature,
- in core::DOMString version);
-
- // Introduced in DOM Level 2:
- core::DocumentType createDocumentType(in core::DOMString qualifiedName,
- in core::DOMString publicId,
- in core::DOMString systemId)
- raises(core::DOMException);
-
- // Introduced in DOM Level 2:
- core::Document createDocument(in core::DOMString namespaceURI,
- in core::DOMString qualifiedName,
- in core::DocumentType doctype)
- raises(core::DOMException);
-
- // Introduced in DOM Level 2: [specified in seperated DOMImplementationCSS]
- css::CSSStyleSheet createCSSStyleSheet(in core::DOMString title,
- in core::DOMString media) raises(core::DOMException);
- };
-};
#include "SVGColor.h"
#include "DeprecatedStringList.h"
-#include "SVGDOMImplementation.h"
#include "ksvg.h"
namespace WebCore {
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedNumberList.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "EventNames.h"
#include "ExceptionCode.h"
-#include "SVGDOMImplementation.h"
#include "SVGElement.h"
#include "SVGSVGElement.h"
#include "SVGZoomEvent.h"
namespace WebCore {
-SVGDocument::SVGDocument(SVGDOMImplementation *i, FrameView *view) : Document(i, view)
+SVGDocument::SVGDocument(DOMImplementation *i, FrameView *view) : Document(i, view)
{
}
class SVGElement;
class SVGSVGElement;
- class SVGDOMImplementation;
+ class DOMImplementation;
class SVGDocument : public Document {
public:
- SVGDocument(SVGDOMImplementation *i, FrameView *view);
+ SVGDocument(DOMImplementation *i, FrameView *view);
virtual ~SVGDocument();
virtual bool isSVGDocument() const { return true; }
#include "Attr.h"
#include "Document.h"
+#include "DOMImplementation.h"
#include "EventListener.h"
#include "EventNames.h"
#include "HTMLNames.h"
#include "PlatformString.h"
-#include "SVGDOMImplementation.h"
#include "SVGDocumentExtensions.h"
#include "SVGNames.h"
#include "SVGSVGElement.h"
bool SVGElement::isSupported(StringImpl* feature, StringImpl* version) const
{
- if (SVGDOMImplementation::instance()->hasFeature(feature, version))
+ if (DOMImplementation::instance()->hasFeature(feature, version))
return true;
return DOMImplementation::instance()->hasFeature(feature, version);
#include "SVGFEBlendElement.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedString.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGAnimatedString.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedNumberList.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGAnimatedString.h"
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedEnumeration.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedString.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedString.h"
#include "SVGFELightElement.h"
-#include "SVGDOMImplementation.h"
#include "SVGFEDiffuseLightingElement.h"
namespace WebCore {
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedString.h"
#include "SVGAnimatedNumber.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "DeprecatedStringList.h"
#include "RenderView.h"
#include "SVGAnimatedString.h"
-#include "SVGDOMImplementation.h"
#include "SVGHelper.h"
#include "SVGNames.h"
#include "SVGRenderStyle.h"
#include "SVGFEGaussianBlurElement.h"
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedString.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGAnimatedString.h"
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedEnumeration.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGFEMergeNodeElement.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedString.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGFEOffsetElement.h"
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedString.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedString.h"
#include "SVGFELightElement.h"
-#include "SVGDOMImplementation.h"
#include "SVGFESpecularLightingElement.h"
#include "SVGRenderStyle.h"
#include "SVGFETileElement.h"
#include "SVGAnimatedString.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedInteger.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedNumber.h"
#include "SVGAnimatedTransformList.h"
-#include "SVGDOMImplementation.h"
#include "SVGHelper.h"
#include "SVGNames.h"
#include "SVGRenderStyle.h"
#include "SVGAnimatedLength.h"
#include "SVGAnimatedString.h"
#include "SVGAnimatedTransformList.h"
-#include "SVGDOMImplementation.h"
#include "SVGHelper.h"
#include "SVGMatrix.h"
#include "SVGNames.h"
#include "Attr.h"
#include "Document.h"
-#include "SVGDOMImplementation.h"
#include "SVGHelper.h"
#include "SVGNames.h"
#include "SVGPointList.h"
#include "SVGRenderStyle.h"
#include "SVGStopElement.h"
#include "SVGAnimatedNumber.h"
-#include "SVGDOMImplementation.h"
using namespace WebCore;
#include "RenderView.h"
#include "RenderPath.h"
#include "SVGAnimatedString.h"
-#include "SVGDOMImplementation.h"
#include "SVGElement.h"
#include "SVGHelper.h"
#include "SVGMatrix.h"
#include "SVGDocument.h"
#include "SVGStyledTransformableElement.h"
#include "SVGStyledElement.h"
-#include "SVGDOMImplementation.h"
#include "SVGAnimatedTransformList.h"
using namespace WebCore;
#include "SVGTests.h"
#include "Language.h"
-#include "SVGDOMImplementation.h"
#include "SVGElement.h"
#include "SVGHelper.h"
#include "SVGNames.h"
#include "SVGStringList.h"
#include "Attr.h"
+#include "DOMImplementation.h"
namespace WebCore {
for(unsigned long i = 0;i < list->numberOfItems();i++)
{
String value = String(list->getItem(i));
- if(value.isEmpty() || !SVGDOMImplementation::instance()->hasFeature(value.impl(), 0))
+ if(value.isEmpty() || !DOMImplementation::instance()->hasFeature(value, String()))
return false;
}
#include "SVGMatrix.h"
#include "SVGTransformable.h"
#include "SVGStyledElement.h"
-#include "SVGDOMImplementation.h"
#include "SVGAnimatedTransformList.h"
#include "ksvg.h"
#include "SVGNames.h"
#include "XLinkNames.h"
#include "XMLNames.h"
+#include "SVGDocument.h"
#include "SVGDocumentExtensions.h"
-#include "SVGDOMImplementation.h"
#endif
using namespace std;
#if SVG_SUPPORT
if (d->m_request.m_responseMIMEType == "image/svg+xml")
- d->m_doc = SVGDOMImplementation::instance()->createDocument(d->m_view.get());
+ d->m_doc = DOMImplementation::instance()->createSVGDocument(d->m_view.get());
else
#endif
if (DOMImplementation::isXMLMIMEType(d->m_request.m_responseMIMEType))