Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(939)

Unified Diff: Source/core/html/HTMLDocument.h

Issue 107073003: Introduce DEFINE_DOCUMENT_TYPE_CASTS, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/html/ImageDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLDocument.h
diff --git a/Source/core/html/HTMLDocument.h b/Source/core/html/HTMLDocument.h
index 661c004d3ac3c4e0765d4e79a16316c03a6c0b77..aa52f77ac85cd643818d42e01a3e48b61890b195 100644
--- a/Source/core/html/HTMLDocument.h
+++ b/Source/core/html/HTMLDocument.h
@@ -109,32 +109,7 @@ inline bool HTMLDocument::hasExtraNamedItem(const AtomicString& name)
return m_extraNamedItemCounts.contains(name);
}
-inline HTMLDocument* toHTMLDocument(Document* document)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument());
- return static_cast<HTMLDocument*>(document);
-}
-
-inline const HTMLDocument* toHTMLDocument(const Document* document)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isHTMLDocument());
- return static_cast<const HTMLDocument*>(document);
-}
-
-inline HTMLDocument& toHTMLDocument(Document& document)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(document.isHTMLDocument());
- return static_cast<HTMLDocument&>(document);
-}
-
-inline const HTMLDocument& toHTMLDocument(const Document& document)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(document.isHTMLDocument());
- return static_cast<const HTMLDocument&>(document);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toHTMLDocument(const HTMLDocument*);
+DEFINE_DOCUMENT_TYPE_CASTS(HTMLDocument);
} // namespace WebCore
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/html/ImageDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698