2009-01-30  Sam Weinig  <sam@webkit.org>

        Reviewed by David Hyatt.

        Add toRenderInline methods for casting RenderObjects to RenderInlines.  The methods will assert if the object
        is not a RenderInline.

        * rendering/InlineFlowBox.cpp:
        (WebCore::InlineFlowBox::removeLineBoxFromRenderObject):
        (WebCore::InlineFlowBox::extractLineBoxFromRenderObject):
        (WebCore::InlineFlowBox::attachLineBoxToRenderObject):
        (WebCore::InlineFlowBox::rendererLineBoxes):
        (WebCore::InlineFlowBox::determineSpacingForFlowBoxes):
        (WebCore::InlineFlowBox::paint):
        * rendering/LayoutState.cpp:
        (WebCore::LayoutState::LayoutState):
        * rendering/RenderBlock.cpp:
        (WebCore::RenderBlock::paintObject):
        (WebCore::RenderBlock::addFocusRingRects):
        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::offsetFromContainer):
        (WebCore::RenderBox::computeRectForRepaint):
        (WebCore::RenderBox::containingBlockWidthForPositioned):
        (WebCore::RenderBox::containingBlockHeightForPositioned):
        (WebCore::RenderBox::calcAbsoluteHorizontalValues):
        (WebCore::RenderBox::calcAbsoluteHorizontalReplaced):
        * rendering/RenderContainer.cpp:
        (WebCore::RenderContainer::updateBeforeAfterContentForContainer):
        * rendering/RenderInline.cpp:
        (WebCore::RenderInline::inlineContinuation):
        (WebCore::nextContinuation):
        (WebCore::RenderInline::splitInlines):
        * rendering/RenderInline.h:
        (WebCore::toRenderInline):
        * rendering/RenderLayer.cpp:
        (WebCore::RenderLayer::updateLayerPosition):
        (WebCore::RenderLayer::boundingBox):
        * rendering/RenderLineBoxList.cpp:
        (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
        * rendering/RenderText.h:
        * rendering/RenderTreeAsText.cpp:
        (WebCore::operator<<):
        * rendering/bidi.cpp:
        (WebCore::RenderBlock::createLineBoxes):
        (WebCore::RenderBlock::layoutInlineChildren):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index c25041d..6c509aa 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -468,7 +468,7 @@
         ASSERT(obj->isRenderInline() || obj == this);
         
         // Get the last box we made for this render object.
-        parentBox = obj->isRenderInline() ? static_cast<RenderInline*>(obj)->lastLineBox() : toRenderBlock(obj)->lastLineBox();
+        parentBox = obj->isRenderInline() ? toRenderInline(obj)->lastLineBox() : toRenderBlock(obj)->lastLineBox();
 
         // If this box is constructed then it is from a previous line, and we need
         // to make a new box for our line.  If this box is unconstructed but it has
@@ -825,7 +825,7 @@
                 
                 // Calculate margins of inline flows so that they can be used later by line layout.
                 if (o->isRenderInline())
-                    static_cast<RenderInline*>(o)->calcMargins(containerWidth);
+                    toRenderInline(o)->calcMargins(containerWidth);
                 o->setNeedsLayout(false);
             }
             o = bidiNext(this, o, 0, false, &endOfInline);