summaryrefslogtreecommitdiff
path: root/Source/WebCore/html/HTMLUnknownElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/html/HTMLUnknownElement.h')
-rw-r--r--Source/WebCore/html/HTMLUnknownElement.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/Source/WebCore/html/HTMLUnknownElement.h b/Source/WebCore/html/HTMLUnknownElement.h
index 755caef1d..039448c8e 100644
--- a/Source/WebCore/html/HTMLUnknownElement.h
+++ b/Source/WebCore/html/HTMLUnknownElement.h
@@ -27,8 +27,7 @@
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef HTMLUnknownElement_h
-#define HTMLUnknownElement_h
+#pragma once
#include "HTMLElement.h"
@@ -36,26 +35,18 @@ namespace WebCore {
class HTMLUnknownElement final : public HTMLElement {
public:
- static PassRefPtr<HTMLUnknownElement> create(const QualifiedName& tagName, Document& document)
+ static Ref<HTMLUnknownElement> create(const QualifiedName& tagName, Document& document)
{
- return adoptRef(new HTMLUnknownElement(tagName, document));
+ return adoptRef(*new HTMLUnknownElement(tagName, document));
}
- virtual bool isHTMLUnknownElement() const override { return true; }
-
private:
HTMLUnknownElement(const QualifiedName& tagName, Document& document)
- : HTMLElement(tagName, document)
+ : HTMLElement(tagName, document, CreateHTMLElement)
{
}
-};
-inline HTMLUnknownElement* toHTMLUnknownElement(HTMLElement* element)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!element || element->isHTMLUnknownElement());
- return static_cast<HTMLUnknownElement*>(element);
-}
-
-} // namespace
+ bool isHTMLUnknownElement() const final { return true; }
+};
-#endif
+} // namespace WebCore