mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
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:
parent
b6b2792a35
commit
ec1301a85d
7 changed files with 51 additions and 64 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue