summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-09-02 10:15:02 +0100
committerSteve Block <steveblock@google.com>2011-09-02 10:15:02 +0100
commit7652cdf8bd83fd2bbda3e5696ead6e041946c43f (patch)
tree3e5833f1a7d1352ee3134b859e0ea30715bb16be
parent24a08199b7204cfa19c1f61d93ea8df86d3bb99f (diff)
downloadexternal_webkit-7652cdf8bd83fd2bbda3e5696ead6e041946c43f.zip
external_webkit-7652cdf8bd83fd2bbda3e5696ead6e041946c43f.tar.gz
external_webkit-7652cdf8bd83fd2bbda3e5696ead6e041946c43f.tar.bz2
Remove some unsafe static_cast in rendering/
This is a partial cherry-pick of http://trac.webkit.org/changeset/89304 It is required to allow us to cherry-pick http://trac.webkit.org/changeset/89987 Bug: 5244760 Change-Id: I854067cbc297e667ec432f947a268eef5c4dfa0f
-rw-r--r--Source/WebCore/rendering/RenderRuby.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/WebCore/rendering/RenderRuby.cpp b/Source/WebCore/rendering/RenderRuby.cpp
index 0b51384..16b0a76 100644
--- a/Source/WebCore/rendering/RenderRuby.cpp
+++ b/Source/WebCore/rendering/RenderRuby.cpp
@@ -52,13 +52,13 @@ static inline bool isAnonymousRubyInlineBlock(RenderObject* object)
static inline RenderBlock* rubyBeforeBlock(const RenderObject* ruby)
{
RenderObject* child = ruby->firstChild();
- return child && !child->isRubyRun() && child->isRenderBlock() && child->style()->styleType() == BEFORE ? static_cast<RenderBlock*>(child) : 0;
+ return child && !child->isRubyRun() && child->isRenderBlock() && child->style()->styleType() == BEFORE ? toRenderBlock(child) : 0;
}
static inline RenderBlock* rubyAfterBlock(const RenderObject* ruby)
{
RenderObject* child = ruby->lastChild();
- return child && !child->isRubyRun() && child->isRenderBlock() && child->style()->styleType() == AFTER ? static_cast<RenderBlock*>(child) : 0;
+ return child && !child->isRubyRun() && child->isRenderBlock() && child->style()->styleType() == AFTER ? toRenderBlock(child) : 0;
}
static RenderBlock* createAnonymousRubyInlineBlock(RenderObject* ruby, PseudoId styleType)
@@ -78,14 +78,14 @@ static RenderRubyRun* lastRubyRun(const RenderObject* ruby)
if (child && !child->isRubyRun())
child = child->previousSibling();
ASSERT(!child || child->isRubyRun() || child->isBeforeContent() || child == rubyBeforeBlock(ruby));
- return child && child->isRubyRun() ? static_cast<RenderRubyRun*>(child) : 0;
+ return child && child->isRubyRun() ? toRenderRubyRun(child) : 0;
}
static inline RenderRubyRun* findRubyRunParent(RenderObject* child)
{
while (child && !child->isRubyRun())
child = child->parent();
- return static_cast<RenderRubyRun*>(child);
+ return toRenderRubyRun(child);
}
//=== ruby as inline object ===