Ignore:
Timestamp:
Aug 31, 2013, 11:34:23 AM (12 years ago)
Author:
[email protected]
Message:

InlineBox::renderer() and pals should return references.
<https://webkit.org/b/120562>

Reviewed by Antti Koivisto.

Make InlineBox::renderer() and its friends return references instead of pointers.
Every box always has a renderer, so this clears up any ambiguity, and a number of
weird assertions in SVG code.

Made InlineBox::m_renderer private so subclasses have to go through renderer().
The next step will be to replace renderer() with tightly-typed accessors where
applicable (e.g InlineTextBox's renderer is always a RenderText.)

Also added reference versions of these RenderObject casts:

  • toRenderBox()
  • toRenderBlock()
  • toRenderInline()
  • toRenderSVGInlineText()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderReplaced.cpp

    r154858 r154931  
    540540   
    541541    RootInlineBox* root = m_inlineBoxWrapper->root();
    542     LayoutUnit newLogicalTop = root->block()->style()->isFlippedBlocksWritingMode() ? m_inlineBoxWrapper->logicalBottom() - root->selectionBottom() : root->selectionTop() - m_inlineBoxWrapper->logicalTop();
    543     if (root->block()->style()->isHorizontalWritingMode())
     542    LayoutUnit newLogicalTop = root->block().style()->isFlippedBlocksWritingMode() ? m_inlineBoxWrapper->logicalBottom() - root->selectionBottom() : root->selectionTop() - m_inlineBoxWrapper->logicalTop();
     543    if (root->block().style()->isHorizontalWritingMode())
    544544        return LayoutRect(0, newLogicalTop, width(), root->selectionHeight());
    545545    return LayoutRect(newLogicalTop, 0, root->selectionHeight(), height());
Note: See TracChangeset for help on using the changeset viewer.