summaryrefslogtreecommitdiff
path: root/chromium/ui/base/ui_base_features.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/ui/base/ui_base_features.cc
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/base/ui_base_features.cc')
-rw-r--r--chromium/ui/base/ui_base_features.cc44
1 files changed, 39 insertions, 5 deletions
diff --git a/chromium/ui/base/ui_base_features.cc b/chromium/ui/base/ui_base_features.cc
index 7050729f302..3a6ee833e13 100644
--- a/chromium/ui/base/ui_base_features.cc
+++ b/chromium/ui/base/ui_base_features.cc
@@ -161,6 +161,18 @@ bool IsEyeDropperEnabled() {
base::FeatureList::IsEnabled(features::kEyeDropper);
}
+// Enable the CSSColorSchemeUARendering feature for Windows, ChromeOS, Linux,
+// and Mac. This feature will be released for Android in later milestones. See
+// crbug.com/1086530 for the Desktop launch bug.
+const base::Feature kCSSColorSchemeUARendering = {
+ "CSSColorSchemeUARendering", base::FEATURE_DISABLED_BY_DEFAULT};
+
+bool IsCSSColorSchemeUARenderingEnabled() {
+ static const bool css_color_scheme_ua_rendering_enabled =
+ base::FeatureList::IsEnabled(features::kCSSColorSchemeUARendering);
+ return css_color_scheme_ua_rendering_enabled;
+}
+
// Enable the FormControlsRefresh feature for Windows, ChromeOS, Linux, and Mac.
// This feature will be released for Android in later milestones. See
// crbug.com/1012106 for the Windows launch bug, and crbug.com/1012108 for the
@@ -188,13 +200,9 @@ bool IsUseCommonSelectPopupEnabled() {
return base::FeatureList::IsEnabled(features::kUseCommonSelectPopup);
}
-// Enable WebUI accessibility enhancements for review and testing.
-const base::Feature kWebUIA11yEnhancements{"WebUIA11yEnhancements",
- base::FEATURE_DISABLED_BY_DEFAULT};
-
#if defined(OS_CHROMEOS)
const base::Feature kHandwritingGesture = {"HandwritingGesture",
- base::FEATURE_DISABLED_BY_DEFAULT};
+ base::FEATURE_ENABLED_BY_DEFAULT};
#endif
const base::Feature kSynchronousPageFlipTesting{
@@ -204,4 +212,30 @@ bool IsSynchronousPageFlipTestingEnabled() {
return base::FeatureList::IsEnabled(kSynchronousPageFlipTesting);
}
+#if defined(USE_X11) || defined(USE_OZONE)
+const base::Feature kUseOzonePlatform {
+ "UseOzonePlatform",
+#if defined(USE_X11)
+ base::FEATURE_DISABLED_BY_DEFAULT
+};
+#else
+ base::FEATURE_ENABLED_BY_DEFAULT
+};
+#endif
+
+bool IsUsingOzonePlatform() {
+ // Only allow enabling and disabling the OzonePlatform on USE_X11 && USE_OZONE
+ // builds.
+#if defined(USE_X11) && defined(USE_OZONE)
+ return base::FeatureList::IsEnabled(kUseOzonePlatform);
+#elif defined(USE_X11) && !defined(USE_OZONE)
+ // This shouldn't be switchable for pure X11 builds.
+ return false;
+#else
+ // All the other platforms must use Ozone by default and can't disable that.
+ return true;
+#endif
+}
+#endif // defined(USE_X11) || defined(USE_OZONE)
+
} // namespace features