Skip to content
  • antti@apple.com's avatar
    Text on simple lines sometimes paints one pixel off · cbdae682
    antti@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=124200
    
    Reviewed by Andreas Kling.
    
    Source/WebCore: 
    
    Test: fast/text/line-runs-simple-lines.html
    
    * rendering/SimpleLineLayout.cpp:
    (WebCore::SimpleLineLayout::adjustRunOffsets):
            
        Don't round on run construction time.
    
    (WebCore::SimpleLineLayout::createTextRuns):
    * rendering/SimpleLineLayoutResolver.h:
    (WebCore::SimpleLineLayout::RunResolver::Run::rect):
            
        Instead round when generating rects.
    
    (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
            
        Provide the baseline (used by painting) as unrounded FloatPoint.
    
    LayoutTests: 
    
    * fast/text/line-runs-rounding-simple-lines-expected.html: Added.
    * fast/text/line-runs-rounding-simple-lines.html: Added.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cbdae682