[OSX] Some words are placed on top of each other in complex text layout
https://bugs.webkit.org/show_bug.cgi?id=138348
Reviewed by Simon Fraser.
Source/WebCore:
Some complex text layouts have lots of diacritics being placed all over the place.
CoreText sometimes compensates for this by adjusting the advances of the glyphs
throughout the string to make glyphs appear in the correct place. This means that
we can't naively cache the width of a space character; instead, we must obey
CoreText when it gives us an advance for a space.
Test: fast/text/large-space-width-complex.html
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
LayoutTests:
Updating tests to not use cached space width.
* fast/text/large-space-width-complex-expected.html: Added.
* fast/text/large-space-width-complex.html: Added.
* fast/text/resources/NotoNastaliqUrduDraft.ttf: Added.
* platform/mac-mavericks/fast/text/emphasis-expected.png:
* platform/mac-mavericks/fast/text/emphasis-expected.txt: This test is orthogonal to space widths.
* platform/mac-mountainlion/fast/text/emphasis-expected.png:
* platform/mac-mountainlion/fast/text/emphasis-expected.txt:
* platform/mac/fast/text/emphasis-expected.png:
* platform/mac/fast/text/emphasis-expected.txt:
* platform/mac/fast/text/sticky-typesetting-features-expected.png:
* platform/mac/fast/text/sticky-typesetting-features-expected.txt: Ditto.
* platform/mac/fast/writing-mode/text-orientation-basic-expected.png:
* platform/mac/fast/writing-mode/text-orientation-basic-expected.txt: This test actually is improved with
this patch. Instead of a weirdly wide space width, the two words are spaced appropriately now.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@175813
268f45cc-cd09-0410-ab3c-
d52691b4dbfc