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

Unified Diff: Source/core/rendering/RenderBlockFlow.h

Issue 33983003: Introduce DEFINE_RENDER_OBJECT_TYPE_CASTS to replace manual toRenderFoo, and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months 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/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockFlow.h
diff --git a/Source/core/rendering/RenderBlockFlow.h b/Source/core/rendering/RenderBlockFlow.h
index 03773159e26fffda1e4d8d98ed8c0a94fe31a6f8..d5d35a47b685c4ba6b9ef19c2ade373e40f85aab 100644
--- a/Source/core/rendering/RenderBlockFlow.h
+++ b/Source/core/rendering/RenderBlockFlow.h
@@ -185,33 +185,7 @@ protected:
friend class MarginInfo;
};
-inline RenderBlockFlow& toRenderBlockFlow(RenderObject& object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(object.isRenderBlockFlow());
- return static_cast<RenderBlockFlow&>(object);
-}
-
-inline const RenderBlockFlow& toRenderBlockFlow(const RenderObject& object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(object.isRenderBlockFlow());
- return static_cast<const RenderBlockFlow&>(object);
-}
-
-inline RenderBlockFlow* toRenderBlockFlow(RenderObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlockFlow());
- return static_cast<RenderBlockFlow*>(object);
-}
-
-inline const RenderBlockFlow* toRenderBlockFlow(const RenderObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderBlockFlow());
- return static_cast<const RenderBlockFlow*>(object);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toRenderBlockFlow(const RenderBlockFlow*);
-void toRenderBlockFlow(const RenderBlockFlow&);
+DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlockFlow, isRenderBlockFlow());
} // namespace WebCore
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698