summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/DOMImplementation.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/DOMImplementation.h')
-rw-r--r--Source/WebCore/dom/DOMImplementation.h54
1 files changed, 13 insertions, 41 deletions
diff --git a/Source/WebCore/dom/DOMImplementation.h b/Source/WebCore/dom/DOMImplementation.h
index 748057aa6..a40a2f691 100644
--- a/Source/WebCore/dom/DOMImplementation.h
+++ b/Source/WebCore/dom/DOMImplementation.h
@@ -2,7 +2,7 @@
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2001 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2004, 2005, 2006, 2008, 2016 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,60 +21,32 @@
*
*/
-#ifndef DOMImplementation_h
-#define DOMImplementation_h
+#pragma once
-#include "Document.h"
-#include "MediaPlayer.h"
-#include <wtf/Forward.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
+#include "ExceptionOr.h"
+#include "XMLDocument.h"
namespace WebCore {
-class CSSStyleSheet;
-class Document;
-class DocumentType;
-class Frame;
-class HTMLDocument;
-class URL;
-
-typedef int ExceptionCode;
-
class DOMImplementation : public ScriptWrappable {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<DOMImplementation> create(Document& document) { return adoptPtr(new DOMImplementation(document)); }
-
+ explicit DOMImplementation(Document&);
+
void ref() { m_document.ref(); }
void deref() { m_document.deref(); }
- Document* document() { return &m_document; }
-
- // DOM methods & attributes for DOMImplementation
- static bool hasFeature(const String& feature, const String& version);
- PassRefPtr<DocumentType> createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId, ExceptionCode&);
- PassRefPtr<Document> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&);
-
- DOMImplementation* getInterface(const String& feature);
+ Document& document() { return m_document; }
- // From the DOMImplementationCSS interface
- static PassRefPtr<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media, ExceptionCode&);
+ WEBCORE_EXPORT ExceptionOr<Ref<DocumentType>> createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId);
+ WEBCORE_EXPORT ExceptionOr<Ref<XMLDocument>> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*);
+ WEBCORE_EXPORT Ref<HTMLDocument> createHTMLDocument(const String& title);
+ static bool hasFeature() { return true; }
+ WEBCORE_EXPORT static Ref<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media);
- // From the HTMLDOMImplementation interface
- PassRefPtr<HTMLDocument> createHTMLDocument(const String& title);
-
- // Other methods (not part of DOM)
- static PassRefPtr<Document> createDocument(const String& MIMEType, Frame*, const URL&, bool inViewSourceMode);
-
- static bool isXMLMIMEType(const String& MIMEType);
- static bool isTextMIMEType(const String& MIMEType);
+ static Ref<Document> createDocument(const String& MIMEType, Frame*, const URL&);
private:
- explicit DOMImplementation(Document&);
-
Document& m_document;
};
} // namespace WebCore
-
-#endif