Reviewed by Eric Seidel.
authorjeremy@chromium.org <jeremy@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Dec 2009 13:33:40 +0000 (13:33 +0000)
committerjeremy@chromium.org <jeremy@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 13 Dec 2009 13:33:40 +0000 (13:33 +0000)
commite22fe490fb168e344bc32f41ff16a5fefceaca90
treeb6981a1cd22639e96448115a9e7f855c600d10d2
parent2d3047fafd4f22c48c133e6d73797e00914254a3
Reviewed by Eric Seidel.

Add code to allow toggling ATSUI/Core Text rendering at runtime in ComplexTextController.
https://bugs.webkit.org/show_bug.cgi?id=31802

The goal here is to allow for a zero runtime hit for ports that decide to select
the API at compile time.
When both USE(ATSUI) and USE(CORE_TEXT) are true, the API is toggled
at runtime.  Core Text is used for OS Versions >= 10.6.

No test since this is already covered by existing pixel tests.

* platform/graphics/SimpleFontData.h:  Change #ifdef to define getNSFont() on Chrome/Mac .
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::shouldUseATSUIAPI): Cache decision about which API to use.
(WebCore::ComplexTextController::ComplexTextRun::indexAt):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Stub function to call through
to ATSUI/Core text variants.
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): The actual work for object construction
is delegate to createTextRunFromFontDataATSUI/createTextRunFromFontDataCoreText.
* platform/graphics/mac/ComplexTextController.h:
* platform/graphics/mac/ComplexTextControllerATSUI.cpp:
(WebCore::ComplexTextController::ComplexTextRun::overrideLayoutOperation): Small style fix.
(WebCore::ComplexTextController::ComplexTextRun::createTextRunFromFontDataATSUI):
(WebCore::ComplexTextController::collectComplexTextRunsForCharactersATSUI):
* platform/graphics/mac/ComplexTextControllerCoreText.cpp:
(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
(WebCore::ComplexTextController::ComplexTextRun::createTextRunFromFontDataCoreText):
(WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/Platform.h
WebCore/ChangeLog
WebCore/platform/graphics/SimpleFontData.h
WebCore/platform/graphics/mac/ComplexTextController.cpp
WebCore/platform/graphics/mac/ComplexTextController.h
WebCore/platform/graphics/mac/ComplexTextControllerATSUI.cpp
WebCore/platform/graphics/mac/ComplexTextControllerCoreText.cpp