Diff
Modified: trunk/Source/WebKit/ChangeLog (292382 => 292383)
--- trunk/Source/WebKit/ChangeLog 2022-04-05 08:03:38 UTC (rev 292382)
+++ trunk/Source/WebKit/ChangeLog 2022-04-05 08:19:21 UTC (rev 292383)
@@ -1,3 +1,17 @@
+2022-04-05 Tim Horton <[email protected]>
+
+ Remove system feature flags implementation
+ https://bugs.webkit.org/show_bug.cgi?id=238791
+
+ Reviewed by Megan Gardner.
+
+ * Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:
+ (WebKit::isFeatureFlagEnabled): Deleted.
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::isFeatureFlagEnabled): Deleted.
+ * Shared/WebPreferencesDefaultValues.h:
+ * Shared/win/WebPreferencesDefaultValuesWin.cpp: Removed.
+
2022-04-05 Adrian Perez de Castro <[email protected]>
[WPE] Mark "backend" parameters of web view constructors not nullable
Modified: trunk/Source/WebKit/PlatformWin.cmake (292382 => 292383)
--- trunk/Source/WebKit/PlatformWin.cmake 2022-04-05 08:03:38 UTC (rev 292382)
+++ trunk/Source/WebKit/PlatformWin.cmake 2022-04-05 08:19:21 UTC (rev 292383)
@@ -44,7 +44,6 @@
Shared/win/NativeWebWheelEventWin.cpp
Shared/win/WebCoreArgumentCodersWin.cpp
Shared/win/WebEventFactory.cpp
- Shared/win/WebPreferencesDefaultValuesWin.cpp
UIProcess/BackingStore.cpp
UIProcess/DefaultUndoController.cpp
Modified: trunk/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm (292382 => 292383)
--- trunk/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm 2022-04-05 08:03:38 UTC (rev 292382)
+++ trunk/Source/WebKit/Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm 2022-04-05 08:19:21 UTC (rev 292383)
@@ -30,7 +30,6 @@
#import "ImageAnalysisUtilities.h"
#import <Foundation/NSBundle.h>
-#import <pal/spi/cocoa/FeatureFlagsSPI.h>
#import <wtf/RetainPtr.h>
#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
#import <wtf/text/WTFString.h>
@@ -37,35 +36,7 @@
namespace WebKit {
-// Because of <rdar://problem/60608008>, WebKit has to parse the feature flags plist file
-bool isFeatureFlagEnabled(const char* featureName, bool defaultValue)
-{
-#if HAVE(SYSTEM_FEATURE_FLAGS)
-
#if PLATFORM(MAC)
- static bool isSystemWebKit = [] {
- NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")];
- return [bundle.bundlePath hasPrefix:@"/System/"];
- }();
-
- if (isSystemWebKit)
- return _os_feature_enabled_impl("WebKit", featureName);
-
- return defaultValue;
-#else
- UNUSED_PARAM(defaultValue);
- return _os_feature_enabled_impl("WebKit", featureName);
-#endif // PLATFORM(MAC)
-
-#else
-
- UNUSED_PARAM(featureName);
- return defaultValue;
-
-#endif // HAVE(SYSTEM_FEATURE_FLAGS)
-}
-
-#if PLATFORM(MAC)
bool defaultScrollAnimatorEnabled()
{
return [[NSUserDefaults standardUserDefaults] boolForKey:@"NSScrollAnimationEnabled"];
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (292382 => 292383)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2022-04-05 08:03:38 UTC (rev 292382)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2022-04-05 08:19:21 UTC (rev 292383)
@@ -30,7 +30,6 @@
#include <wtf/text/WTFString.h>
#if PLATFORM(COCOA)
-#include <pal/spi/cocoa/FeatureFlagsSPI.h>
#include <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
#endif
@@ -41,13 +40,6 @@
namespace WebKit {
-#if !PLATFORM(COCOA) && !PLATFORM(WIN)
-bool isFeatureFlagEnabled(const char*, bool defaultValue)
-{
- return defaultValue;
-}
-#endif
-
#if PLATFORM(IOS_FAMILY)
bool defaultPassiveTouchListenersAsDefaultOnDocument()
Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h (292382 => 292383)
--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2022-04-05 08:03:38 UTC (rev 292382)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2022-04-05 08:19:21 UTC (rev 292383)
@@ -35,8 +35,6 @@
namespace WebKit {
-bool isFeatureFlagEnabled(const char*, bool defaultValue = false);
-
#if PLATFORM(IOS_FAMILY)
bool defaultPassiveTouchListenersAsDefaultOnDocument();
bool defaultCSSOMViewScrollingAPIEnabled();
Deleted: trunk/Source/WebKit/Shared/win/WebPreferencesDefaultValuesWin.cpp (292382 => 292383)
--- trunk/Source/WebKit/Shared/win/WebPreferencesDefaultValuesWin.cpp 2022-04-05 08:03:38 UTC (rev 292382)
+++ trunk/Source/WebKit/Shared/win/WebPreferencesDefaultValuesWin.cpp 2022-04-05 08:19:21 UTC (rev 292383)
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2020 Sony Interactive Entertainment Inc.
- *
- * 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. AND ITS CONTRIBUTORS ``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 ITS 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.
- */
-
-#include "config.h"
-#include "WebPreferencesDefaultValues.h"
-
-#include <wtf/WindowsExtras.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-bool isFeatureFlagEnabled(const char* featureName, bool defaultValue)
-{
- auto featureNameWide = String(featureName).wideCharacters();
- DWORD data;
- DWORD dataSize = sizeof data;
- DWORD keyType;
- HRESULT hr = getRegistryValue(HKEY_CURRENT_USER, L"Software\\WebKit", featureNameWide.data(), &keyType, &data, &dataSize);
- if (hr != ERROR_SUCCESS)
- return defaultValue;
- if (keyType != REG_DWORD)
- return defaultValue;
- if (dataSize != sizeof data)
- return defaultValue;
- return data;
-}
-
-} // namespace WebKit
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (292382 => 292383)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2022-04-05 08:03:38 UTC (rev 292382)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2022-04-05 08:19:21 UTC (rev 292383)
@@ -1,3 +1,14 @@
+2022-04-05 Tim Horton <[email protected]>
+
+ Remove system feature flags implementation
+ https://bugs.webkit.org/show_bug.cgi?id=238791
+
+ Reviewed by Megan Gardner.
+
+ * WebView/WebPreferencesDefaultValues.h:
+ * WebView/WebPreferencesDefaultValues.mm:
+ (WebKit::isFeatureFlagEnabled): Deleted.
+
2022-04-04 Tim Horton <[email protected]>
Remove VP8/9 and WebM-related system feature flags
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h (292382 => 292383)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h 2022-04-05 08:03:38 UTC (rev 292382)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.h 2022-04-05 08:19:21 UTC (rev 292383)
@@ -35,10 +35,6 @@
namespace WebKit {
-#if PLATFORM(COCOA)
-bool isFeatureFlagEnabled(const char*, bool defaultValue = false);
-#endif
-
#if PLATFORM(IOS_FAMILY)
bool defaultAllowsInlineMediaPlayback();
bool defaultAllowsInlineMediaPlaybackAfterFullscreen();
Modified: trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm (292382 => 292383)
--- trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm 2022-04-05 08:03:38 UTC (rev 292382)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebPreferencesDefaultValues.mm 2022-04-05 08:19:21 UTC (rev 292383)
@@ -30,7 +30,6 @@
#import <WebCore/RuntimeApplicationChecks.h>
#import <mach-o/dyld.h>
#import <pal/spi/cf/CFUtilitiesSPI.h>
-#import <pal/spi/cocoa/FeatureFlagsSPI.h>
#import <wtf/cocoa/RuntimeApplicationChecksCocoa.h>
#import <wtf/spi/darwin/dyldSPI.h>
#import <wtf/text/WTFString.h>
@@ -41,35 +40,6 @@
namespace WebKit {
-#if PLATFORM(COCOA)
-
-// Because of <rdar://problem/60608008>, WebKit has to parse the feature flags plist file
-bool isFeatureFlagEnabled(const char* featureName, bool defaultValue)
-{
-#if HAVE(SYSTEM_FEATURE_FLAGS)
-
-#if PLATFORM(MAC)
- static bool isSystemWebKit = [] {
- auto *bundle = [NSBundle bundleForClass:NSClassFromString(@"WebResource")];
- return [bundle.bundlePath hasPrefix:@"/System/"];
- }();
-
- return isSystemWebKit ? _os_feature_enabled_impl("WebKit", featureName) : defaultValue;
-#else
- UNUSED_PARAM(defaultValue);
- return _os_feature_enabled_impl("WebKit", featureName);
-#endif // PLATFORM(MAC)
-
-#else
-
- UNUSED_PARAM(featureName);
- return defaultValue;
-
-#endif // HAVE(SYSTEM_FEATURE_FLAGS)
-}
-
-#endif
-
#if PLATFORM(IOS_FAMILY)
bool defaultAllowsInlineMediaPlayback()