Commit de408620 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

Simplify RuntimeFeatureEnableOptions

- Combine kEnableOnly into kDefault. The difference between them
  was that kDefault respects field trial settings and both
  --enable-feature and --disable-feature, while kEnableOnly didn't
  respect the disabled status of field trial and --disable-feature.
  This doesn't affect the default status of the features.

  35 features are changed from kEnableOnly to kDefault.

- If applicable, use kDefault for features that used kDisableOnly.
  The difference between kDisableOnly and kDefault was similar to
  the above, but for enabled status of field trial and
  --enable-features. All of the changed features are already enabled
  by default in Chromium and have status:"stable" in Blink, so the
  change doesn't affect the default status of the features.

  The following features are changed from kDisableOnly to kDefault:
    WebUsb, BackgroundFetch, InstallApp, BlockCredentialedSubresources.

- Remove kDisableOnly and kEnableOnlyIfOverriddenFromCommandLine,
  and add kSetOnlyIfOverridden for origin trial features that require
  the Chromium feature to be enabled by default and the blink feature to
  be controlled by origin trials, or for features that are enabled by
  default in Chromium but not in Blink.

  The following features are changed to kSetOnlyIfOverridden:
    NotificationContentImage, Portals, IdleDetection, SmsReceiver,
    WebNfc.

Bug: 1048656
Change-Id: Ifa3e590773212411097d07233b68b3c7a199a54f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2419579
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: default avatarJason Chase <chasej@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809517}
parent 4976f982
...@@ -141,15 +141,18 @@ enum RuntimeFeatureEnableOptions { ...@@ -141,15 +141,18 @@ enum RuntimeFeatureEnableOptions {
// - Otherwise if the base::Feature is enabled, enable the Blink feature. // - Otherwise if the base::Feature is enabled, enable the Blink feature.
// - Otherwise no change. // - Otherwise no change.
kDefault, kDefault,
// Enables the Blink feature when the base::Feature is enabled, // Enables the Blink feature when the base::Feature is overridden by field
// otherwise no change. // trial or command line. Otherwise no change. Its difference from kDefault is
kEnableOnly, // that the Blink feature isn't affected by the default state of the
// Enables the Blink feature when the base::Feature is enabled // base::Feature. This is useful for Blink origin trial features especially
// via an override on the command-line, otherwise no change. // those implemented in both Chromium and Blink. As origin trial only controls
kEnableOnlyIfOverriddenFromCommandLine, // the Blink features, for now we require the base::Feature to be enabled by
// Disables the Blink feature when the base::Feature is *disabled*, // default, but we don't want the default enabled status affect the Blink
// otherwise no change. // feature. See also https://crbug.com/1048656#c10.
kDisableOnly, // This can also be used for features that are enabled by default in Chromium
// but not in Blink on all platforms and we want to use the Blink status.
// However, we would prefer consistent Chromium and Blink status to this.
kSetOnlyIfOverridden,
}; };
template <typename T> template <typename T>
...@@ -161,7 +164,7 @@ struct RuntimeFeatureToChromiumFeatureMap { ...@@ -161,7 +164,7 @@ struct RuntimeFeatureToChromiumFeatureMap {
T feature_enabler; T feature_enabler;
// The chromium base::Feature to check. // The chromium base::Feature to check.
const base::Feature& chromium_feature; const base::Feature& chromium_feature;
const RuntimeFeatureEnableOptions option; const RuntimeFeatureEnableOptions option = kDefault;
}; };
template <typename Enabler> template <typename Enabler>
...@@ -170,28 +173,19 @@ void SetRuntimeFeatureFromChromiumFeature(const base::Feature& chromium_feature, ...@@ -170,28 +173,19 @@ void SetRuntimeFeatureFromChromiumFeature(const base::Feature& chromium_feature,
const Enabler& enabler) { const Enabler& enabler) {
using FeatureList = base::FeatureList; using FeatureList = base::FeatureList;
const bool feature_enabled = FeatureList::IsEnabled(chromium_feature); const bool feature_enabled = FeatureList::IsEnabled(chromium_feature);
const bool is_overridden =
FeatureList::GetInstance()->IsFeatureOverridden(chromium_feature.name);
switch (option) { switch (option) {
case kEnableOnly: case kSetOnlyIfOverridden:
if (feature_enabled) if (is_overridden)
enabler(true); enabler(feature_enabled);
break;
case kEnableOnlyIfOverriddenFromCommandLine:
if (FeatureList::GetInstance()->IsFeatureOverriddenFromCommandLine(
chromium_feature.name, FeatureList::OVERRIDE_ENABLE_FEATURE)) {
DCHECK(feature_enabled);
enabler(true);
}
break;
case kDisableOnly:
if (!feature_enabled)
enabler(false);
break; break;
case kDefault: case kDefault:
if (feature_enabled || FeatureList::GetInstance()->IsFeatureOverridden( if (feature_enabled || is_overridden)
chromium_feature.name)) {
enabler(feature_enabled); enabler(feature_enabled);
}
break; break;
default:
NOTREACHED();
} }
} }
...@@ -208,142 +202,122 @@ void SetRuntimeFeaturesFromChromiumFeatures() { ...@@ -208,142 +202,122 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
blinkFeatureToBaseFeatureMapping[] = blinkFeatureToBaseFeatureMapping[] =
{ {
// TODO(rodneyding): Sort features in alphabetical order // TODO(rodneyding): Sort features in alphabetical order
{wf::EnableWebUsb, features::kWebUsb, kDisableOnly}, {wf::EnableWebUsb, features::kWebUsb},
{wf::EnableBlockingFocusWithoutUserActivation, {wf::EnableBlockingFocusWithoutUserActivation,
blink::features::kBlockingFocusWithoutUserActivation, kEnableOnly}, blink::features::kBlockingFocusWithoutUserActivation},
{wf::EnableNotificationContentImage, features::kNotificationContentImage, {wf::EnableNotificationContentImage, features::kNotificationContentImage,
kDisableOnly}, kSetOnlyIfOverridden},
{wf::EnablePeriodicBackgroundSync, features::kPeriodicBackgroundSync, {wf::EnablePeriodicBackgroundSync, features::kPeriodicBackgroundSync},
kEnableOnly}, {wf::EnableWebXR, features::kWebXr},
{wf::EnableWebXR, features::kWebXr, kDefault}, {wf::EnableWebXRARModule, features::kWebXrArModule},
{wf::EnableWebXRARModule, features::kWebXrArModule, kDefault}, {wf::EnableWebXRHitTest, features::kWebXrHitTest},
{wf::EnableWebXRHitTest, features::kWebXrHitTest, kDefault}, {wf::EnableWebXRAnchors, features::kWebXrIncubations},
{wf::EnableWebXRAnchors, features::kWebXrIncubations, kEnableOnly}, {wf::EnableWebXRCameraAccess, features::kWebXrIncubations},
{wf::EnableWebXRCameraAccess, features::kWebXrIncubations, kEnableOnly}, {wf::EnableWebXRDepth, features::kWebXrIncubations},
{wf::EnableWebXRDepth, features::kWebXrIncubations, kEnableOnly}, {wf::EnableWebXRLightEstimation, features::kWebXrIncubations},
{wf::EnableWebXRLightEstimation, features::kWebXrIncubations, kEnableOnly}, {wf::EnableWebXRPlaneDetection, features::kWebXrIncubations},
{wf::EnableWebXRPlaneDetection, features::kWebXrIncubations, kEnableOnly}, {wf::EnableWebXRReflectionEstimation, features::kWebXrIncubations},
{wf::EnableWebXRReflectionEstimation, features::kWebXrIncubations,
kEnableOnly},
{wf::EnableUserActivationSameOriginVisibility, {wf::EnableUserActivationSameOriginVisibility,
features::kUserActivationSameOriginVisibility, kDefault}, features::kUserActivationSameOriginVisibility},
{wf::EnableExpensiveBackgroundTimerThrottling, {wf::EnableExpensiveBackgroundTimerThrottling,
features::kExpensiveBackgroundTimerThrottling, kDefault}, features::kExpensiveBackgroundTimerThrottling},
{wf::EnableTimerThrottlingForHiddenFrames, {wf::EnableTimerThrottlingForHiddenFrames,
features::kTimerThrottlingForHiddenFrames, kDefault}, features::kTimerThrottlingForHiddenFrames},
{wf::EnableSendBeaconThrowForBlobWithNonSimpleType, {wf::EnableSendBeaconThrowForBlobWithNonSimpleType,
features::kSendBeaconThrowForBlobWithNonSimpleType, kEnableOnly}, features::kSendBeaconThrowForBlobWithNonSimpleType},
{wf::EnablePaymentRequest, features::kWebPayments, kDefault}, {wf::EnablePaymentRequest, features::kWebPayments},
{wf::EnableSecurePaymentConfirmationDebug, {wf::EnableSecurePaymentConfirmationDebug,
features::kSecurePaymentConfirmationDebug, kDefault}, features::kSecurePaymentConfirmationDebug},
{wf::EnablePaymentHandlerMinimalUI, features::kWebPaymentsMinimalUI, {wf::EnablePaymentHandlerMinimalUI, features::kWebPaymentsMinimalUI},
kEnableOnly}, {wf::EnablePaymentApp, features::kServiceWorkerPaymentApps},
{wf::EnablePaymentApp, features::kServiceWorkerPaymentApps, kEnableOnly},
{wf::EnablePushSubscriptionChangeEvent, {wf::EnablePushSubscriptionChangeEvent,
features::kPushSubscriptionChangeEvent, kEnableOnly}, features::kPushSubscriptionChangeEvent},
{wf::EnableGenericSensorExtraClasses, features::kGenericSensorExtraClasses, {wf::EnableGenericSensorExtraClasses, features::kGenericSensorExtraClasses},
kEnableOnly}, {wf::EnableMediaCastOverlayButton, media::kMediaCastOverlayButton},
{wf::EnableMediaCastOverlayButton, media::kMediaCastOverlayButton,
kDefault},
{wf::EnableLazyInitializeMediaControls, {wf::EnableLazyInitializeMediaControls,
features::kLazyInitializeMediaControls, kDefault}, features::kLazyInitializeMediaControls},
{wf::EnableMediaEngagementBypassAutoplayPolicies, {wf::EnableMediaEngagementBypassAutoplayPolicies,
media::kMediaEngagementBypassAutoplayPolicies, kDefault}, media::kMediaEngagementBypassAutoplayPolicies},
{wf::EnableOverflowIconsForMediaControls, {wf::EnableOverflowIconsForMediaControls,
media::kOverflowIconsForMediaControls, kDefault}, media::kOverflowIconsForMediaControls},
{wf::EnableAllowActivationDelegationAttr, {wf::EnableAllowActivationDelegationAttr,
features::kAllowActivationDelegationAttr, kDefault}, features::kAllowActivationDelegationAttr},
{wf::EnableLazyFrameLoading, features::kLazyFrameLoading, kDefault}, {wf::EnableLazyFrameLoading, features::kLazyFrameLoading},
{wf::EnableLazyFrameVisibleLoadTimeMetrics, {wf::EnableLazyFrameVisibleLoadTimeMetrics,
features::kLazyFrameVisibleLoadTimeMetrics, kDefault}, features::kLazyFrameVisibleLoadTimeMetrics},
{wf::EnableLazyImageLoading, features::kLazyImageLoading, kDefault}, {wf::EnableLazyImageLoading, features::kLazyImageLoading},
{wf::EnableLazyImageVisibleLoadTimeMetrics, {wf::EnableLazyImageVisibleLoadTimeMetrics,
features::kLazyImageVisibleLoadTimeMetrics, kDefault}, features::kLazyImageVisibleLoadTimeMetrics},
{wf::EnablePictureInPicture, media::kPictureInPicture, kDefault}, {wf::EnablePictureInPicture, media::kPictureInPicture},
{wf::EnableCacheInlineScriptCode, features::kCacheInlineScriptCode, {wf::EnableCacheInlineScriptCode, features::kCacheInlineScriptCode},
kDefault},
{wf::EnableExperimentalProductivityFeatures, {wf::EnableExperimentalProductivityFeatures,
features::kExperimentalProductivityFeatures, kEnableOnly}, features::kExperimentalProductivityFeatures},
{wf::EnableFeaturePolicyForSandbox, features::kFeaturePolicyForSandbox, {wf::EnableFeaturePolicyForSandbox, features::kFeaturePolicyForSandbox},
kEnableOnly},
{wf::EnableAccessibilityExposeARIAAnnotations, {wf::EnableAccessibilityExposeARIAAnnotations,
features::kEnableAccessibilityExposeARIAAnnotations, kEnableOnly}, features::kEnableAccessibilityExposeARIAAnnotations},
{wf::EnableAccessibilityExposeDisplayNone, {wf::EnableAccessibilityExposeDisplayNone,
features::kEnableAccessibilityExposeDisplayNone, kEnableOnly}, features::kEnableAccessibilityExposeDisplayNone},
{wf::EnableAccessibilityExposeHTMLElement, {wf::EnableAccessibilityExposeHTMLElement,
features::kEnableAccessibilityExposeHTMLElement, kDefault}, features::kEnableAccessibilityExposeHTMLElement},
{wf::EnableAllowSyncXHRInPageDismissal, {wf::EnableAllowSyncXHRInPageDismissal,
blink::features::kAllowSyncXHRInPageDismissal, kEnableOnly}, blink::features::kAllowSyncXHRInPageDismissal},
{wf::EnableAutoplayIgnoresWebAudio, media::kAutoplayIgnoreWebAudio, {wf::EnableAutoplayIgnoresWebAudio, media::kAutoplayIgnoreWebAudio},
kDefault}, {wf::EnablePortals, blink::features::kPortals, kSetOnlyIfOverridden},
{wf::EnablePortals, blink::features::kPortals, {wf::EnableImplicitRootScroller, blink::features::kImplicitRootScroller},
kEnableOnlyIfOverriddenFromCommandLine},
{wf::EnableImplicitRootScroller, blink::features::kImplicitRootScroller,
kDefault},
{wf::EnableCSSOMViewScrollCoordinates, {wf::EnableCSSOMViewScrollCoordinates,
blink::features::kCSSOMViewScrollCoordinates, kEnableOnly}, blink::features::kCSSOMViewScrollCoordinates},
{wf::EnableTextFragmentAnchor, blink::features::kTextFragmentAnchor, {wf::EnableTextFragmentAnchor, blink::features::kTextFragmentAnchor},
kDefault}, {wf::EnableBackgroundFetch, features::kBackgroundFetch},
{wf::EnableBackgroundFetch, features::kBackgroundFetch, kDisableOnly}, {wf::EnableForcedColors, features::kForcedColors},
{wf::EnableForcedColors, features::kForcedColors, kDefault}, {wf::EnableFractionalScrollOffsets, features::kFractionalScrollOffsets},
{wf::EnableFractionalScrollOffsets, features::kFractionalScrollOffsets, {wf::EnableGetDisplayMedia, blink::features::kRTCGetDisplayMedia},
kDefault},
{wf::EnableGetDisplayMedia, blink::features::kRTCGetDisplayMedia, kDefault},
{wf::EnableSignedExchangePrefetchCacheForNavigations, {wf::EnableSignedExchangePrefetchCacheForNavigations,
features::kSignedExchangePrefetchCacheForNavigations, kDefault}, features::kSignedExchangePrefetchCacheForNavigations},
{wf::EnableSignedExchangeSubresourcePrefetch, {wf::EnableSignedExchangeSubresourcePrefetch,
features::kSignedExchangeSubresourcePrefetch, kDefault}, features::kSignedExchangeSubresourcePrefetch},
{wf::EnableIdleDetection, features::kIdleDetection, kDisableOnly}, {wf::EnableIdleDetection, features::kIdleDetection, kSetOnlyIfOverridden},
{wf::EnableSkipTouchEventFilter, blink::features::kSkipTouchEventFilter, {wf::EnableSkipTouchEventFilter, blink::features::kSkipTouchEventFilter},
kDefault}, {wf::EnableSmsReceiver, features::kSmsReceiver, kSetOnlyIfOverridden},
{wf::EnableSmsReceiver, features::kSmsReceiver, kDisableOnly}, {wf::EnableClickPointerEvent, features::kClickPointerEvent},
{wf::EnableClickPointerEvent, features::kClickPointerEvent, kEnableOnly}, {wf::EnableConsolidatedMovementXY, features::kConsolidatedMovementXY},
{wf::EnableConsolidatedMovementXY, features::kConsolidatedMovementXY, {wf::EnableCooperativeScheduling, features::kCooperativeScheduling},
kDefault},
{wf::EnableCooperativeScheduling, features::kCooperativeScheduling,
kDefault},
{wf::EnableMouseSubframeNoImplicitCapture, {wf::EnableMouseSubframeNoImplicitCapture,
features::kMouseSubframeNoImplicitCapture, kDefault}, features::kMouseSubframeNoImplicitCapture},
{wf::EnableSubresourceWebBundles, features::kSubresourceWebBundles, {wf::EnableSubresourceWebBundles, features::kSubresourceWebBundles},
kDefault}, {wf::EnableCookieDeprecationMessages, features::kCookieDeprecationMessages},
{wf::EnableCookieDeprecationMessages, features::kCookieDeprecationMessages,
kEnableOnly},
{wf::EnableSameSiteByDefaultCookies, {wf::EnableSameSiteByDefaultCookies,
net::features::kSameSiteByDefaultCookies, kEnableOnly}, net::features::kSameSiteByDefaultCookies},
{wf::EnableCookiesWithoutSameSiteMustBeSecure, {wf::EnableCookiesWithoutSameSiteMustBeSecure,
net::features::kCookiesWithoutSameSiteMustBeSecure, kEnableOnly}, net::features::kCookiesWithoutSameSiteMustBeSecure},
{wf::EnablePointerLockOptions, features::kPointerLockOptions, kEnableOnly}, {wf::EnablePointerLockOptions, features::kPointerLockOptions},
{wf::EnableDocumentPolicy, features::kDocumentPolicy, kDefault}, {wf::EnableDocumentPolicy, features::kDocumentPolicy},
{wf::EnableDocumentPolicyNegotiation, features::kDocumentPolicyNegotiation, {wf::EnableDocumentPolicyNegotiation, features::kDocumentPolicyNegotiation},
kDefault}, {wf::EnableScrollUnification, features::kScrollUnification},
{wf::EnableScrollUnification, features::kScrollUnification, kDefault}, {wf::EnableNeverSlowMode, features::kNeverSlowMode},
{wf::EnableNeverSlowMode, features::kNeverSlowMode, kDefault}, {wf::EnableShadowDOMV0, blink::features::kWebComponentsV0},
{wf::EnableShadowDOMV0, blink::features::kWebComponentsV0, kDefault}, {wf::EnableCustomElementsV0, blink::features::kWebComponentsV0},
{wf::EnableCustomElementsV0, blink::features::kWebComponentsV0, kDefault}, {wf::EnableHTMLImports, blink::features::kWebComponentsV0},
{wf::EnableHTMLImports, blink::features::kWebComponentsV0, kDefault}, {wf::EnableVideoPlaybackQuality, features::kVideoPlaybackQuality},
{wf::EnableVideoPlaybackQuality, features::kVideoPlaybackQuality, kDefault},
{wf::EnableBrowserVerifiedUserActivationKeyboard, {wf::EnableBrowserVerifiedUserActivationKeyboard,
features::kBrowserVerifiedUserActivationKeyboard, kEnableOnly}, features::kBrowserVerifiedUserActivationKeyboard},
{wf::EnableBrowserVerifiedUserActivationMouse, {wf::EnableBrowserVerifiedUserActivationMouse,
features::kBrowserVerifiedUserActivationMouse, kEnableOnly}, features::kBrowserVerifiedUserActivationMouse},
{wf::EnablePercentBasedScrolling, features::kPercentBasedScrolling, {wf::EnablePercentBasedScrolling, features::kPercentBasedScrolling},
kDefault},
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
{wf::EnableWebNfc, features::kWebNfc, kDisableOnly}, {wf::EnableWebNfc, features::kWebNfc, kSetOnlyIfOverridden},
#endif #endif
{wf::EnableInstalledApp, features::kInstalledApp, kDisableOnly}, {wf::EnableInstalledApp, features::kInstalledApp},
{wf::EnableWebAuthenticationGetAssertionFeaturePolicy, {wf::EnableWebAuthenticationGetAssertionFeaturePolicy,
device::kWebAuthGetAssertionFeaturePolicy, kDefault}, device::kWebAuthGetAssertionFeaturePolicy},
{wf::EnableTransformInterop, blink::features::kTransformInterop, kDefault}, {wf::EnableTransformInterop, blink::features::kTransformInterop},
{wf::EnableVideoWakeLockOptimisationHiddenMuted, {wf::EnableVideoWakeLockOptimisationHiddenMuted,
media::kWakeLockOptimisationHiddenMuted, kDefault}, media::kWakeLockOptimisationHiddenMuted},
{wf::EnableMediaFeeds, media::kMediaFeeds, kDefault}, {wf::EnableMediaFeeds, media::kMediaFeeds},
{wf::EnableRestrictGamepadAccess, features::kRestrictGamepadAccess, {wf::EnableRestrictGamepadAccess, features::kRestrictGamepadAccess},
kEnableOnly},
{wf::EnableCompositingOptimizations, {wf::EnableCompositingOptimizations,
blink::features::kCompositingOptimizations, kDefault}, blink::features::kCompositingOptimizations},
{wf::EnableConversionMeasurementInfraSupport, {wf::EnableConversionMeasurementInfraSupport,
features::kConversionMeasurement, kDefault}, features::kConversionMeasurement},
}; };
for (const auto& mapping : blinkFeatureToBaseFeatureMapping) { for (const auto& mapping : blinkFeatureToBaseFeatureMapping) {
SetRuntimeFeatureFromChromiumFeature( SetRuntimeFeatureFromChromiumFeature(
...@@ -354,63 +328,57 @@ void SetRuntimeFeaturesFromChromiumFeatures() { ...@@ -354,63 +328,57 @@ void SetRuntimeFeaturesFromChromiumFeatures() {
// function and using feature string name with EnableFeatureFromString. // function and using feature string name with EnableFeatureFromString.
const RuntimeFeatureToChromiumFeatureMap<const char*> const RuntimeFeatureToChromiumFeatureMap<const char*>
runtimeFeatureNameToChromiumFeatureMapping[] = { runtimeFeatureNameToChromiumFeatureMapping[] = {
{"AddressSpace", features::kBlockInsecurePrivateNetworkRequests, {"AddressSpace", features::kBlockInsecurePrivateNetworkRequests},
kEnableOnly},
{"AllowContentInitiatedDataUrlNavigations", {"AllowContentInitiatedDataUrlNavigations",
features::kAllowContentInitiatedDataUrlNavigations, kDefault}, features::kAllowContentInitiatedDataUrlNavigations},
{"AndroidDownloadableFontsMatching", {"AndroidDownloadableFontsMatching",
features::kAndroidDownloadableFontsMatching, kDefault}, features::kAndroidDownloadableFontsMatching},
{"AudioWorkletRealtimeThread", {"AudioWorkletRealtimeThread",
blink::features::kAudioWorkletRealtimeThread, kEnableOnly}, blink::features::kAudioWorkletRealtimeThread},
{"BlockCredentialedSubresources", {"BlockCredentialedSubresources",
features::kBlockCredentialedSubresources, kDisableOnly}, features::kBlockCredentialedSubresources},
{"BlockHTMLParserOnStyleSheets", {"BlockHTMLParserOnStyleSheets",
blink::features::kBlockHTMLParserOnStyleSheets, kDefault}, blink::features::kBlockHTMLParserOnStyleSheets},
{"CSSColorSchemeUARendering", features::kCSSColorSchemeUARendering, {"CSSColorSchemeUARendering", features::kCSSColorSchemeUARendering},
kDefault},
{"CSSReducedFontLoadingInvalidations", {"CSSReducedFontLoadingInvalidations",
blink::features::kCSSReducedFontLoadingInvalidations, kDefault}, blink::features::kCSSReducedFontLoadingInvalidations},
{"CSSReducedFontLoadingLayoutInvalidations", {"CSSReducedFontLoadingLayoutInvalidations",
blink::features::kCSSReducedFontLoadingLayoutInvalidations, blink::features::kCSSReducedFontLoadingLayoutInvalidations},
kDefault},
{"CSSMatchedPropertiesCacheDependencies", {"CSSMatchedPropertiesCacheDependencies",
blink::features::kCSSMatchedPropertiesCacheDependencies, kDefault}, blink::features::kCSSMatchedPropertiesCacheDependencies},
{"CustomElementsV0", blink::features::kWebComponentsV0, kDefault}, {"CustomElementsV0", blink::features::kWebComponentsV0},
{"FeaturePolicyForClientHints", {"FeaturePolicyForClientHints",
features::kFeaturePolicyForClientHints, kDefault}, features::kFeaturePolicyForClientHints},
{"EditingNG", blink::features::kEditingNG, kDefault}, {"EditingNG", blink::features::kEditingNG},
{"FontAccess", blink::features::kFontAccess, kDefault}, {"FontAccess", blink::features::kFontAccess},
{"FontSrcLocalMatching", features::kFontSrcLocalMatching, kDefault}, {"FontSrcLocalMatching", features::kFontSrcLocalMatching},
{"ForceSynchronousHTMLParsing", {"ForceSynchronousHTMLParsing",
blink::features::kForceSynchronousHTMLParsing, kDefault}, blink::features::kForceSynchronousHTMLParsing},
{"HTMLImports", blink::features::kWebComponentsV0, kDefault}, {"HTMLImports", blink::features::kWebComponentsV0},
{"IgnoreCrossOriginWindowWhenNamedAccessOnWindow", {"IgnoreCrossOriginWindowWhenNamedAccessOnWindow",
blink::features::kIgnoreCrossOriginWindowWhenNamedAccessOnWindow, blink::features::kIgnoreCrossOriginWindowWhenNamedAccessOnWindow},
kEnableOnly}, {"LangClientHintHeader", features::kLangClientHintHeader},
{"LangClientHintHeader", features::kLangClientHintHeader, kDefault}, {"LayoutNG", blink::features::kLayoutNG},
{"LayoutNG", blink::features::kLayoutNG, kDefault}, {"LayoutNGFieldset", blink::features::kLayoutNGFieldset},
{"LayoutNGFieldset", blink::features::kLayoutNGFieldset, kDefault}, {"LayoutNGFlexBox", blink::features::kFlexNG},
{"LayoutNGFlexBox", blink::features::kFlexNG, kDefault}, {"LayoutNGFragmentItem", blink::features::kFragmentItem},
{"LayoutNGFragmentItem", blink::features::kFragmentItem, kDefault}, {"LayoutNGRuby", blink::features::kLayoutNGRuby},
{"LayoutNGRuby", blink::features::kLayoutNGRuby, kDefault},
{"LegacyWindowsDWriteFontFallback", {"LegacyWindowsDWriteFontFallback",
features::kLegacyWindowsDWriteFontFallback, kDefault}, features::kLegacyWindowsDWriteFontFallback},
{"LinkDisabledNewSpecBehavior", {"LinkDisabledNewSpecBehavior",
blink::features::kLinkDisabledNewSpecBehavior, kDefault}, blink::features::kLinkDisabledNewSpecBehavior},
{"OriginPolicy", features::kOriginPolicy, kDefault}, {"OriginPolicy", features::kOriginPolicy},
{"OriginIsolationHeader", features::kOriginIsolationHeader, kDefault}, {"OriginIsolationHeader", features::kOriginIsolationHeader},
{"ParentNodeReplaceChildren", {"ParentNodeReplaceChildren",
blink::features::kParentNodeReplaceChildren, kDefault}, blink::features::kParentNodeReplaceChildren},
{"RawClipboard", blink::features::kRawClipboard, kEnableOnly}, {"RawClipboard", blink::features::kRawClipboard},
{"ShadowDOMV0", blink::features::kWebComponentsV0, kDefault}, {"ShadowDOMV0", blink::features::kWebComponentsV0},
{"StorageAccessAPI", blink::features::kStorageAccessAPI, kEnableOnly}, {"StorageAccessAPI", blink::features::kStorageAccessAPI},
{"TransferableStreams", blink::features::kTransferableStreams, {"TransferableStreams", blink::features::kTransferableStreams},
kEnableOnly}, {"TrustedDOMTypes", features::kTrustedDOMTypes},
{"TrustedDOMTypes", features::kTrustedDOMTypes, kEnableOnly}, {"UserAgentClientHint", features::kUserAgentClientHint},
{"UserAgentClientHint", features::kUserAgentClientHint, kDefault},
{"WebAppManifestDisplayOverride", {"WebAppManifestDisplayOverride",
features::kWebAppManifestDisplayOverride, kDefault}, features::kWebAppManifestDisplayOverride},
}; };
for (const auto& mapping : runtimeFeatureNameToChromiumFeatureMapping) { for (const auto& mapping : runtimeFeatureNameToChromiumFeatureMapping) {
SetRuntimeFeatureFromChromiumFeature( SetRuntimeFeatureFromChromiumFeature(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment