Issue #1621 - Part 3: Use nsIAtom to change attirbute if possible.

We can replace old nsIEditor API with nsIAtom version.

Ref: Bug 1324996
This commit is contained in:
Gaming4JC 2020-05-22 18:38:33 -04:00 committed by Roy Tam
commit ec1301a85d
7 changed files with 51 additions and 64 deletions

View file

@ -1422,9 +1422,9 @@ TextEditRules::CreateMozBR(nsIDOMNode* inParent,
NS_ENSURE_SUCCESS(rv, rv);
// give it special moz attr
nsCOMPtr<nsIDOMElement> brElem = do_QueryInterface(brNode);
nsCOMPtr<Element> brElem = do_QueryInterface(brNode);
if (brElem) {
rv = mTextEditor->SetAttribute(brElem, NS_LITERAL_STRING("type"),
rv = mTextEditor->SetAttribute(brElem, nsGkAtoms::type,
NS_LITERAL_STRING("_moz"));
NS_ENSURE_SUCCESS(rv, rv);
}