• antti@apple.com's avatar
    Implement white-space property on simple line layout path · b39b467b
    antti@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=124122
    
    Source/WebCore: 
    
    Reviewed by Andreas Kling.
            
    Support all values of the white-space property and the tab-size property.
    
    Tests: fast/forms/basic-textareas-simple-lines.html
           fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html
           fast/text/whitespace/pre-wrap-line-test-simple-lines.html
           fast/text/whitespace/pre-wrap-long-word-simple-lines.html
           fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines.html
    
    * rendering/SimpleLineLayout.cpp:
    (WebCore::SimpleLineLayout::canUseFor):
    (WebCore::SimpleLineLayout::isWhitespace):
    (WebCore::SimpleLineLayout::skipWhitespaces):
    (WebCore::SimpleLineLayout::textWidth):
    (WebCore::SimpleLineLayout::measureWord):
    (WebCore::SimpleLineLayout::createTextRuns):
    * rendering/SimpleLineLayoutFunctions.cpp:
    (WebCore::SimpleLineLayout::paintDebugBorders):
    (WebCore::SimpleLineLayout::paintFlow):
    
    LayoutTests: 
    
    Reviewed by Andreas Kling.
            
    The simple line layout produces slightly different runs in some pre-wrap cases compared
    to the line box path (with less unnecessary boxes). To keep the test coverage this patch forces the
    existing render tree dump based tests to use line boxes. It also adds new ref tests for
    the same cases where the test uses the simple line path and the ref is forced on the line box path.
    This ensures that the paths produce pixel-identical results.
    
    * fast/forms/basic-textareas-simple-lines-expected.html: Added.
    * fast/forms/basic-textareas-simple-lines.html: Added.
    * fast/forms/basic-textareas.html:
    * fast/text/embed-at-end-of-pre-wrap-line-simple-lines-expected.html: Added.
    * fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html: Added.
    * fast/text/embed-at-end-of-pre-wrap-line.html:
    * fast/text/whitespace/pre-wrap-line-test-simple-lines-expected.html: Added.
    * fast/text/whitespace/pre-wrap-line-test-simple-lines.html: Added.
    * fast/text/whitespace/pre-wrap-line-test.html:
    * fast/text/whitespace/pre-wrap-long-word-simple-lines-expected.html: Added.
    * fast/text/whitespace/pre-wrap-long-word-simple-lines.html: Added. New simple test for overflowing lines which was only covered by the very large basic-textareas.html.
    * fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines-expected.html: Added.
    * fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines.html: Added.
    * fast/text/whitespace/pre-wrap-spaces-after-newline.html:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    b39b467b
SimpleLineLayoutFunctions.cpp 5.76 KB