diff options
author | Gaming4JC <g4jc@hyperbola.info> | 2020-05-22 18:38:33 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@hyperbola.info> | 2020-07-31 15:59:58 -0400 |
commit | 1115c63bf788dad121f65cf465ebf73562b4d029 (patch) | |
tree | 11447919a62454e454c78db034baf5f053f23532 /editor/libeditor/TextEditor.cpp | |
parent | 1c0c7cf583e6adda168cf59cad3aad3e38e7c058 (diff) | |
download | uxp-1115c63bf788dad121f65cf465ebf73562b4d029.tar.gz |
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 545e3a3d17..3bee7843ce 100644 --- a/editor/libeditor/TextEditor.cpp +++ b/editor/libeditor/TextEditor.cpp @@ -311,9 +311,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)); |