mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 02fbb6ada9cb (bug 967494) for build bustage on a CLOSED TREE
This commit is contained in:
parent
5863949c0c
commit
c1678608c7
@ -738,33 +738,27 @@ nsEditorSpellCheck::DictionaryFetched(DictionaryFetcher* aFetcher)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
mPreferredLang.Assign(aFetcher->mRootContentLang);
|
||||
|
||||
// If we successfully fetched a dictionary from content prefs, do not go
|
||||
// further. Use this exact dictionary.
|
||||
nsAutoString dictName;
|
||||
uint32_t flags;
|
||||
mEditor->GetFlags(&flags);
|
||||
// Don't use the content pref when writing mail
|
||||
if (!(flags & nsIPlaintextEditor::eEditorMailMask)) {
|
||||
mPreferredLang.Assign(aFetcher->mRootContentLang);
|
||||
|
||||
// If we successfully fetched a dictionary from content prefs, do not go
|
||||
// further. Use this exact dictionary.
|
||||
nsAutoString dictName;
|
||||
dictName.Assign(aFetcher->mDictionary);
|
||||
if (!dictName.IsEmpty()) {
|
||||
if (NS_FAILED(SetCurrentDictionary(dictName))) {
|
||||
// may be dictionary was uninstalled ?
|
||||
ClearCurrentDictionary(mEditor);
|
||||
}
|
||||
return NS_OK;
|
||||
dictName.Assign(aFetcher->mDictionary);
|
||||
if (!dictName.IsEmpty()) {
|
||||
if (NS_FAILED(SetCurrentDictionary(dictName))) {
|
||||
// may be dictionary was uninstalled ?
|
||||
ClearCurrentDictionary(mEditor);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (mPreferredLang.IsEmpty()) {
|
||||
mPreferredLang.Assign(aFetcher->mRootDocContentLang);
|
||||
}
|
||||
if (mPreferredLang.IsEmpty()) {
|
||||
mPreferredLang.Assign(aFetcher->mRootDocContentLang);
|
||||
}
|
||||
|
||||
// Then, try to use language computed from element
|
||||
if (!mPreferredLang.IsEmpty()) {
|
||||
dictName.Assign(mPreferredLang);
|
||||
}
|
||||
// Then, try to use language computed from element
|
||||
if (!mPreferredLang.IsEmpty()) {
|
||||
dictName.Assign(mPreferredLang);
|
||||
}
|
||||
|
||||
// otherwise, get language from preferences
|
||||
|
@ -295,11 +295,6 @@ InlineSpellChecker.prototype = {
|
||||
var spellchecker = this.mInlineSpellChecker.spellChecker;
|
||||
spellchecker.SetCurrentDictionary(this.mDictionaryNames[index]);
|
||||
this.mInlineSpellChecker.spellCheckRange(null); // causes recheck
|
||||
// Save chosen dictionary to preferences only when writing mail
|
||||
if (this.mEditor.flags & this.mEditor.eEditorMailMask) {
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Services.prefs.setCharPref("spellchecker.dictionary", this.mDictionaryNames[index]);
|
||||
}
|
||||
},
|
||||
|
||||
// callback for selecting a suggesteed replacement
|
||||
|
Loading…
Reference in New Issue
Block a user