Implement white-space property on simple line layout path
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Nov 2013 22:17:32 +0000 (22:17 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 Nov 2013 22:17:32 +0000 (22:17 +0000)
commita8ae11497a29c76631db07ca8003511f082ff9a1
tree404dbf1d6b16bc714d953f5a6953fec034ce2345
parentbcf0af53e6549038cdeecb4daa26403a5d9a3093
Implement white-space property on simple line layout path
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: https://svn.webkit.org/repository/webkit/trunk@159030 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/basic-textareas-simple-lines-expected.html [new file with mode: 0644]
LayoutTests/fast/forms/basic-textareas-simple-lines.html [new file with mode: 0644]
LayoutTests/fast/forms/basic-textareas.html
LayoutTests/fast/text/embed-at-end-of-pre-wrap-line-simple-lines-expected.html [new file with mode: 0644]
LayoutTests/fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html [new file with mode: 0644]
LayoutTests/fast/text/embed-at-end-of-pre-wrap-line.html
LayoutTests/fast/text/whitespace/pre-wrap-line-test-simple-lines-expected.html [new file with mode: 0644]
LayoutTests/fast/text/whitespace/pre-wrap-line-test-simple-lines.html [new file with mode: 0644]
LayoutTests/fast/text/whitespace/pre-wrap-line-test.html
LayoutTests/fast/text/whitespace/pre-wrap-long-word-simple-lines-expected.html [new file with mode: 0644]
LayoutTests/fast/text/whitespace/pre-wrap-long-word-simple-lines.html [new file with mode: 0644]
LayoutTests/fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines-expected.html [new file with mode: 0644]
LayoutTests/fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines.html [new file with mode: 0644]
LayoutTests/fast/text/whitespace/pre-wrap-spaces-after-newline.html
LayoutTests/platform/mac/compositing/repaint/invalidations-on-composited-layers-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/SimpleLineLayout.cpp
Source/WebCore/rendering/SimpleLineLayoutFunctions.cpp