diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-05-22 18:38:33 -0400 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-08-07 21:29:36 +0000 |
commit | 2f022ab1faeb4703ecd9d7ca6b912bbe397531f6 (patch) | |
tree | da9ff096d8731c080b0a90f376b2a3745c6f0e49 /editor/libeditor/TextEditor.cpp | |
parent | 14e7f881be45078115aade9b2e6ccf8091a70b1a (diff) | |
download | UXP-2f022ab1faeb4703ecd9d7ca6b912bbe397531f6.tar UXP-2f022ab1faeb4703ecd9d7ca6b912bbe397531f6.tar.gz UXP-2f022ab1faeb4703ecd9d7ca6b912bbe397531f6.tar.lz UXP-2f022ab1faeb4703ecd9d7ca6b912bbe397531f6.tar.xz UXP-2f022ab1faeb4703ecd9d7ca6b912bbe397531f6.zip |
Issue #1621 - Part 3: Use nsIAtom to change attirbute if possible.
We can replace old nsIEditor API with nsIAtom version.
Ref: Bug 1324996
Diffstat (limited to 'editor/libeditor/TextEditor.cpp')
-rw-r--r-- | editor/libeditor/TextEditor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/libeditor/TextEditor.cpp b/editor/libeditor/TextEditor.cpp index 7eb91af64..d7284c4c2 100644 --- a/editor/libeditor/TextEditor.cpp +++ b/editor/libeditor/TextEditor.cpp @@ -310,9 +310,9 @@ TextEditor::UpdateMetaCharset(nsIDOMDocument* aDocument, } // set attribute to <original prefix> charset=text/html - nsCOMPtr<nsIDOMElement> metaElement = do_QueryInterface(metaNode); + RefPtr<Element> metaElement = metaNode->AsElement(); MOZ_ASSERT(metaElement); - rv = EditorBase::SetAttribute(metaElement, NS_LITERAL_STRING("content"), + rv = EditorBase::SetAttribute(metaElement, nsGkAtoms::content, Substring(originalStart, start) + charsetEquals + NS_ConvertASCIItoUTF16(aCharacterSet)); |