Title: [193699] branches/safari-601.1.46-branch/Source

Diff

Modified: branches/safari-601.1.46-branch/Source/WebCore/ChangeLog (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebCore/ChangeLog	2015-12-08 05:41:02 UTC (rev 193699)
@@ -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-17  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Delete FontPlatformData::allowsLigatures()

Modified: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCascade.cpp (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCascade.cpp	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCascade.cpp	2015-12-08 05:41:02 UTC (rev 193699)
@@ -91,9 +91,6 @@
 
 FontCascade::CodePath FontCascade::s_codePath = Auto;
 
-bool FontCascade::s_defaultKerning = false;
-bool FontCascade::s_defaultLigatures = false;
-
 // ============================================================================================
 // FontCascade Implementation (Cross-Platform Portion)
 // ============================================================================================
@@ -603,16 +600,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: branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCascade.h (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCascade.h	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebCore/platform/graphics/FontCascade.h	2015-12-08 05:41:02 UTC (rev 193699)
@@ -270,8 +270,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)
     {
@@ -311,7 +309,11 @@
             return true;
         if (textRenderingMode == OptimizeSpeed)
             return false;
-        return s_defaultKerning;
+#if PLATFORM(COCOA)
+        return true;
+#else
+        return false;
+#endif
     }
 
     bool computeEnableKerning() const
@@ -333,9 +335,6 @@
         return advancedTextRenderingMode();
     }
 
-    static bool s_defaultKerning;
-    static bool s_defaultLigatures;
-
     FontDescription m_fontDescription;
     mutable RefPtr<FontCascadeFonts> m_fonts;
     WeakPtrFactory<FontCascade> m_weakPtrFactory;

Modified: branches/safari-601.1.46-branch/Source/WebKit/mac/ChangeLog (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebKit/mac/ChangeLog	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebKit/mac/ChangeLog	2015-12-08 05:41:02 UTC (rev 193699)
@@ -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-13  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Split TypesettingFeatures into kerning and ligatures bools

Modified: branches/safari-601.1.46-branch/Source/WebKit/mac/WebView/WebView.mm (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebKit/mac/WebView/WebView.mm	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebKit/mac/WebView/WebView.mm	2015-12-08 05:41:02 UTC (rev 193699)
@@ -625,8 +625,6 @@
 NSString *_WebViewRemoteInspectorHasSessionChangedNotification = @"_WebViewRemoteInspectorHasSessionChangedNotification";
 #endif
 
-NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @"WebKitKerningAndLigaturesEnabledByDefault";
-
 @interface WebProgressItem : NSObject
 {
 @public
@@ -4689,7 +4687,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;
@@ -4700,10 +4697,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: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog	2015-12-08 05:41:02 UTC (rev 193699)
@@ -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-13  Myles C. Maxfield  <mmaxfi...@apple.com>
 
         Split TypesettingFeatures into kerning and ligatures bools

Modified: branches/safari-601.1.46-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/WebProcessCreationParameters.cpp	2015-12-08 05:41:02 UTC (rev 193699)
@@ -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: branches/safari-601.1.46-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/WebProcessCreationParameters.h	2015-12-08 05:41:02 UTC (rev 193699)
@@ -142,8 +142,6 @@
     String uiProcessBundleResourcePath;
     SandboxExtension::Handle uiProcessBundleResourcePathExtensionHandle;
 
-    bool shouldEnableKerningByDefault;
-    bool shouldEnableLigaturesByDefault;
     bool shouldEnableJIT;
     bool shouldEnableFTLJIT;
     

Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2015-12-08 05:41:02 UTC (rev 193699)
@@ -63,7 +63,6 @@
 NSString *WebDatabaseDirectoryDefaultsKey = @"WebDatabaseDirectory";
 NSString *WebKitLocalCacheDefaultsKey = @"WebKitLocalCache";
 NSString *WebStorageDirectoryDefaultsKey = @"WebKitLocalStorageDatabasePathPreferenceKey";
-NSString *WebKitKerningAndLigaturesEnabledByDefaultDefaultsKey = @"WebKitKerningAndLigaturesEnabledByDefault";
 NSString *WebKitJSCJITEnabledDefaultsKey = @"WebKitJSCJITEnabledDefaultsKey";
 NSString *WebKitJSCFTLJITEnabledDefaultsKey = @"WebKitJSCFTLJITEnabledDefaultsKey";
 NSString *WebKitMediaKeysStorageDirectoryDefaultsKey = @"WebKitMediaKeysStorageDirectory";
@@ -101,10 +100,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];
@@ -173,9 +168,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: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm (193698 => 193699)


--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm	2015-12-08 05:40:57 UTC (rev 193698)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm	2015-12-08 05:41:02 UTC (rev 193699)
@@ -143,8 +143,6 @@
 
     m_compositingRenderServerPort = WTF::move(parameters.acceleratedCompositingPort);
     m_presenterApplicationPid = parameters.presenterApplicationPid;
-    FontCascade::setDefaultKerning(parameters.shouldEnableKerningByDefault);
-    FontCascade::setDefaultLigatures(parameters.shouldEnableLigaturesByDefault);
 
     MemoryPressureHandler::ReliefLogger::setLoggingEnabled(parameters.shouldEnableMemoryPressureReliefLogging);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to