Simple line layout: Add support for -webkit-hyphenate-limit-after and -webkit-hyphena...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2017 19:36:27 +0000 (19:36 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2017 19:36:27 +0000 (19:36 +0000)
commite1a55ffffcb1e546709f22b80aa61dbbdab24b2d
tree0e32c6f4eccd2b0b88b49289286d07ea78bb456e
parent8568fa48154cfb8694c33969ec0759cf6d060846
Simple line layout: Add support for -webkit-hyphenate-limit-after and -webkit-hyphenate-limit-before
https://bugs.webkit.org/show_bug.cgi?id=167439
<rdar://problem/30180184>

Reviewed by Antti Koivisto.

Source/WebCore:

Implement pre and post hyphen length constrains for simple line layout.

Tests: fast/text/simple-line-layout-hyphen-limit-after.html
       fast/text/simple-line-layout-hyphen-limit-before.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForStyle):
(WebCore::SimpleLineLayout::printReason):
* rendering/SimpleLineLayoutTextFragmentIterator.cpp:
(WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): Same as normal line layout default values.
(WebCore::SimpleLineLayout::TextFragmentIterator::lastHyphenPosition):
* rendering/SimpleLineLayoutTextFragmentIterator.h:

LayoutTests:

* fast/text/simple-line-layout-hyphen-limit-after.html: Added.
* fast/text/simple-line-layout-hyphen-limit-before-expected.html: Added.
* fast/text/simple-line-layout-hyphen-limit-before.html: Added.
* platform/mac/fast/text/hyphenate-limit-before-after-expected.txt: progression.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/simple-line-layout-hyphen-limit-after-expected.html [new file with mode: 0644]
LayoutTests/fast/text/simple-line-layout-hyphen-limit-after.html [new file with mode: 0644]
LayoutTests/fast/text/simple-line-layout-hyphen-limit-before-expected.html [new file with mode: 0644]
LayoutTests/fast/text/simple-line-layout-hyphen-limit-before.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/hyphenate-limit-before-after-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/rendering/SimpleLineLayout.cpp
Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.cpp
Source/WebCore/rendering/SimpleLineLayoutTextFragmentIterator.h