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

Unified Diff: Source/core/rendering/RenderText.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/RenderTableSection.h ('k') | Source/core/rendering/RenderTextControl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderText.h
diff --git a/Source/core/rendering/RenderText.h b/Source/core/rendering/RenderText.h
index cd2732e3303f9a7de79550a9fcd7f49148ee0ee8..b797a422cbce1fe72f5a92c3b3cb5203067c4638 100644
--- a/Source/core/rendering/RenderText.h
+++ b/Source/core/rendering/RenderText.h
@@ -224,20 +224,7 @@ inline UChar RenderText::characterAt(unsigned i) const
return uncheckedCharacterAt(i);
}
-inline RenderText* toRenderText(RenderObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isText());
- return static_cast<RenderText*>(object);
-}
-
-inline const RenderText* toRenderText(const RenderObject* object)
-{
- ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isText());
- return static_cast<const RenderText*>(object);
-}
-
-// This will catch anyone doing an unnecessary cast.
-void toRenderText(const RenderText*);
+DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderText, isText());
#ifdef NDEBUG
inline void RenderText::checkConsistency() const
« no previous file with comments | « Source/core/rendering/RenderTableSection.h ('k') | Source/core/rendering/RenderTextControl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698