diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-10 16:19:40 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-10 16:01:50 +0000 |
commit | 51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch) | |
tree | 835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/content/child/runtime_features.cc | |
parent | 6036726eb981b6c4b42047513b9d3f4ac865daac (diff) | |
download | qtwebengine-chromium-51f6c2793adab2d864b3d2b360000ef8db1d3e92.tar.gz |
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/content/child/runtime_features.cc')
-rw-r--r-- | chromium/content/child/runtime_features.cc | 62 |
1 files changed, 30 insertions, 32 deletions
diff --git a/chromium/content/child/runtime_features.cc b/chromium/content/child/runtime_features.cc index 1221dc2adfc..7eecb0391ee 100644 --- a/chromium/content/child/runtime_features.cc +++ b/chromium/content/child/runtime_features.cc @@ -17,10 +17,12 @@ #include "content/public/common/content_switches.h" #include "gpu/config/gpu_switches.h" #include "media/base/media_switches.h" +#include "net/base/features.h" #include "services/device/public/cpp/device_features.h" #include "services/network/public/cpp/features.h" #include "third_party/blink/public/common/features.h" #include "third_party/blink/public/platform/web_runtime_features.h" +#include "ui/events/blink/blink_features.h" #include "ui/gfx/switches.h" #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" @@ -134,9 +136,6 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( if (!base::FeatureList::IsEnabled(features::kNotificationContentImage)) WebRuntimeFeatures::EnableNotificationContentImage(false); - WebRuntimeFeatures::EnableWebAssemblyStreaming( - base::FeatureList::IsEnabled(features::kWebAssemblyStreaming)); - WebRuntimeFeatures::EnableSharedArrayBuffer( base::FeatureList::IsEnabled(features::kSharedArrayBuffer) || base::FeatureList::IsEnabled(features::kWebAssemblyThreads)); @@ -174,11 +173,6 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( !command_line.HasSwitch(switches::kDisable2dCanvasImageChromium) && !command_line.HasSwitch(switches::kDisableGpu) && base::FeatureList::IsEnabled(features::kCanvas2DImageChromium); -#elif defined(OS_CHROMEOS) - const bool enable_canvas_2d_image_chromium = - !command_line.HasSwitch(switches::kDisable2dCanvasImageChromium) && - !command_line.HasSwitch(switches::kDisableGpu) && - base::FeatureList::IsEnabled(features::kCanvas2DImageChromium); #else constexpr bool enable_canvas_2d_image_chromium = false; #endif @@ -186,17 +180,14 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( enable_canvas_2d_image_chromium); #if defined(OS_MACOSX) - bool enable_web_gl_image_chromium = command_line.HasSwitch( - switches::kEnableGpuMemoryBufferCompositorResources) && + const bool enable_web_gl_image_chromium = + command_line.HasSwitch( + switches::kEnableGpuMemoryBufferCompositorResources) && !command_line.HasSwitch(switches::kDisableWebGLImageChromium) && - !command_line.HasSwitch(switches::kDisableGpu); - - if (enable_web_gl_image_chromium) { - enable_web_gl_image_chromium = - base::FeatureList::IsEnabled(features::kWebGLImageChromium); - } + !command_line.HasSwitch(switches::kDisableGpu) && + base::FeatureList::IsEnabled(features::kWebGLImageChromium); #else - bool enable_web_gl_image_chromium = + const bool enable_web_gl_image_chromium = command_line.HasSwitch(switches::kEnableWebGLImageChromium); #endif WebRuntimeFeatures::EnableWebGLImageChromium(enable_web_gl_image_chromium); @@ -267,9 +258,6 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) WebRuntimeFeatures::EnableSlimmingPaintV2(true); - if (base::FeatureList::IsEnabled(features::kLazyParseCSS)) - WebRuntimeFeatures::EnableLazyParseCSS(true); - WebRuntimeFeatures::EnablePassiveDocumentEventListeners( base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)); @@ -380,6 +368,10 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( WebRuntimeFeatures::EnableWebAuth( base::FeatureList::IsEnabled(features::kWebAuth)); + WebRuntimeFeatures::EnableWebAuthGetTransports( + base::FeatureList::IsEnabled(features::kWebAuthGetTransports) || + enableExperimentalWebPlatformFeatures); + WebRuntimeFeatures::EnableClientPlaceholdersForServerLoFi( base::GetFieldTrialParamValue("PreviewsClientLoFi", "replace_server_placeholders") != "false"); @@ -400,12 +392,6 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( base::FeatureList::IsEnabled( media::kMediaEngagementBypassAutoplayPolicies)); - WebRuntimeFeatures::EnableModuleScriptsDynamicImport( - base::FeatureList::IsEnabled(features::kModuleScriptsDynamicImport)); - - WebRuntimeFeatures::EnableModuleScriptsImportMetaUrl( - base::FeatureList::IsEnabled(features::kModuleScriptsImportMetaUrl)); - WebRuntimeFeatures::EnableOverflowIconsForMediaControls( base::FeatureList::IsEnabled(media::kOverflowIconsForMediaControls)); @@ -446,7 +432,7 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( base::FeatureList::IsEnabled(features::kCacheInlineScriptCode)); WebRuntimeFeatures::EnableIsolatedCodeCache( - base::FeatureList::IsEnabled(features::kIsolatedCodeCache)); + base::FeatureList::IsEnabled(net::features::kIsolatedCodeCache)); if (base::FeatureList::IsEnabled(features::kSignedHTTPExchange)) { WebRuntimeFeatures::EnableSignedHTTPExchange(true); @@ -476,6 +462,9 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( if (command_line.HasSwitch(switches::kEnableAccessibilityObjectModel)) WebRuntimeFeatures::EnableAccessibilityObjectModel(true); + if (base::FeatureList::IsEnabled(blink::features::kWritableFilesAPI)) + WebRuntimeFeatures::EnableFeatureFromString("WritableFiles", true); + // End individual features. // Do not add individual features below this line. @@ -492,10 +481,6 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( base::FeatureList::IsEnabled(media::kMediaControlsExpandGesture)); #endif - WebRuntimeFeatures::EnableFeatureFromString( - "WritableFiles", - base::FeatureList::IsEnabled(blink::features::kWritableFilesAPI)); - // Enable explicitly enabled features, and then disable explicitly disabled // ones. for (const std::string& feature : @@ -509,6 +494,19 @@ void SetRuntimeFeaturesDefaultsAndUpdateFromArgs( WebRuntimeFeatures::EnablePortals( base::FeatureList::IsEnabled(blink::features::kPortals)); -}; + + if (!base::FeatureList::IsEnabled(features::kBackgroundFetch)) + WebRuntimeFeatures::EnableBackgroundFetch(false); + + WebRuntimeFeatures::EnableNoHoverAfterLayoutChange( + base::FeatureList::IsEnabled(features::kNoHoverAfterLayoutChange)); + + WebRuntimeFeatures::EnableJankTracking( + base::FeatureList::IsEnabled(blink::features::kJankTracking) || + enableExperimentalWebPlatformFeatures); + + WebRuntimeFeatures::EnableNoHoverDuringScroll( + base::FeatureList::IsEnabled(features::kNoHoverDuringScroll)); +} } // namespace content |