Skip to content
  • antti@apple.com's avatar
    Simple line layout should support floats · 01a04124
    antti@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=124666
    
    Reviewed by Dave Hyatt.
    
    Source/WebCore: 
    
    Tests: fast/text/simple-lines-float-compare.html
           fast/text/simple-lines-float.html
    
    * rendering/line/LineWidth.h:
    (WebCore::LineWidth::logicalLeftOffset):
            
        Expose the left offset so we don't need to recompute it.
    
    * rendering/SimpleLineLayout.cpp:
    (WebCore::SimpleLineLayout::canUseFor):
    (WebCore::SimpleLineLayout::computeLineLeft):
            
        Include the left offset from floats.
    
    (WebCore::SimpleLineLayout::createTextRuns):
            
        Keep the flow height updated during the loop as LineWidth reads the current position from there.
    
    * rendering/SimpleLineLayoutResolver.h:
    (WebCore::SimpleLineLayout::RunResolver::Run::rect):
    (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
    (WebCore::SimpleLineLayout::RunResolver::RunResolver):
    (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
            
        We now bake the border and the padding to the line left offset. No need to add it during resolve.
    
    LayoutTests: 
    
    * fast/text/simple-lines-float-compare-expected.html: Added.
    * fast/text/simple-lines-float-compare.html: Added.
    * fast/text/simple-lines-float-expected.html: Added.
    * fast/text/simple-lines-float.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159579 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    01a04124