Bug 1570719 - Skip more elements in spellcheck for MailNews. r=masayuki

This commit is contained in:
Jorg K 2019-08-02 10:49:17 +02:00
Родитель 17c764ce35
Коммит 864c351bc8
2 изменённых файлов: 9 добавлений и 2 удалений

Просмотреть файл

@ -1058,12 +1058,18 @@ bool mozInlineSpellChecker::ShouldSpellCheckNode(TextEditor* aTextEditor,
nsGkAtoms::cite, eIgnoreCase)) {
return false;
}
if (parent->IsHTMLElement(nsGkAtoms::pre) &&
if (parent->IsAnyOfHTMLElements(nsGkAtoms::pre, nsGkAtoms::div) &&
parent->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::_class,
nsGkAtoms::mozsignature,
eIgnoreCase)) {
return false;
}
if (parent->IsHTMLElement(nsGkAtoms::div) &&
parent->AsElement()->AttrValueIs(kNameSpaceID_None, nsGkAtoms::_class,
nsGkAtoms::mozfwcontainer,
eIgnoreCase)) {
return false;
}
parent = parent->GetParent();
}

Просмотреть файл

@ -42,12 +42,13 @@ STATIC_ATOMS = [
Atom("mozdirty", "_moz_dirty"),
Atom("mozdisallowselectionprint", "mozdisallowselectionprint"),
Atom("mozdonotsend", "moz-do-not-send"),
Atom("mozfwcontainer", "moz-forward-container"), # Used by MailNews.
Atom("mozgeneratedcontentbefore", "_moz_generated_content_before"),
Atom("mozgeneratedcontentafter", "_moz_generated_content_after"),
Atom("mozgeneratedcontentmarker", "_moz_generated_content_marker"),
Atom("mozgeneratedcontentimage", "_moz_generated_content_image"),
Atom("mozquote", "_moz_quote"),
Atom("mozsignature", "moz-signature"),
Atom("mozsignature", "moz-signature"), # Used by MailNews.
Atom("_moz_is_glyph", "-moz-is-glyph"),
Atom("_moz_original_size", "_moz_original_size"),
Atom("menuactive", "_moz-menuactive"),