CTTE: Add more node conversion helpers
https://bugs.webkit.org/show_bug.cgi?id=122737
Reviewed by Darin Adler.
- Factor NODE_TYPE_CASTS into TYPE_CASTS_BASE(ToClassName, FromClassName)
to allow for DOCUMENT_TYPE_CASTS.
- Replace more static_casts<>.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157405 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/dom/DocumentFragment.h b/Source/WebCore/dom/DocumentFragment.h
index 796f8c0..bde5d5f 100644
--- a/Source/WebCore/dom/DocumentFragment.h
+++ b/Source/WebCore/dom/DocumentFragment.h
@@ -49,6 +49,11 @@
virtual bool childTypeAllowed(NodeType) const OVERRIDE;
};
+inline bool isDocumentFragment(const Node& node) { return node.isDocumentFragment(); }
+void isDocumentFragment(const DocumentFragment&); // Catch unnecessary runtime check of type known at compile time.
+
+NODE_TYPE_CASTS(DocumentFragment)
+
} //namespace
#endif