Skip to content
  • rniwa@webkit.org's avatar
    2011-04-07 Ryosuke Niwa <rniwa@webkit.org> · 7881ad09
    rniwa@webkit.org authored
            Reviewed by Eric Seidel.
    
            Add functions to update left and right offsets to LineOffsets
            https://bugs.webkit.org/show_bug.cgi?id=58028
    
            Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
            which are used to update m_left and m_right. Also added m_block and m_isFirstLine
            member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
    
            * rendering/RenderBlock.h:
            * rendering/RenderBlockLineLayout.cpp:
            (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
            (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
            (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
            (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
            (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
            (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
            no longer passes firstLine around.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7881ad09