haikuwebkit/Source/WebKit/FeatureFlags
Peng Liu 57589b6003 [macOS] Clean up Feature Flags related code
https://bugs.webkit.org/show_bug.cgi?id=228803
<rdar://problem/81142982>

Reviewed by Tim Horton.

Source/WebKit:

On macOS, Safari Technology Preview or a local build WebKit/Safari will always
get the default preference values through the "Feature Flags" SPI. Unfortunately,
this approach won't work if the OS does not provide correct default preference values.

With this patch, we only get default preference values with the SPI for system
WebKit on macOS. For all other cases, we use hardcoded values. So that
WebKit will always get the correct default preference values.

This patch also fixes a few mistakes in two preferences: "webm_webaudio" and "vp8_decoder".

* FeatureFlags/WebKit-appletvos.plist:
* FeatureFlags/WebKit-ios.plist:
* FeatureFlags/WebKit-macos.plist:
* FeatureFlags/WebKit-watchos.plist:

* Shared/Cocoa/WebPreferencesDefaultValuesCocoa.mm:
(WebKit::isFeatureFlagEnabled):
* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::isFeatureFlagEnabled):
(WebKit::defaultAsyncFrameAndOverflowScrollingEnabled):
(WebKit::defaultUseGPUProcessForCanvasRenderingEnabled):
(WebKit::defaultUseGPUProcessForDOMRenderingEnabled):
(WebKit::defaultUseGPUProcessForMediaEnabled):
(WebKit::defaultUseGPUProcessForWebGLEnabled):
(WebKit::defaultCaptureAudioInGPUProcessEnabled):
(WebKit::defaultCaptureVideoInGPUProcessEnabled):
(WebKit::defaultWebRTCCodecsInGPUProcess):
(WebKit::defaultIncrementalPDFEnabled):
(WebKit::defaultWebMFormatReaderEnabled):
(WebKit::defaultVP8DecoderEnabled):
(WebKit::defaultVP9DecoderEnabled):
(WebKit::defaultVP9SWDecoderEnabledOnBattery):
(WebKit::defaultWebMParserEnabled):
(WebKit::defaultWebMWebAudioEnabled):
(WebKit::defaultInAppBrowserPrivacy): Deleted.
* Shared/WebPreferencesDefaultValues.h:

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Fix a typo.

Source/WebKitLegacy/mac:

On macOS, Safari Technology Preview or a local build WebKit/Safari will always
get the default preference values through the "Feature Flags" SPI. Unfortunately,
this approach won't work if the OS does not provide correct default preference values.

With this patch, we only get default preference values with the SPI for system
WebKit on macOS. For all other cases, we use hardcoded values. So that
WebKit will always get the correct default preference values.

This patch also fixes a few mistakes in two preferences: "webm_webaudio" and "vp8_decoder".

* WebView/WebPreferencesDefaultValues.h:
* WebView/WebPreferencesDefaultValues.mm:
(WebKit::isFeatureFlagEnabled):
(WebKit::defaultIncrementalPDFEnabled):
(WebKit::defaultWebXREnabled):
(WebKit::defaultWebMParserEnabled):
(WebKit::defaultWebMWebAudioEnabled):
(WebKit::defaultVP8DecoderEnabled):
(WebKit::defaultVP9DecoderEnabled):

LayoutTests:

Update a mac-bigsur specific test expectation file because the test is passing now.

* platform/mac/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt: Removed.
* platform/mac-bigsur/imported/w3c/web-platform-tests/media-source/mediasource-addsourcebuffer-expected.txt:


Canonical link: https://commits.webkit.org/240316@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-06 16:38:28 +00:00
..
WebKit-appletvos.plist [macOS] Clean up Feature Flags related code 2021-08-06 16:38:28 +00:00
WebKit-ios.plist [macOS] Clean up Feature Flags related code 2021-08-06 16:38:28 +00:00
WebKit-macos.plist [macOS] Clean up Feature Flags related code 2021-08-06 16:38:28 +00:00
WebKit-watchos.plist [macOS] Clean up Feature Flags related code 2021-08-06 16:38:28 +00:00