[Win] [GTK] [EFL] Compile (but don't use, yet) the platform-independent piece of...
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2017 21:37:44 +0000 (21:37 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2017 21:37:44 +0000 (21:37 +0000)
commitd90f74185584fd34e00f25367fb0cf251ee78ef9
tree5c7a1b9544825cd1beb6eb4c1f295a054644da46
parent4ba13bfde19ca9a9f31abdb6bee44039f940c00e
[Win] [GTK] [EFL] Compile (but don't use, yet) the platform-independent piece of ComplexTextController
https://bugs.webkit.org/show_bug.cgi?id=167927

Reviewed by Brent Fulgham.

Source/WebCore:

This patch simply moves some functions around to enable the Win, GTK, and EFL ports to compile the
platform-independent pieces of ComplexTextController. Those parts of ComplexTextController have
some dependencies which were previously only available on the Cocoa ports; however, those
dependencies are easily created or moved from elsewhere. The next step is to populate the
ComplexTextController::collectComplexTextRunsForCharacters() function for DirectWrite and HarfBuzz.
Once that is done, UniscribeController and HarfBuzzShaper can be deleted.

Adds ComplexTextController TestWebKitAPI tests to the Win and GTK ports.

* CMakeLists.txt: Everyone can compile the platform-independent piece of ComplexTextController.
* PlatformEfl.cmake: Add the HarfBuzz-specific piece.
* PlatformGTK.cmake: Ditto.
* PlatformWin.cmake: Add the DirectWrite-specific piece.
* platform/graphics/ComplexTextController.cpp:
(WebCore::TextLayoutDeleter::operator()): ComplexTextController shouldn't be enabled yet for Win,
GTK, or EFL.
(WebCore::FontCascade::createLayout): Ditto.
(WebCore::FontCascade::width): Ditto.
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moved shared code to the shared
file.
* platform/graphics/Font.cpp:
(WebCore::Font::noSynthesizableFeaturesFont): Default implementation for other ports.
(WebCore::Font::variantCapsSupportsCharacterForSynthesis): Ditto.
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::fontForCombiningCharacterSequence): Ditto.
(WebCore::FontCascade::drawEmphasisMarksForComplexText): Ditto.
(WebCore::FontCascade::createLayout): Deleted. Moved to ComplexTextController.
(WebCore::TextLayoutDeleter::operator()): Deleted. Ditto.
* platform/graphics/FontCascade.h: fontForCombiningCharacterSequence() should exist on all ports.
* platform/graphics/cairo/FontCairoHarfbuzzNG.cpp:
(WebCore::FontCascade::drawEmphasisMarksForComplexText): Deleted. Shared among all ports.
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::FontCascade::drawEmphasisMarksForComplexText): Deleted. Ditto.
* platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp: Added.
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Empty implementation of
HarfBuzz-specific piece of ComplexTextController.
* platform/graphics/mac/ComplexTextControllerCoreText.mm: Moved constructors to shared file.
* platform/graphics/win/ComplexTextControllerDirectWrite.cpp: Added.
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Empty implementation of
Direct Write-specific piece of ComplexTextController.
* platform/graphics/win/FontWin.cpp:
(WebCore::FontCascade::drawEmphasisMarksForComplexText): Deleted. Shared among all ports.

Tools:

Enable ComplexTextController API tests on the Win and GTK ports.

* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/PlatformWin.cmake:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformWin.cmake
Source/WebCore/platform/graphics/ComplexTextController.cpp
Source/WebCore/platform/graphics/ComplexTextController.h
Source/WebCore/platform/graphics/Font.cpp
Source/WebCore/platform/graphics/FontCascade.cpp
Source/WebCore/platform/graphics/FontCascade.h
Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
Source/WebCore/platform/graphics/cocoa/FontCascadeCocoa.mm
Source/WebCore/platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
Source/WebCore/platform/graphics/win/ComplexTextControllerDirectWrite.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/win/FontWin.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/PlatformGTK.cmake
Tools/TestWebKitAPI/PlatformWin.cmake
Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp