Closed Bug 1332984 Opened 7 years ago Closed 7 years ago

Clean up usage of nsIDOMCharacterData into editor

Categories

(Core :: DOM: Editor, defect, P3)

Unspecified
All
defect

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox53 --- affected
firefox54 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

Details

Attachments

(1 file)

It is unnecessary to use nsIDOMCharacterData if getting text content of text node.  So we should clean up the  usage of nsIDOMCharacterData into editor.
Comment on attachment 8829319 [details]
Bug 1332984 - Clean up usage of nsIDOMCharacterData into editor.

https://reviewboard.mozilla.org/r/106436/#review107742

::: editor/libeditor/TextEditor.cpp:504
(Diff revision 1)
>    }
>  
> -  *outBRNode = brNode;
> +  *outBRNode = GetAsDOMNode(brNode);
>    if (*outBRNode && (aSelect != eNone)) {
>      int32_t offset;
> -    nsCOMPtr<nsIDOMNode> parent = GetNodeLocation(*outBRNode, &offset);
> +    nsCOMPtr<nsINode> parent = GetNodeLocation(brNode, &offset);

Although, not a scope of this bug, I wonder, GetNodeLocation() can use EditorDOMPoint as its result.
Attachment #8829319 - Flags: review?(masayuki) → review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/6d8d5b5d1aa6
Clean up usage of nsIDOMCharacterData into editor. r=masayuki
https://hg.mozilla.org/mozilla-central/rev/6d8d5b5d1aa6
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: