diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/html/HTMLDocument.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/html/HTMLDocument.h')
-rw-r--r-- | Source/WebCore/html/HTMLDocument.h | 73 |
1 files changed, 28 insertions, 45 deletions
diff --git a/Source/WebCore/html/HTMLDocument.h b/Source/WebCore/html/HTMLDocument.h index b42d320f1..9b51ed198 100644 --- a/Source/WebCore/html/HTMLDocument.h +++ b/Source/WebCore/html/HTMLDocument.h @@ -20,56 +20,44 @@ * */ -#ifndef HTMLDocument_h -#define HTMLDocument_h +#pragma once -#include "CachedResourceClient.h" #include "Document.h" -#include <wtf/HashCountedSet.h> namespace WebCore { -class HTMLDocument : public Document, public CachedResourceClient { +class HTMLDocument : public Document { public: - static PassRefPtr<HTMLDocument> create(Frame* frame, const URL& url) + static Ref<HTMLDocument> create(Frame* frame, const URL& url) { - return adoptRef(new HTMLDocument(frame, url, HTMLDocumentClass)); + return adoptRef(*new HTMLDocument(frame, url, HTMLDocumentClass)); } - static PassRefPtr<HTMLDocument> createSynthesizedDocument(Frame* frame, const URL& url) + static Ref<HTMLDocument> createSynthesizedDocument(Frame* frame, const URL& url) { - return adoptRef(new HTMLDocument(frame, url, HTMLDocumentClass, Synthesized)); + return adoptRef(*new HTMLDocument(frame, url, HTMLDocumentClass, Synthesized)); } virtual ~HTMLDocument(); - int width(); - int height(); + WEBCORE_EXPORT int width(); + WEBCORE_EXPORT int height(); - String dir(); - void setDir(const String&); + WEBCORE_EXPORT const AtomicString& bgColor() const; + WEBCORE_EXPORT void setBgColor(const String&); + WEBCORE_EXPORT const AtomicString& fgColor() const; + WEBCORE_EXPORT void setFgColor(const String&); + WEBCORE_EXPORT const AtomicString& alinkColor() const; + WEBCORE_EXPORT void setAlinkColor(const String&); + WEBCORE_EXPORT const AtomicString& linkColor() const; + WEBCORE_EXPORT void setLinkColor(const String&); + WEBCORE_EXPORT const AtomicString& vlinkColor() const; + WEBCORE_EXPORT void setVlinkColor(const String&); - String designMode() const; - void setDesignMode(const String&); + WEBCORE_EXPORT void clear(); - Element* activeElement(); - bool hasFocus(); - - const AtomicString& bgColor() const; - void setBgColor(const String&); - const AtomicString& fgColor() const; - void setFgColor(const String&); - const AtomicString& alinkColor() const; - void setAlinkColor(const String&); - const AtomicString& linkColor() const; - void setLinkColor(const String&); - const AtomicString& vlinkColor() const; - void setVlinkColor(const String&); - - void clear(); - - void captureEvents(); - void releaseEvents(); + WEBCORE_EXPORT void captureEvents(); + WEBCORE_EXPORT void releaseEvents(); Element* documentNamedItem(const AtomicStringImpl& name) const { return m_documentNamedItem.getElementByDocumentNamedItem(name, *this); } bool hasDocumentNamedItem(const AtomicStringImpl& name) const { return m_documentNamedItem.contains(name); } @@ -89,22 +77,17 @@ protected: HTMLDocument(Frame*, const URL&, DocumentClassFlags = 0, unsigned constructionFlags = 0); private: - virtual PassRefPtr<Element> createElement(const AtomicString& tagName, ExceptionCode&) override; - - virtual bool isFrameSet() const override; - virtual PassRefPtr<DocumentParser> createParser() override; - - virtual PassRefPtr<Document> cloneDocumentWithoutChildren() const override final; + bool isFrameSet() const override; + Ref<DocumentParser> createParser() override; + Ref<Document> cloneDocumentWithoutChildren() const final; DocumentOrderedMap m_documentNamedItem; DocumentOrderedMap m_windowNamedItem; }; -inline bool isHTMLDocument(const Document& document) { return document.isHTMLDocument(); } -void isHTMLDocument(const HTMLDocument&); // Catch unnecessary runtime check of type known at compile time. - -DOCUMENT_TYPE_CASTS(HTMLDocument) - } // namespace WebCore -#endif // HTMLDocument_h +SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::HTMLDocument) + static bool isType(const WebCore::Document& document) { return document.isHTMLDocument(); } + static bool isType(const WebCore::Node& node) { return is<WebCore::Document>(node) && isType(downcast<WebCore::Document>(node)); } +SPECIALIZE_TYPE_TRAITS_END() |