WebCore:
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2007 19:36:12 +0000 (19:36 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2007 19:36:12 +0000 (19:36 +0000)
commit98945d4cd9609dfce1f10bf4162e429447720311
treeb93a9ca368b3e74afa5861dfe94db63edfccb0cb
parentaa8ce48e66ae95ae82e12d1122ceeca7b4e7a508
WebCore:

        Reviewed by Darin Adler.

        - fix <rdar://problem/5631507> Text doesn't wrap properly at Tamil version of Wikipedia

        Test: fast/text/international/complex-character-based-fallback.html

        * platform/graphics/Font.cpp:
        (WebCore::Font::glyphDataForCharacter): Added a forceSmallCaps argument
        that forces this function to use the small caps font. It is used for
        combining marks that need to combine with a small cap.
        * platform/graphics/Font.h:
        * platform/win/UniscribeController.cpp:
        (WebCore::UniscribeController::advance): Changed to split the string
        into runs of characters that will be rendered using the same FontData.
        This is done by calling glyphDataForCharacter() for each cahracter to
        find the FontData it should be rendered with.
        (WebCore::UniscribeController::itemizeShapeAndPlace): Added a fontData
        argument that is passed on to shapeAndPlaceItem() instead of the
        smallCaps argument.
        (WebCore::UniscribeController::shapeAndPlaceItem): Added a fontData
        argument and removed the font fallback logic from this function, as
        it is now expected to be called with an item all of whose characters
        can be rendered with the given fontData.
        * platform/win/UniscribeController.h:

LayoutTests:

        Reviewed by Darin Adler.

        - test for <rdar://problem/5631507> Text doesn't wrap properly at Tamil version of Wikipedia

        * fast/text/international/complex-character-based-fallback.html: Added.
        * platform/mac-leopard/fast/text/international/complex-character-based-fallback-expected.checksum: Added.
        * platform/mac-leopard/fast/text/international/complex-character-based-fallback-expected.png: Added.
        * platform/mac/fast/text/international/complex-character-based-fallback-expected.txt: Added.
        * platform/win/fast/text: Added.
        * platform/win/fast/text/international: Added.
        * platform/win/fast/text/international/complex-character-based-fallback-expected.checksum: Added.
        * platform/win/fast/text/international/complex-character-based-fallback-expected.png: Added.
        * platform/win/fast/text/international/complex-character-based-fallback-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28621 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/text/international/complex-character-based-fallback.html [new file with mode: 0644]
LayoutTests/platform/mac-leopard/fast/text/international/complex-character-based-fallback-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac-leopard/fast/text/international/complex-character-based-fallback-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/international/complex-character-based-fallback-expected.txt [new file with mode: 0644]
LayoutTests/platform/win/fast/text/international/complex-character-based-fallback-expected.checksum [new file with mode: 0644]
LayoutTests/platform/win/fast/text/international/complex-character-based-fallback-expected.png [new file with mode: 0644]
LayoutTests/platform/win/fast/text/international/complex-character-based-fallback-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/platform/graphics/Font.cpp
WebCore/platform/graphics/Font.h
WebCore/platform/win/UniscribeController.cpp
WebCore/platform/win/UniscribeController.h