Closed Bug 1456879 Opened 6 years ago Closed 6 years ago

Clean up spell checker not to use nsIDOM* if possible

Categories

(Core :: Spelling checker, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

Details

Attachments

(1 file)

Without XPCOM and related method, I will remove dependencies of nsIDOM* from spellchecker.
Summary: Clean up spell checker not to nsIDOM* if possible → Clean up spell checker not to use nsIDOM* if possible
Attachment #8970903 - Attachment is obsolete: true
Attachment #8970903 - Flags: review?(masayuki)
Comment on attachment 8970903 [details]
Bug 1456879 - Clean up spellchecker not to use nsIDOM* if possible.

https://reviewboard.mozilla.org/r/239656/#review245574

::: extensions/spellcheck/src/mozInlineSpellChecker.cpp:1136
(Diff revision 2)
>    range.swap(*aRange);
>    return NS_OK;
>  }
>  
>  nsresult
> -mozInlineSpellChecker::SpellCheckBetweenNodes(nsIDOMNode *aStartNode,
> +mozInlineSpellChecker::SpellCheckBetweenNodes(nsINode *aStartNode,

nit: nsINode* aStartNode (position of *).

::: extensions/spellcheck/src/mozInlineSpellChecker.cpp:1138
(Diff revision 2)
>  }
>  
>  nsresult
> -mozInlineSpellChecker::SpellCheckBetweenNodes(nsIDOMNode *aStartNode,
> +mozInlineSpellChecker::SpellCheckBetweenNodes(nsINode *aStartNode,
>                                                int32_t aStartOffset,
> -                                              nsIDOMNode *aEndNode,
> +                                              nsINode *aEndNode,

ditto.

::: extensions/spellcheck/src/mozInlineSpellWordUtil.cpp:246
(Diff revision 2)
> -mozInlineSpellWordUtil::GetRangeForWord(nsIDOMNode* aWordNode,
> +mozInlineSpellWordUtil::GetRangeForWord(nsINode* aWordNode,
>                                          int32_t aWordOffset,
>                                          nsRange** aRange)
>  {
>    // Set our soft end and start
> -  nsCOMPtr<nsINode> wordNode = do_QueryInterface(aWordNode);
> +  NodeOffset pt = NodeOffset(aWordNode, aWordOffset);

nit: NodeOffset pt(aWordNode, aWordOffset);
Attachment #8970903 - Flags: review?(masayuki) → review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c7a4c83d8d15
Clean up spellchecker not to use nsIDOM* if possible. r=masayuki
https://hg.mozilla.org/mozilla-central/rev/c7a4c83d8d15
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: