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

Unified Diff: WebCore/rendering/RenderTextFragment.h

Issue 3419009: Merge 67281 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 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 | « WebCore/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/rendering/RenderTextFragment.h
===================================================================
--- WebCore/rendering/RenderTextFragment.h (revision 67718)
+++ WebCore/rendering/RenderTextFragment.h (working copy)
@@ -59,6 +59,21 @@
RenderObject* m_firstLetter;
};
+inline RenderTextFragment* toRenderTextFragment(RenderObject* object)
+{
+ ASSERT(!object || toRenderText(object)->isTextFragment());
+ return static_cast<RenderTextFragment*>(object);
+}
+
+inline const RenderTextFragment* toRenderTextFragment(const RenderObject* object)
+{
+ ASSERT(!object || toRenderText(object)->isTextFragment());
+ return static_cast<const RenderTextFragment*>(object);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toRenderTextFragment(const RenderTextFragment*);
+
} // namespace WebCore
#endif // RenderTextFragment_h
« no previous file with comments | « WebCore/rendering/RenderBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698