diff options
Diffstat (limited to 'Source/WebCore/dom/TemplateContentDocumentFragment.h')
-rw-r--r-- | Source/WebCore/dom/TemplateContentDocumentFragment.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/Source/WebCore/dom/TemplateContentDocumentFragment.h b/Source/WebCore/dom/TemplateContentDocumentFragment.h index 7db57af69..44576e211 100644 --- a/Source/WebCore/dom/TemplateContentDocumentFragment.h +++ b/Source/WebCore/dom/TemplateContentDocumentFragment.h @@ -24,10 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef TemplateContentDocumentFragment_h -#define TemplateContentDocumentFragment_h - -#if ENABLE(TEMPLATE_ELEMENT) +#pragma once #include "DocumentFragment.h" @@ -35,28 +32,24 @@ namespace WebCore { class TemplateContentDocumentFragment final : public DocumentFragment { public: - static PassRefPtr<TemplateContentDocumentFragment> create(Document& document, const Element* host) + static Ref<TemplateContentDocumentFragment> create(Document& document, const Element* host) { - return adoptRef(new TemplateContentDocumentFragment(document, host)); + return adoptRef(*new TemplateContentDocumentFragment(document, host)); } const Element* host() const { return m_host; } - void clearHost() { m_host = 0; } + void clearHost() { m_host = nullptr; } private: TemplateContentDocumentFragment(Document& document, const Element* host) - : DocumentFragment(&document, CreateDocumentFragment) + : DocumentFragment(document, CreateDocumentFragment) , m_host(host) { } - virtual bool isTemplateContent() const override { return true; } + bool isTemplateContent() const override { return true; } const Element* m_host; }; } // namespace WebCore - -#endif // ENABLE(TEMPLATE_ELEMENT) - -#endif // TemplateContentDocumentFragment_h |