Changeset 130585 in webkit
- Timestamp:
- Oct 6, 2012, 11:37:38 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r130584 r130585 1 2012-10-06 Dan Bernstein <mitz@apple.com> 2 3 WebCore part of <rdar://problem/12446507> [mac] WebKit clients cannot change the behavior of text-rendering: auto 4 https://bugs.webkit.org/show_bug.cgi?id=98601 5 6 Reviewed by Darin Adler. 7 8 * WebCore.exp.in: Exported Font::setDefaultTypesettingFeatures(). 9 * platform/graphics/Font.cpp: 10 (WebCore::Font::s_defaultTypesettingFeatures): Defined this static. 11 (WebCore::Font::setDefaultTypesettingFeatures): Added this setter. 12 (WebCore::Font::defaultTypesettingFeatures): Added this getter. 13 * platform/graphics/Font.h: 14 (WebCore::Font::typesettingFeatures): Changed to use the value of the new static member 15 s_defaultTypesettingFeatures, rather than 0, if text-redering is set to auto. 16 1 17 2012-10-04 Geoffrey Garen <ggaren@apple.com> 2 18 -
trunk/Source/WebCore/WebCore.exp.in
r130567 r130585 648 648 __ZN7WebCore4Font18shouldUseSmoothingEv 649 649 __ZN7WebCore4Font21setShouldUseSmoothingEb 650 __ZN7WebCore4Font29setDefaultTypesettingFeaturesEj 650 651 __ZN7WebCore4FontC1ERKNS_16FontPlatformDataEbNS_17FontSmoothingModeE 651 652 __ZN7WebCore4FontC1Ev -
trunk/Source/WebCore/platform/graphics/Font.cpp
r130082 r130585 65 65 Font::CodePath Font::s_codePath = Auto; 66 66 67 TypesettingFeatures Font::s_defaultTypesettingFeatures = 0; 68 67 69 // ============================================================================================ 68 70 // Font Implementation (Cross-Platform Portion) … … 288 290 { 289 291 return s_codePath; 292 } 293 294 void Font::setDefaultTypesettingFeatures(TypesettingFeatures typesettingFeatures) 295 { 296 s_defaultTypesettingFeatures = typesettingFeatures; 297 } 298 299 TypesettingFeatures Font::defaultTypesettingFeatures() 300 { 301 return s_defaultTypesettingFeatures; 290 302 } 291 303 -
trunk/Source/WebCore/platform/graphics/Font.h
r130160 r130585 125 125 { 126 126 TextRenderingMode textRenderingMode = m_fontDescription.textRenderingMode(); 127 TypesettingFeatures features = textRenderingMode == OptimizeLegibility || textRenderingMode == GeometricPrecision ? Kerning | Ligatures : 0; 127 TypesettingFeatures features = s_defaultTypesettingFeatures; 128 129 switch(textRenderingMode) { 130 case AutoTextRendering: 131 break; 132 case OptimizeSpeed: 133 features &= ~(Kerning | Ligatures); 134 break; 135 case GeometricPrecision: 136 case OptimizeLegibility: 137 features |= Kerning | Ligatures; 138 break; 139 } 128 140 129 141 switch (m_fontDescription.kerning()) { … … 235 247 static CodePath s_codePath; 236 248 249 static void setDefaultTypesettingFeatures(TypesettingFeatures); 250 static TypesettingFeatures defaultTypesettingFeatures(); 251 237 252 static const uint8_t s_roundingHackCharacterTable[256]; 238 253 static bool isRoundingHackCharacter(UChar32 c) … … 273 288 void initFormatForTextLayout(QTextLayout*) const; 274 289 #endif 290 291 static TypesettingFeatures s_defaultTypesettingFeatures; 275 292 276 293 FontDescription m_fontDescription; -
trunk/Source/WebKit/mac/ChangeLog
r130567 r130585 1 2012-10-06 Dan Bernstein <mitz@apple.com> 2 3 WebKit/mac part of <rdar://problem/12446507> [mac] WebKit clients cannot change the behavior of text-rendering: auto 4 https://bugs.webkit.org/show_bug.cgi?id=98601 5 6 Reviewed by Darin Adler. 7 8 * WebView/WebView.mm: 9 (+[WebView initialize]): Added a call to Font::setDefaultTypesettingFeatures() to enable 10 kerning and ligatures if the WebKitKerningAndLigaturesEnabledByDefault user default key has 11 the value YES. 12 1 13 2012-10-05 Sheriff Bot <webkit.review.bot@gmail.com> 2 14 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r130523 r130585 3117 3117 grammarCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebGrammarCheckingEnabled]; 3118 3118 3119 Font::setDefaultTypesettingFeatures([[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitKerningAndLigaturesEnabledByDefault"] ? Kerning | Ligatures : 0); 3120 3119 3121 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 3120 3122 automaticQuoteSubstitutionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebAutomaticQuoteSubstitutionEnabled]; -
trunk/Source/WebKit2/ChangeLog
r130568 r130585 1 2012-10-06 Dan Bernstein <mitz@apple.com> 2 3 WebKit2 part of <rdar://problem/12446507> [mac] WebKit clients cannot change the behavior of text-rendering: auto 4 https://bugs.webkit.org/show_bug.cgi?id=98601 5 6 Reviewed by Darin Adler. 7 8 * Shared/WebProcessCreationParameters.cpp: 9 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Added initializer for 10 to shouldEnableKerningAndLigaturesByDefault. The initial value is false. 11 (WebKit::WebProcessCreationParameters::encode): Added encoding of 12 shouldEnableKerningAndLigaturesByDefault. 13 (WebKit::WebProcessCreationParameters::decode): Added decoding of 14 shouldEnableKerningAndLigaturesByDefault. 15 * Shared/WebProcessCreationParameters.h: 16 (WebProcessCreationParameters): Added shouldEnableKerningAndLigaturesByDefault boolean 17 member variable. 18 * UIProcess/mac/WebContextMac.mm: 19 (WebKit::WebContext::platformInitializeWebProcess): Changed to set 20 shouldEnableKerningAndLigaturesByDefault in the process creation parameters according to 21 the value of the WebKitKerningAndLigaturesEnabledByDefault user defaults key. 22 * WebProcess/mac/WebProcessMac.mm: 23 (WebKit::WebProcess::platformInitializeWebProcess): Added a call to 24 Font::setDefaultTypesettingFeatures() to enable kerning and ligatures if requested in the 25 process creation parameters. 26 1 27 2012-10-05 Sudarsana Nagineni <sudarsana.nagineni@intel.com> 2 28 -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp
r130347 r130585 43 43 , nsURLCacheDiskCapacity(0) 44 44 , shouldForceScreenFontSubstitution(false) 45 , shouldEnableKerningAndLigaturesByDefault(false) 45 46 #elif PLATFORM(WIN) 46 47 , shouldPaintNativeControls(false) … … 91 92 encoder->encode(uiProcessBundleResourcePathExtensionHandle); 92 93 encoder->encode(shouldForceScreenFontSubstitution); 94 encoder->encode(shouldEnableKerningAndLigaturesByDefault); 93 95 #elif PLATFORM(WIN) 94 96 encoder->encode(shouldPaintNativeControls); … … 194 196 if (!decoder->decode(parameters.shouldForceScreenFontSubstitution)) 195 197 return false; 198 if (!decoder->decode(parameters.shouldEnableKerningAndLigaturesByDefault)) 199 return false; 196 200 #elif PLATFORM(WIN) 197 201 if (!decoder->decode(parameters.shouldPaintNativeControls)) -
trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h
r130347 r130585 113 113 114 114 bool shouldForceScreenFontSubstitution; 115 bool shouldEnableKerningAndLigaturesByDefault; 115 116 #elif PLATFORM(WIN) 116 117 String cfURLCachePath; -
trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm
r130347 r130585 101 101 parameters.shouldForceScreenFontSubstitution = [[NSUserDefaults standardUserDefaults] boolForKey:@"NSFontDefaultScreenFontSubstitutionEnabled"]; 102 102 #endif 103 parameters.shouldEnableKerningAndLigaturesByDefault = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitKerningAndLigaturesEnabledByDefault"]; 103 104 104 105 #if USE(ACCELERATED_COMPOSITING) && HAVE(HOSTED_CORE_ANIMATION) -
trunk/Source/WebKit2/WebProcess/mac/WebProcessMac.mm
r129593 r130585 34 34 #import "WebProcessProxyMessages.h" 35 35 #import <WebCore/FileSystem.h> 36 #import <WebCore/Font.h> 36 37 #import <WebCore/LocalizedStrings.h> 37 38 #import <WebCore/MemoryCache.h> … … 273 274 274 275 m_shouldForceScreenFontSubstitution = parameters.shouldForceScreenFontSubstitution; 276 Font::setDefaultTypesettingFeatures(parameters.shouldEnableKerningAndLigaturesByDefault ? Kerning | Ligatures : 0); 275 277 276 278 m_compositingRenderServerPort = parameters.acceleratedCompositingPort.port();
Note:
See TracChangeset
for help on using the changeset viewer.