Simple line layout: Add word-spacing support.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2015 22:29:21 +0000 (22:29 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2015 22:29:21 +0000 (22:29 +0000)
commit0df0a06ce7947403e212b3e044b82baa2078598b
tree5bdbd7f3fdc419ef8b93f10b67844f68e4a045a5
parentd5463f8f1c1880bd97df8aad5fb16656aa60ad62
Simple line layout: Add word-spacing support.
https://bugs.webkit.org/show_bug.cgi?id=151420

Reviewed by Antti Koivisto.

Source/WebCore:

This enables us to use simple line layout on word-spacing content.

Test: fast/text/simple-line-wordspacing.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::createLineRuns):
(WebCore::SimpleLineLayout::canUseForStyle): Deleted.
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
(WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
(WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
* rendering/SimpleLineLayoutTextFragmentIterator.h:

LayoutTests:

Some rebaselining is needed since inline box layout does not compute text run width properly (see webkit.org/b/151452)

* fast/text/simple-line-wordspacing-expected.html: Added.
* fast/text/simple-line-wordspacing.html: Added.
* platform/mac/css1/text_properties/word_spacing-expected.txt:
* platform/mac/fast/css/word-space-extra-expected.txt:
* platform/mac/fast/text/atsui-negative-spacing-features-expected.txt:
* platform/mac/fast/text/atsui-spacing-features-expected.txt:
* platform/mac/fast/text/basic/004-expected.txt:
* platform/mac/fast/text/basic/005-expected.txt:
* platform/mac/fast/text/word-space-expected.txt:
* platform/mac/svg/custom/svg-fonts-word-spacing-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/text/simple-line-wordspacing-expected.html [new file with mode: 0644]
LayoutTests/fast/text/simple-line-wordspacing.html [new file with mode: 0644]
LayoutTests/platform/mac/css1/text_properties/word_spacing-expected.txt
LayoutTests/platform/mac/fast/css/word-space-extra-expected.txt
LayoutTests/platform/mac/fast/text/atsui-negative-spacing-features-expected.txt
LayoutTests/platform/mac/fast/text/atsui-spacing-features-expected.txt
LayoutTests/platform/mac/fast/text/basic/004-expected.txt
LayoutTests/platform/mac/fast/text/basic/005-expected.txt
LayoutTests/platform/mac/fast/text/word-space-expected.txt
LayoutTests/platform/mac/svg/custom/svg-fonts-word-spacing-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/SimpleLineLayout.cpp
Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp
Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.h