| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) | 6 * Copyright (C) 2006 Samuel Weinig (sam@webkit.org) |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 { | 171 { |
| 172 if (feature.startsWith("http://www.w3.org/TR/SVG", false) | 172 if (feature.startsWith("http://www.w3.org/TR/SVG", false) |
| 173 || feature.startsWith("org.w3c.dom.svg", false) | 173 || feature.startsWith("org.w3c.dom.svg", false) |
| 174 || feature.startsWith("org.w3c.svg", false)) { | 174 || feature.startsWith("org.w3c.svg", false)) { |
| 175 // FIXME: SVG 2.0 support? | 175 // FIXME: SVG 2.0 support? |
| 176 return isSupportedSVG10Feature(feature, version) || isSupportedSVG11Feat
ure(feature, version); | 176 return isSupportedSVG10Feature(feature, version) || isSupportedSVG11Feat
ure(feature, version); |
| 177 } | 177 } |
| 178 return true; | 178 return true; |
| 179 } | 179 } |
| 180 | 180 |
| 181 PassRefPtr<DocumentType> DOMImplementation::createDocumentType(const String& qua
lifiedName, | 181 PassRefPtr<DocumentType> DOMImplementation::createDocumentType(const AtomicStrin
g& qualifiedName, |
| 182 const String& publicId, const String& systemId, ExceptionState& exceptionSta
te) | 182 const String& publicId, const String& systemId, ExceptionState& exceptionSta
te) |
| 183 { | 183 { |
| 184 String prefix, localName; | 184 AtomicString prefix, localName; |
| 185 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio
nState)) | 185 if (!Document::parseQualifiedName(qualifiedName, prefix, localName, exceptio
nState)) |
| 186 return 0; | 186 return 0; |
| 187 | 187 |
| 188 return DocumentType::create(&m_document, qualifiedName, publicId, systemId); | 188 return DocumentType::create(&m_document, qualifiedName, publicId, systemId); |
| 189 } | 189 } |
| 190 | 190 |
| 191 DOMImplementation* DOMImplementation::getInterface(const String& /*feature*/) | 191 DOMImplementation* DOMImplementation::getInterface(const String& /*feature*/) |
| 192 { | 192 { |
| 193 return 0; | 193 return 0; |
| 194 } | 194 } |
| 195 | 195 |
| 196 PassRefPtr<Document> DOMImplementation::createDocument(const String& namespaceUR
I, | 196 PassRefPtr<Document> DOMImplementation::createDocument(const AtomicString& names
paceURI, |
| 197 const String& qualifiedName, DocumentType* doctype, ExceptionState& exceptio
nState) | 197 const AtomicString& qualifiedName, DocumentType* doctype, ExceptionState& ex
ceptionState) |
| 198 { | 198 { |
| 199 RefPtr<Document> doc; | 199 RefPtr<Document> doc; |
| 200 DocumentInit init = DocumentInit::fromContext(m_document.contextDocument()); | 200 DocumentInit init = DocumentInit::fromContext(m_document.contextDocument()); |
| 201 if (namespaceURI == SVGNames::svgNamespaceURI) { | 201 if (namespaceURI == SVGNames::svgNamespaceURI) { |
| 202 doc = SVGDocument::create(init); | 202 doc = SVGDocument::create(init); |
| 203 } else if (namespaceURI == HTMLNames::xhtmlNamespaceURI) { | 203 } else if (namespaceURI == HTMLNames::xhtmlNamespaceURI) { |
| 204 doc = Document::createXHTML(init.withRegistrationContext(m_document.regi
strationContext())); | 204 doc = Document::createXHTML(init.withRegistrationContext(m_document.regi
strationContext())); |
| 205 } else { | 205 } else { |
| 206 doc = Document::create(init); | 206 doc = Document::create(init); |
| 207 } | 207 } |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 return TextDocument::create(init); | 359 return TextDocument::create(init); |
| 360 if (type == "image/svg+xml") | 360 if (type == "image/svg+xml") |
| 361 return SVGDocument::create(init); | 361 return SVGDocument::create(init); |
| 362 if (isXMLMIMEType(type)) | 362 if (isXMLMIMEType(type)) |
| 363 return Document::create(init); | 363 return Document::create(init); |
| 364 | 364 |
| 365 return HTMLDocument::create(init); | 365 return HTMLDocument::create(init); |
| 366 } | 366 } |
| 367 | 367 |
| 368 } | 368 } |
| OLD | NEW |