Browse Source

chore: disable default async spellchecker on Windows (#29706)

* chore: disable default async spellchecker on Windows

* chore: disable kWinRetrieveSuggestionsOnlyOnDemand in feature list

* chore: remove incorrectly backported patches

Co-authored-by: VerteDinde <[email protected]>
Co-authored-by: VerteDinde <[email protected]>
Co-authored-by: Keeley Hammond <[email protected]>
trop[bot] 3 years ago
parent
commit
2ef55e1e9e
1 changed files with 8 additions and 0 deletions
  1. 8 0
      shell/browser/feature_list.cc

+ 8 - 0
shell/browser/feature_list.cc

@@ -10,6 +10,7 @@
 #include "base/command_line.h"
 #include "base/feature_list.h"
 #include "base/metrics/field_trial.h"
+#include "components/spellcheck/common/spellcheck_features.h"
 #include "content/public/common/content_features.h"
 #include "electron/buildflags/buildflags.h"
 #include "media/base/media_switches.h"
@@ -41,6 +42,13 @@ void InitializeFeatureList() {
 #if !BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
   disable_features += std::string(",") + media::kPictureInPicture.name;
 #endif
+
+#if defined(OS_WIN)
+  // Disable async spellchecker suggestions for Windows, which causes
+  // an empty suggestions list to be returned
+  disable_features +=
+      std::string(",") + spellcheck::kWinRetrieveSuggestionsOnlyOnDemand.name;
+#endif
   base::FeatureList::InitializeInstance(enable_features, disable_features);
 }