From 7652cdf8bd83fd2bbda3e5696ead6e041946c43f Mon Sep 17 00:00:00 2001 From: Steve Block Date: Fri, 2 Sep 2011 10:15:02 +0100 Subject: 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 --- Source/WebCore/rendering/RenderRuby.cpp | 8 ++++---- 1 file 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(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(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(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(child); + return toRenderRubyRun(child); } //=== ruby as inline object === -- cgit v1.1