- Revision
- 191260
- Author
- mmaxfi...@apple.com
- Date
- 2015-10-18 09:36:14 -0700 (Sun, 18 Oct 2015)
Log Message
Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
https://bugs.webkit.org/show_bug.cgi?id=150287
Reviewed by Simon Fraser.
Source/WebCore:
This user default is currently on by default. Therefore, by setting the user default,
users can only disable kerning / ligatures (rather than enable it).
There are a few reasons why we should stop honoring it:
1. In the brave new world of font-feature-settings and font-variant-ligatures, there
are many different kinds of ligatures which may be enabled at will. The simplistic
statement of "turn on ligatures" no longer has any meaning.
2. If a user wants to disable kerning / ligatures, he/she can do it with a user
stylesheet.
3. The default isn't able to be tested with DumpRenderTree or WebKitTestRunner.
4. I have never heard of anyone actually using this user default.
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::setDefaultKerning): Deleted.
(WebCore::FontCascade::setDefaultLigatures): Deleted.
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::advancedTextRenderingMode):
Source/WebKit/mac:
* WebView/WebView.mm:
(+[WebView initialize]): Deleted.
Source/WebKit2:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
(WebKit::WebProcessCreationParameters::encode): Deleted.
(WebKit::WebProcessCreationParameters::decode): Deleted.
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::registerUserDefaultsIfNeeded): Deleted.
(WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (191259 => 191260)
--- trunk/Source/WebCore/ChangeLog 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebCore/ChangeLog 2015-10-18 16:36:14 UTC (rev 191260)
@@ -1,3 +1,32 @@
+2015-10-18 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
+ https://bugs.webkit.org/show_bug.cgi?id=150287
+
+ Reviewed by Simon Fraser.
+
+ This user default is currently on by default. Therefore, by setting the user default,
+ users can only disable kerning / ligatures (rather than enable it).
+
+ There are a few reasons why we should stop honoring it:
+
+ 1. In the brave new world of font-feature-settings and font-variant-ligatures, there
+ are many different kinds of ligatures which may be enabled at will. The simplistic
+ statement of "turn on ligatures" no longer has any meaning.
+
+ 2. If a user wants to disable kerning / ligatures, he/she can do it with a user
+ stylesheet.
+
+ 3. The default isn't able to be tested with DumpRenderTree or WebKitTestRunner.
+
+ 4. I have never heard of anyone actually using this user default.
+
+ * platform/graphics/FontCascade.cpp:
+ (WebCore::FontCascade::setDefaultKerning): Deleted.
+ (WebCore::FontCascade::setDefaultLigatures): Deleted.
+ * platform/graphics/FontCascade.h:
+ (WebCore::FontCascade::advancedTextRenderingMode):
+
2015-10-18 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r191250 and r191253.
Modified: trunk/Source/WebCore/platform/graphics/FontCascade.cpp (191259 => 191260)
--- trunk/Source/WebCore/platform/graphics/FontCascade.cpp 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.cpp 2015-10-18 16:36:14 UTC (rev 191260)
@@ -92,9 +92,6 @@
FontCascade::CodePath FontCascade::s_codePath = Auto;
-bool FontCascade::s_defaultKerning = false;
-bool FontCascade::s_defaultLigatures = false;
-
// ============================================================================================
// FontCascade Implementation (Cross-Platform Portion)
// ============================================================================================
@@ -587,16 +584,6 @@
return s_codePath;
}
-void FontCascade::setDefaultKerning(bool enable)
-{
- s_defaultKerning = enable;
-}
-
-void FontCascade::setDefaultLigatures(bool enable)
-{
- s_defaultLigatures = enable;
-}
-
FontCascade::CodePath FontCascade::codePath(const TextRun& run) const
{
if (s_codePath != Auto)
Modified: trunk/Source/WebCore/platform/graphics/FontCascade.h (191259 => 191260)
--- trunk/Source/WebCore/platform/graphics/FontCascade.h 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.h 2015-10-18 16:36:14 UTC (rev 191260)
@@ -265,8 +265,6 @@
static CodePath codePath();
static CodePath s_codePath;
- WEBCORE_EXPORT static void setDefaultKerning(bool);
- WEBCORE_EXPORT static void setDefaultLigatures(bool);
static const uint8_t s_roundingHackCharacterTable[256];
static bool isRoundingHackCharacter(UChar32 c)
{
@@ -306,7 +304,11 @@
return true;
if (textRenderingMode == OptimizeSpeed)
return false;
- return s_defaultKerning;
+#if PLATFORM(COCOA)
+ return true;
+#else
+ return false;
+#endif
}
bool computeEnableKerning() const
@@ -329,9 +331,6 @@
return advancedTextRenderingMode();
}
- static bool s_defaultKerning;
- static bool s_defaultLigatures;
-
FontCascadeDescription m_fontDescription;
mutable RefPtr<FontCascadeFonts> m_fonts;
WeakPtrFactory<FontCascade> m_weakPtrFactory;
Modified: trunk/Source/WebKit/mac/ChangeLog (191259 => 191260)
--- trunk/Source/WebKit/mac/ChangeLog 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebKit/mac/ChangeLog 2015-10-18 16:36:14 UTC (rev 191260)
@@ -1,3 +1,13 @@
+2015-10-18 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
+ https://bugs.webkit.org/show_bug.cgi?id=150287
+
+ Reviewed by Simon Fraser.
+
+ * WebView/WebView.mm:
+ (+[WebView initialize]): Deleted.
+
2015-10-18 Commit Queue <commit-qu...@webkit.org>
Unreviewed, rolling out r191250 and r191253.
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (191259 => 191260)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2015-10-18 16:36:14 UTC (rev 191260)
@@ -624,8 +624,6 @@
NSString *_WebViewRemoteInspectorHasSessionChangedNotification = @"_WebViewRemoteInspectorHasSessionChangedNotification";
#endif
-NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @"WebKitKerningAndLigaturesEnabledByDefault";
-
@interface WebProgressItem : NSObject
{
@public
@@ -4697,7 +4695,6 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesRemovedNotification:) name:WebPreferencesRemovedNotification object:nil];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- [defaults registerDefaults:[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:YES] forKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey]];
#if PLATFORM(IOS)
continuousSpellCheckingEnabled = NO;
@@ -4708,10 +4705,6 @@
grammarCheckingEnabled = [defaults boolForKey:WebGrammarCheckingEnabled];
#endif
- bool defaultKerningAndLigatures = [defaults boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
- FontCascade::setDefaultKerning(defaultKerningAndLigatures);
- FontCascade::setDefaultLigatures(defaultKerningAndLigatures);
-
#if !PLATFORM(IOS)
automaticQuoteSubstitutionEnabled = [self _shouldAutomaticQuoteSubstitutionBeEnabled];
automaticLinkDetectionEnabled = [defaults boolForKey:WebAutomaticLinkDetectionEnabled];
Modified: trunk/Source/WebKit2/ChangeLog (191259 => 191260)
--- trunk/Source/WebKit2/ChangeLog 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebKit2/ChangeLog 2015-10-18 16:36:14 UTC (rev 191260)
@@ -1,3 +1,21 @@
+2015-10-18 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Stop honoring the user default "WebKitKerningAndLigaturesEnabledByDefault"
+ https://bugs.webkit.org/show_bug.cgi?id=150287
+
+ Reviewed by Simon Fraser.
+
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Deleted.
+ (WebKit::WebProcessCreationParameters::encode): Deleted.
+ (WebKit::WebProcessCreationParameters::decode): Deleted.
+ * Shared/WebProcessCreationParameters.h:
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::registerUserDefaultsIfNeeded): Deleted.
+ (WebKit::WebProcessPool::platformInitializeWebProcess): Deleted.
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess): Deleted.
+
2015-10-18 Yusuke Suzuki <utatane....@gmail.com>
[GTK] Implement WebContextMenuProxyGtk::showContextMenu after r191194
Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (191259 => 191260)
--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp 2015-10-18 16:36:14 UTC (rev 191260)
@@ -40,8 +40,6 @@
, shouldUseFontSmoothing(true)
, defaultRequestTimeoutInterval(INT_MAX)
#if PLATFORM(COCOA)
- , shouldEnableKerningByDefault(false)
- , shouldEnableLigaturesByDefault(false)
, shouldEnableJIT(false)
, shouldEnableFTLJIT(false)
#endif
@@ -123,8 +121,6 @@
encoder << acceleratedCompositingPort;
encoder << uiProcessBundleResourcePath;
encoder << uiProcessBundleResourcePathExtensionHandle;
- encoder << shouldEnableKerningByDefault;
- encoder << shouldEnableLigaturesByDefault;
encoder << shouldEnableJIT;
encoder << shouldEnableFTLJIT;
encoder << !!bundleParameterData;
@@ -269,10 +265,6 @@
return false;
if (!decoder.decode(parameters.uiProcessBundleResourcePathExtensionHandle))
return false;
- if (!decoder.decode(parameters.shouldEnableKerningByDefault))
- return false;
- if (!decoder.decode(parameters.shouldEnableLigaturesByDefault))
- return false;
if (!decoder.decode(parameters.shouldEnableJIT))
return false;
if (!decoder.decode(parameters.shouldEnableFTLJIT))
Modified: trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h (191259 => 191260)
--- trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h 2015-10-18 16:36:14 UTC (rev 191260)
@@ -142,8 +142,6 @@
String uiProcessBundleResourcePath;
SandboxExtension::Handle uiProcessBundleResourcePathExtensionHandle;
- bool shouldEnableKerningByDefault;
- bool shouldEnableLigaturesByDefault;
bool shouldEnableJIT;
bool shouldEnableFTLJIT;
Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm (191259 => 191260)
--- trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2015-10-18 16:36:14 UTC (rev 191260)
@@ -64,7 +64,6 @@
NSString *WebDatabaseDirectoryDefaultsKey = @"WebDatabaseDirectory";
NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache";
NSString *WebStorageDirectoryDefaultsKey = @"WebKitLocalStorageDatabasePathPreferenceKey";
-NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @"WebKitKerningAndLigaturesEnabledByDefault";
NSString *WebKitJSCJITEnabledDefaultsKey = @"WebKitJSCJITEnabledDefaultsKey";
NSString *WebKitJSCFTLJITEnabledDefaultsKey = @"WebKitJSCFTLJITEnabledDefaultsKey";
NSString *WebKitMediaKeysStorageDirectoryDefaultsKey = @"WebKitMediaKeysStorageDirectory";
@@ -102,10 +101,6 @@
[registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitJSCJITEnabledDefaultsKey];
[registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitJSCFTLJITEnabledDefaultsKey];
-
-#if PLATFORM(COCOA)
- [registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
-#endif
#if ENABLE(NETWORK_CACHE)
[registrationDictionary setObject:[NSNumber numberWithBool:YES] forKey:WebKitNetworkCacheEnabledDefaultsKey];
@@ -175,9 +170,6 @@
parameters.accessibilityEnhancedUserInterfaceEnabled = false;
#endif
- bool shouldEnableKerningAndLigaturesByDefault = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey];
- parameters.shouldEnableKerningByDefault = shouldEnableKerningAndLigaturesByDefault;
- parameters.shouldEnableLigaturesByDefault = shouldEnableKerningAndLigaturesByDefault;
parameters.shouldEnableJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCJITEnabledDefaultsKey];
parameters.shouldEnableFTLJIT = [[NSUserDefaults standardUserDefaults] boolForKey:WebKitJSCFTLJITEnabledDefaultsKey];
parameters.shouldEnableMemoryPressureReliefLogging = [[NSUserDefaults standardUserDefaults] boolForKey:@"LogMemoryJetsamDetails"];
Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (191259 => 191260)
--- trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2015-10-18 13:30:33 UTC (rev 191259)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm 2015-10-18 16:36:14 UTC (rev 191260)
@@ -152,8 +152,6 @@
m_compositingRenderServerPort = WTF::move(parameters.acceleratedCompositingPort);
m_presenterApplicationPid = parameters.presenterApplicationPid;
- FontCascade::setDefaultKerning(parameters.shouldEnableKerningByDefault);
- FontCascade::setDefaultLigatures(parameters.shouldEnableLigaturesByDefault);
MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging);