Source/WebCore: WebCore part of <rdar://problem/12446507> [mac] WebKit clients cannot...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Oct 2012 18:37:38 +0000 (18:37 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Oct 2012 18:37:38 +0000 (18:37 +0000)
commit7ce95a3f0b4c0bfeba13cf4afda70e1945bb4dd7
treedc0d35308025c3b3177554b310642ec0a7026683
parent11822d3dfcc1c7010b65bd1d6b8ba55764e21aa7
Source/WebCore: WebCore part of <rdar://problem/12446507> [mac] WebKit clients cannot change the behavior of text-rendering: auto
https://bugs.webkit.org/show_bug.cgi?id=98601

Reviewed by Darin Adler.

* WebCore.exp.in: Exported Font::setDefaultTypesettingFeatures().
* platform/graphics/Font.cpp:
(WebCore::Font::s_defaultTypesettingFeatures): Defined this static.
(WebCore::Font::setDefaultTypesettingFeatures): Added this setter.
(WebCore::Font::defaultTypesettingFeatures): Added this getter.
* platform/graphics/Font.h:
(WebCore::Font::typesettingFeatures): Changed to use the value of the new static member
s_defaultTypesettingFeatures, rather than 0, if text-redering is set to auto.

Source/WebKit/mac: WebKit/mac part of <rdar://problem/12446507> [mac] WebKit clients cannot change the behavior of text-rendering: auto
https://bugs.webkit.org/show_bug.cgi?id=98601

Reviewed by Darin Adler.

* WebView/WebView.mm:
(+[WebView initialize]): Added a call to Font::setDefaultTypesettingFeatures() to enable
kerning and ligatures if the WebKitKerningAndLigaturesEnabledByDefault user default key has
the value YES.

Source/WebKit2: WebKit2 part of <rdar://problem/12446507> [mac] WebKit clients cannot change the behavior of text-rendering: auto
https://bugs.webkit.org/show_bug.cgi?id=98601

Reviewed by Darin Adler.

* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Added initializer for
to shouldEnableKerningAndLigaturesByDefault. The initial value is false.
(WebKit::WebProcessCreationParameters::encode): Added encoding of
shouldEnableKerningAndLigaturesByDefault.
(WebKit::WebProcessCreationParameters::decode): Added decoding of
shouldEnableKerningAndLigaturesByDefault.
* Shared/WebProcessCreationParameters.h:
(WebProcessCreationParameters): Added shouldEnableKerningAndLigaturesByDefault boolean
member variable.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess): Changed to set
shouldEnableKerningAndLigaturesByDefault in the process creation parameters according to
the value of the WebKitKerningAndLigaturesEnabledByDefault user defaults key.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Added a call to
Font::setDefaultTypesettingFeatures() to enable kerning and ligatures if requested in the
process creation parameters.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/graphics/Font.cpp
Source/WebCore/platform/graphics/Font.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebProcessCreationParameters.cpp
Source/WebKit2/Shared/WebProcessCreationParameters.h
Source/WebKit2/UIProcess/mac/WebContextMac.mm
Source/WebKit2/WebProcess/mac/WebProcessMac.mm