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

Unified Diff: Source/core/html/ImageDocument.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/html/HTMLDocument.h ('k') | Source/core/html/PluginDocument.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/ImageDocument.h
diff --git a/Source/core/html/ImageDocument.h b/Source/core/html/ImageDocument.h
index 9400112ca68b53646292f67799fe13d3f106057c..896a46261da7f9affb5c064c054959087710a58b 100644
--- a/Source/core/html/ImageDocument.h
+++ b/Source/core/html/ImageDocument.h
@@ -72,20 +72,7 @@ private:
bool m_shouldShrinkImage;
};
-inline ImageDocument* toImageDocument(Document* document)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isImageDocument());
- return static_cast<ImageDocument*>(document);
-}
-
-inline const ImageDocument* toImageDocument(const Document* document)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!document || document->isImageDocument());
- return static_cast<const ImageDocument*>(document);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toImageDocument(const ImageDocument*);
+DEFINE_DOCUMENT_TYPE_CASTS(ImageDocument);
}
« no previous file with comments | « Source/core/html/HTMLDocument.h ('k') | Source/core/html/PluginDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698