Closed Bug 1446861 Opened 6 years ago Closed 6 years ago

Remove more nsIDOMElement usages from editor

Categories

(Core :: DOM: Editor, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Except to table access and XPCOM method for c-c, we can remove more nsIDOMElement  usages.
Comment on attachment 8960071 [details]
Bug 1446861 - Remove more nsIDOMElement usages from editor.

https://reviewboard.mozilla.org/r/228850/#review234518

::: commit-message-0b997:3
(Diff revision 1)
> +Bug 1446861 - Remove more nsIDOMElement usages from editor. r?masayuki
> +
> +Except to table access and XPCOM methods for c-c, tests and etc, we can remove

s/Except to/Except ?

::: editor/libeditor/EditorEventListener.cpp:1105
(Diff revision 1)
>      // listener in the chain changed the focus.
>      if (editableRoot) {
> -      nsIFocusManager* fm = nsFocusManager::GetFocusManager();
> +      nsFocusManager* fm = nsFocusManager::GetFocusManager();
>        NS_ENSURE_TRUE(fm, NS_OK);
>  
> -      nsCOMPtr<nsIDOMElement> element;
> +      nsCOMPtr<nsIContent> focusedContent = fm->GetFocusedContent();

Looks like that this can be nsIContent* since FindFirstNonChromeOnlyAccessContent() is safe to call without grabbing it.
Attachment #8960071 - Flags: review?(masayuki) → review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/mozilla-inbound/rev/60d8158308b2
Remove more nsIDOMElement usages from editor. r=masayuki
https://hg.mozilla.org/mozilla-central/rev/60d8158308b2
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: