Simple line layout: Bail out from Simple Line Layout on surrogate pairs.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Feb 2017 14:41:10 +0000 (14:41 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Feb 2017 14:41:10 +0000 (14:41 +0000)
commit27afabae121f6b0dd87908cbcef397209bef920d
treeef87d641c561fd9b99f7f4bd367ba94d1a4ed997
parentddf62b4863822a2e20c64d2e4e594294cf8e6ac0
Simple line layout: Bail out from Simple Line Layout on surrogate pairs.
https://bugs.webkit.org/show_bug.cgi?id=167840
<rdar://problem/30364784>

Reviewed by Myles C. Maxfield.

Source/WebCore:

Surrogate pairs require special line breaking logic.

Test: fast/text/simple-line-layout-no-surrogate-pairs.html

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForCharacter):
(WebCore::SimpleLineLayout::canUseForText): Checking against special characters is faster than
checking against glyphs. Reverse their order.
(WebCore::SimpleLineLayout::printReason):

LayoutTests:

* fast/text/simple-line-layout-no-surrogate-pairs-expected.html: Added.
* fast/text/simple-line-layout-no-surrogate-pairs.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/text/simple-line-layout-no-surrogate-pairs-expected.html [new file with mode: 0644]
LayoutTests/fast/text/simple-line-layout-no-surrogate-pairs.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/SimpleLineLayout.cpp