diff options
author | Kristian Monsen <kristianm@google.com> | 2010-06-28 16:42:48 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2010-07-02 10:29:56 +0100 |
commit | 06ea8e899e48f1f2f396b70e63fae369f2f23232 (patch) | |
tree | 20c1428cd05c76f32394ab354ea35ed99acd86d8 /WebCore/dom/DOMImplementation.cpp | |
parent | 72aad67af14193199e29cdd5c4ddc095a8b9a8a8 (diff) | |
download | external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.zip external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.gz external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.bz2 |
Merge WebKit at r61871: Initial merge by git.
Change-Id: I6cff43abca9cc4782e088a469ad4f03f166a65d5
Diffstat (limited to 'WebCore/dom/DOMImplementation.cpp')
-rw-r--r-- | WebCore/dom/DOMImplementation.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/WebCore/dom/DOMImplementation.cpp b/WebCore/dom/DOMImplementation.cpp index 4b7a743..3483b23 100644 --- a/WebCore/dom/DOMImplementation.cpp +++ b/WebCore/dom/DOMImplementation.cpp @@ -227,18 +227,18 @@ PassRefPtr<Document> DOMImplementation::createDocument(const String& namespaceUR RefPtr<Document> doc; #if ENABLE(SVG) if (namespaceURI == SVGNames::svgNamespaceURI) - doc = SVGDocument::create(0); + doc = SVGDocument::create(0, KURL()); else #endif #if ENABLE(WML) if (namespaceURI == WMLNames::wmlNamespaceURI) - doc = WMLDocument::create(0); + doc = WMLDocument::create(0, KURL()); else #endif if (namespaceURI == HTMLNames::xhtmlNamespaceURI) - doc = Document::createXHTML(0); + doc = Document::createXHTML(0, KURL()); else - doc = Document::create(0); + doc = Document::create(0, KURL()); RefPtr<Node> documentElement; if (!qualifiedName.isEmpty()) { @@ -295,63 +295,63 @@ bool DOMImplementation::isTextMIMEType(const String& mimeType) PassRefPtr<HTMLDocument> DOMImplementation::createHTMLDocument(const String& title) { - RefPtr<HTMLDocument> d = HTMLDocument::create(0); + RefPtr<HTMLDocument> d = HTMLDocument::create(0, KURL()); d->open(); d->write("<!doctype html><html><body></body></html>"); d->setTitle(title); return d.release(); } -PassRefPtr<Document> DOMImplementation::createDocument(const String& type, Frame* frame, bool inViewSourceMode) +PassRefPtr<Document> DOMImplementation::createDocument(const String& type, Frame* frame, const KURL& url, bool inViewSourceMode) { if (inViewSourceMode) - return HTMLViewSourceDocument::create(frame, type); + return HTMLViewSourceDocument::create(frame, url, type); // Plugins cannot take HTML and XHTML from us, and we don't even need to initialize the plugin database for those. if (type == "text/html") - return HTMLDocument::create(frame); + return HTMLDocument::create(frame, url); if (type == "application/xhtml+xml" #if ENABLE(XHTMLMP) || type == "application/vnd.wap.xhtml+xml" #endif ) - return Document::createXHTML(frame); + return Document::createXHTML(frame, url); #if ENABLE(WML) if (type == "text/vnd.wap.wml" || type == "application/vnd.wap.wmlc") - return WMLDocument::create(frame); + return WMLDocument::create(frame, url); #endif #if ENABLE(FTPDIR) // Plugins cannot take FTP from us either if (type == "application/x-ftp-directory") - return FTPDirectoryDocument::create(frame); + return FTPDirectoryDocument::create(frame, url); #endif PluginData* pluginData = 0; - if (frame && frame->page() && frame->loader()->allowPlugins(NotAboutToInstantiatePlugin)) + if (frame && frame->page() && frame->loader()->subframeLoader()->allowPlugins(NotAboutToInstantiatePlugin)) pluginData = frame->page()->pluginData(); // PDF is one image type for which a plugin can override built-in support. // We do not want QuickTime to take over all image types, obviously. if ((type == "application/pdf" || type == "text/pdf") && pluginData && pluginData->supportsMimeType(type)) - return PluginDocument::create(frame); + return PluginDocument::create(frame, url); if (Image::supportsType(type)) - return ImageDocument::create(frame); + return ImageDocument::create(frame, url); #if ENABLE(VIDEO) // Check to see if the type can be played by our MediaPlayer, if so create a MediaDocument if (MediaPlayer::supportsType(ContentType(type))) - return MediaDocument::create(frame); + return MediaDocument::create(frame, url); #endif // Everything else except text/plain can be overridden by plugins. In particular, Adobe SVG Viewer should be used for SVG, if installed. // Disallowing plug-ins to use text/plain prevents plug-ins from hijacking a fundamental type that the browser is expected to handle, // and also serves as an optimization to prevent loading the plug-in database in the common case. if (type != "text/plain" && pluginData && pluginData->supportsMimeType(type)) - return PluginDocument::create(frame); + return PluginDocument::create(frame, url); if (isTextMIMEType(type)) - return TextDocument::create(frame); + return TextDocument::create(frame, url); #if ENABLE(SVG) if (type == "image/svg+xml") { @@ -359,13 +359,13 @@ PassRefPtr<Document> DOMImplementation::createDocument(const String& type, Frame Settings* settings = frame ? frame->settings() : 0; if (!settings || !settings->usesDashboardBackwardCompatibilityMode()) #endif - return SVGDocument::create(frame); + return SVGDocument::create(frame, url); } #endif if (isXMLMIMEType(type)) - return Document::create(frame); + return Document::create(frame, url); - return HTMLDocument::create(frame); + return HTMLDocument::create(frame, url); } } |