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

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
Index: Source/core/html/ImageDocument.h
diff --git a/Source/core/html/ImageDocument.h b/Source/core/html/ImageDocument.h
index 9400112ca68b53646292f67799fe13d3f106057c..2dede980ef53a4f681646b1b8b30c5d78635fa03 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_CASTS_WITH_FUNCTION(ImageDocument);
}

Powered by Google App Engine
This is Rietveld 408576698