WKPreferencesSetFontSmoothingLevel doesn't actually do anything
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 01:55:04 +0000 (01:55 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 01:55:04 +0000 (01:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191708

Reviewed by Simon Fraser.

Delete the symbol because no one calls it and it doesn't do anything

Source/WebKit:

* Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
* Shared/FontSmoothingLevel.h: Removed.
* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKAPICast.h:
(WebKit::toFontSmoothingLevel): Deleted.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetFontSmoothingLevel): Deleted.
(WKPreferencesGetFontSmoothingLevel): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebPreferences.h:
* WebKit.xcodeproj/project.pbxproj:
* mac/WebKit2.order:

Tools:

* TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
(TestWebKitAPI::TEST):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238264 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
Source/WebKit/ChangeLog
Source/WebKit/Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb
Source/WebKit/Shared/FontSmoothingLevel.h [deleted file]
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/C/WKAPICast.h
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit/UIProcess/WebPreferences.h
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/mac/WebKit2.order
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKit/WKPreferences.cpp
Tools/WebKitTestRunner/TestController.cpp

index a06f83c..e70e869 100644 (file)
@@ -1,3 +1,25 @@
+2018-11-15  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        WKPreferencesSetFontSmoothingLevel doesn't actually do anything
+        https://bugs.webkit.org/show_bug.cgi?id=191708
+
+        Reviewed by Simon Fraser.
+
+        Delete the symbol because no one calls it and it doesn't do anything
+
+        * Scripts/PreferencesTemplates/WebPreferencesStoreDefaultsMap.cpp.erb:
+        * Shared/FontSmoothingLevel.h: Removed.
+        * Shared/WebPreferences.yaml:
+        * UIProcess/API/C/WKAPICast.h:
+        (WebKit::toFontSmoothingLevel): Deleted.
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetFontSmoothingLevel): Deleted.
+        (WKPreferencesGetFontSmoothingLevel): Deleted.
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * UIProcess/WebPreferences.h:
+        * WebKit.xcodeproj/project.pbxproj:
+        * mac/WebKit2.order:
+
 2018-11-15  Truitt Savell  <tsavell@apple.com>
 
         Unreviewed, rolling out r238244.
index 8f52810..0648fae 100644 (file)
@@ -34,7 +34,6 @@
 #include <wtf/Variant.h>
 
 // FIXME: These should added via options in WebPreferences.yaml, rather than hardcoded.
-#include "FontSmoothingLevel.h"
 #include <WebCore/DeprecatedGlobalSettings.h>
 #include <WebCore/LibWebRTCProvider.h>
 #include <WebCore/SecurityOrigin.h>
diff --git a/Source/WebKit/Shared/FontSmoothingLevel.h b/Source/WebKit/Shared/FontSmoothingLevel.h
deleted file mode 100644 (file)
index aebddda..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
- */
-
-#ifndef FontSmoothingLevel_h
-#define FontSmoothingLevel_h
-
-namespace WebKit {
-
-enum FontSmoothingLevel {
-    FontSmoothingLevelNoSubpixelAntiAliasing = 0,
-    FontSmoothingLevelLight = 1,
-    FontSmoothingLevelMedium = 2,
-    FontSmoothingLevelStrong = 3,
-};
-
-} // namespace WebKit
-
-#endif // FontSmoothingLevel_h
index 0c86d2f..ed733bf 100644 (file)
@@ -867,12 +867,6 @@ PasswordEchoDuration:
   defaultValue: 2
   webcoreName: passwordEchoDurationInSeconds
 
-# FIXME: 
-FontSmoothingLevel:
-  type: uint32_t
-  defaultValue: FontSmoothingLevelMedium
-  webcoreBinding: none
-
 LayoutFallbackWidth:
   type: uint32_t
   defaultValue: 980
index 718707f..004b985 100644 (file)
@@ -28,7 +28,6 @@
 #define WKAPICast_h
 
 #include "CacheModel.h"
-#include "FontSmoothingLevel.h"
 #include "HTTPCookieAcceptPolicy.h"
 #include "InjectedBundleHitTestResultMediaType.h"
 #include "PluginModuleInfo.h"
@@ -250,41 +249,6 @@ inline WKProcessTerminationReason toAPI(ProcessTerminationReason reason)
     return kWKProcessTerminationReasonCrash;
 }
 
-inline FontSmoothingLevel toFontSmoothingLevel(WKFontSmoothingLevel wkLevel)
-{
-    switch (wkLevel) {
-    case kWKFontSmoothingLevelNoSubpixelAntiAliasing:
-        return FontSmoothingLevelNoSubpixelAntiAliasing;
-    case kWKFontSmoothingLevelLight:
-        return FontSmoothingLevelLight;
-    case kWKFontSmoothingLevelMedium:
-        return FontSmoothingLevelMedium;
-    case kWKFontSmoothingLevelStrong:
-        return FontSmoothingLevelStrong;
-    }
-
-    ASSERT_NOT_REACHED();
-    return FontSmoothingLevelMedium;
-}
-
-
-inline WKFontSmoothingLevel toAPI(FontSmoothingLevel level)
-{
-    switch (level) {
-    case FontSmoothingLevelNoSubpixelAntiAliasing:
-        return kWKFontSmoothingLevelNoSubpixelAntiAliasing;
-    case FontSmoothingLevelLight:
-        return kWKFontSmoothingLevelLight;
-    case FontSmoothingLevelMedium:
-        return kWKFontSmoothingLevelMedium;
-    case FontSmoothingLevelStrong:
-        return kWKFontSmoothingLevelStrong;
-    }
-
-    ASSERT_NOT_REACHED();
-    return kWKFontSmoothingLevelMedium;
-}
-
 inline WKEditableLinkBehavior toAPI(WebCore::EditableLinkBehavior behavior)
 {
     switch (behavior) {
index 0f20cc9..823174a 100644 (file)
@@ -399,16 +399,6 @@ bool WKPreferencesGetTextAreasAreResizable(WKPreferencesRef preferencesRef)
     return toImpl(preferencesRef)->textAreasAreResizable();
 }
 
-void WKPreferencesSetFontSmoothingLevel(WKPreferencesRef preferencesRef, WKFontSmoothingLevel wkLevel)
-{
-    toImpl(preferencesRef)->setFontSmoothingLevel(toFontSmoothingLevel(wkLevel));
-}
-
-WKFontSmoothingLevel WKPreferencesGetFontSmoothingLevel(WKPreferencesRef preferencesRef)
-{
-    return toAPI(static_cast<FontSmoothingLevel>(toImpl(preferencesRef)->fontSmoothingLevel()));
-}
-
 void WKPreferencesSetSubpixelAntialiasedLayerTextEnabled(WKPreferencesRef preferencesRef, bool flag)
 {
     toImpl(preferencesRef)->setSubpixelAntialiasedLayerTextEnabled(flag);
index 0fcb205..3b31fa2 100644 (file)
 extern "C" {
 #endif
 
-enum WKFontSmoothingLevel {
-    kWKFontSmoothingLevelNoSubpixelAntiAliasing = 0,
-    kWKFontSmoothingLevelLight = 1,
-    kWKFontSmoothingLevelMedium = 2,
-    kWKFontSmoothingLevelStrong = 3,
-};
-typedef enum WKFontSmoothingLevel WKFontSmoothingLevel;
-
 enum WKEditableLinkBehavior {
     kWKEditableLinkBehaviorDefault,
     kWKEditableLinkBehaviorAlwaysLive,
@@ -62,10 +54,6 @@ WK_EXPORT void WKPreferencesSetExperimentalFeatureForKey(WKPreferencesRef, bool,
 WK_EXPORT void WKPreferencesResetAllInternalDebugFeatures(WKPreferencesRef);
 WK_EXPORT void WKPreferencesSetInternalDebugFeatureForKey(WKPreferencesRef, bool, WKStringRef);
 
-// Defaults to kWKFontSmoothingLevelMedium.
-WK_EXPORT void WKPreferencesSetFontSmoothingLevel(WKPreferencesRef, WKFontSmoothingLevel);
-WK_EXPORT WKFontSmoothingLevel WKPreferencesGetFontSmoothingLevel(WKPreferencesRef);
-
 // Defaults to false.
 WK_EXPORT void WKPreferencesSetSubpixelAntialiasedLayerTextEnabled(WKPreferencesRef, bool);
 WK_EXPORT bool WKPreferencesGetSubpixelAntialiasedLayerTextEnabled(WKPreferencesRef);
index c4ad46e..317f740 100644 (file)
@@ -28,7 +28,6 @@
 #include "APIExperimentalFeature.h"
 #include "APIInternalDebugFeature.h"
 #include "APIObject.h"
-#include "FontSmoothingLevel.h"
 #include "WebPreferencesDefinitions.h"
 #include "WebPreferencesStore.h"
 #include <wtf/HashSet.h>
index 96c6241..4aa777a 100644 (file)
                75A8D2C4187CCF9F00C39C9E /* WKWebsiteDataStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebsiteDataStore.h; sourceTree = "<group>"; };
                75A8D2C5187CCF9F00C39C9E /* WKWebsiteDataStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebsiteDataStore.mm; sourceTree = "<group>"; };
                75A8D2D4187D1C0100C39C9E /* WKWebsiteDataStoreInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebsiteDataStoreInternal.h; sourceTree = "<group>"; };
-               762B7481120BBA0100819339 /* FontSmoothingLevel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontSmoothingLevel.h; sourceTree = "<group>"; };
                762B7484120BBA2D00819339 /* WKPreferencesRefPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPreferencesRefPrivate.h; sourceTree = "<group>"; };
                7A1506721DD56298001F4B58 /* com.apple.WebKit.plugin-common.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file; name = "com.apple.WebKit.plugin-common.sb"; path = "DerivedSources/WebKit2/com.apple.WebKit.plugin-common.sb"; sourceTree = BUILT_PRODUCTS_DIR; };
                7A1E2A841EEFE88A0037A0E0 /* APINotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APINotificationProvider.h; sourceTree = "<group>"; };
                                1AA41AB412C02EC4002BE67B /* EditorState.h */,
                                BCE81D8A1319F7EF00241910 /* FontInfo.cpp */,
                                BCE81D8B1319F7EF00241910 /* FontInfo.h */,
-                               762B7481120BBA0100819339 /* FontSmoothingLevel.h */,
                                1A14F8DF1D74C834006CBEC6 /* FrameInfoData.cpp */,
                                1A14F8E01D74C834006CBEC6 /* FrameInfoData.h */,
                                1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */,
                        inputPaths = (
                        );
                        name = "Generate Unified Sources";
-                       outputFileListPaths = (
-                       );
                        outputPaths = (
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        inputPaths = (
                        );
                        name = "Generate Derived Sources";
-                       outputFileListPaths = (
-                       );
                        outputPaths = (
                        );
                        runOnlyForDeploymentPostprocessing = 0;
index 70be8aa..3479995 100644 (file)
@@ -8121,8 +8121,6 @@ __ZN6WebKit10WebContext25setShouldUseFontSmoothingEb
 __ZN6WebKit17ChildProcessProxy4sendIN8Messages10WebProcess25SetShouldUseFontSmoothingEEEbRKT_yj
 __ZN6WebKit17ChildProcessProxy4sendIN8Messages10WebProcess13SetCacheModelEEEbRKT_yj
 _WKPreferencesResetTestRunnerOverrides
-_WKPreferencesSetFontSmoothingLevel
-__ZN6WebKit14WebPreferences21setFontSmoothingLevelERKj
 _WKPreferencesSetXSSAuditorEnabled
 __ZN6WebKit14WebPreferences20setXSSAuditorEnabledERKb
 _WKPreferencesSetWebAudioEnabled
index 1cfab1b..0a74029 100644 (file)
@@ -1,3 +1,17 @@
+2018-11-15  Myles C. Maxfield  <mmaxfield@apple.com>
+
+        WKPreferencesSetFontSmoothingLevel doesn't actually do anything
+        https://bugs.webkit.org/show_bug.cgi?id=191708
+
+        Reviewed by Simon Fraser.
+
+        Delete the symbol because no one calls it and it doesn't do anything
+
+        * TestWebKitAPI/Tests/WebKit/WKPreferences.cpp:
+        (TestWebKitAPI::TEST):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::resetPreferencesToConsistentValues):
+
 2018-11-15  Truitt Savell  <tsavell@apple.com>
 
         Unreviewed, rolling out r238244.
index 50d7463..67c2456 100644 (file)
@@ -94,8 +94,6 @@ TEST(WebKit, WKPreferencesDefaults)
     EXPECT_FALSE(WKPreferencesGetDeveloperExtrasEnabled(preference));
     EXPECT_TRUE(WKPreferencesGetTextAreasAreResizable(preference));
 
-    EXPECT_EQ(kWKFontSmoothingLevelMedium, WKPreferencesGetFontSmoothingLevel(preference));
-
     EXPECT_TRUE(WKPreferencesGetAcceleratedCompositingEnabled(preference));
     EXPECT_FALSE(WKPreferencesGetCompositingBordersVisible(preference));
     EXPECT_FALSE(WKPreferencesGetCompositingRepaintCountersVisible(preference));
index d4e818e..56374f7 100644 (file)
@@ -726,7 +726,6 @@ void TestController::resetPreferencesToConsistentValues(const TestOptions& optio
     WKPreferencesSetProcessSwapOnNavigationEnabled(preferences, options.shouldEnableProcessSwapOnNavigation());
     WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(preferences, false);
     WKPreferencesSetOfflineWebApplicationCacheEnabled(preferences, true);
-    WKPreferencesSetFontSmoothingLevel(preferences, kWKFontSmoothingLevelNoSubpixelAntiAliasing);
     WKPreferencesSetSubpixelAntialiasedLayerTextEnabled(preferences, false);
     WKPreferencesSetXSSAuditorEnabled(preferences, false);
     WKPreferencesSetWebAudioEnabled(preferences, true);