summaryrefslogtreecommitdiff
path: root/chromium
diff options
context:
space:
mode:
authorSzabolcs David <davidsz@inf.u-szeged.hu>2022-08-12 11:44:19 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-11-09 11:48:24 +0100
commita3846a5119cd5344ad0949a7be53f22d8ebd8b8b (patch)
tree9914efb9a887c0b4804f5304da23dd307c0b7834 /chromium
parent4efce6863f717f9995fedb7c8cf23fda644d2bdf (diff)
downloadqtwebengine-chromium-a3846a5119cd5344ad0949a7be53f22d8ebd8b8b.tar.gz
Native spellchecker: Fix it when enabled
When native spellchecker enabled, the first spellcheck works on the first user interaction, then the SpellcheckService stucks in disabled state after its lazy initialization. It works when there are languages provided in WebEngineProfile. Make it independent from hunspell_dictionaries_ and rely only on the kSpellCheckEnable pref. Change-Id: Ia0788ae4716abf4d610f7bfc7f95970dd14d8785 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium')
-rw-r--r--chromium/chrome/browser/spellchecker/spellcheck_service.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chromium/chrome/browser/spellchecker/spellcheck_service.cc b/chromium/chrome/browser/spellchecker/spellcheck_service.cc
index 567f04f3b1c..971281cea28 100644
--- a/chromium/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chromium/chrome/browser/spellchecker/spellcheck_service.cc
@@ -513,6 +513,10 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
}
#endif // BUILDFLAG(IS_WIN)
+#if defined(TOOLKIT_QT) && BUILDFLAG(IS_MAC) && BUILDFLAG(USE_BROWSER_SPELLCHECKER)
+ enable_if_uninitialized = true;
+#endif
+
return prefs->GetBoolean(spellcheck::prefs::kSpellCheckEnable) &&
(!hunspell_dictionaries_.empty() || enable_if_uninitialized);
}