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

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

Issue 414863002: Minimize RenderObject* casting to RenderText* (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 5 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.cpp ('k') | Source/core/rendering/svg/SVGInlineTextBox.cpp » ('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 bcaba48bdb803ef97a61a09243563eb1f0c5d4cb..fcb4ca838246269c5bac5e546eb619078bc63c72 100644
--- a/Source/core/rendering/RenderText.h
+++ b/Source/core/rendering/RenderText.h
@@ -1,7 +1,7 @@
/*
* (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 2000 Dirk Mueller (mueller@kde.org)
- * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2004-2009, 2013 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -23,6 +23,7 @@
#ifndef RenderText_h
#define RenderText_h
+#include "core/dom/Text.h"
#include "core/rendering/RenderObject.h"
#include "platform/LengthFunctions.h"
#include "platform/text/TextPath.h"
@@ -230,6 +231,11 @@ inline void RenderText::checkConsistency() const
}
#endif
+inline RenderText* Text::renderer() const
+{
+ return toRenderText(CharacterData::renderer());
+}
+
void applyTextTransform(const RenderStyle*, String&, UChar);
} // namespace blink
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/svg/SVGInlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698