Hello,

The fix of bug 1906015 <https://bugzilla.mozilla.org/show_bug.cgi?id=1906015> introduced `|nsIFormControl::FromNode|`, `|nsIFormControl::FromNodeOrNull|`, `|nsIFormControl::FromEventTarget|` and `|nsIFormControl::FromEventTargetOrNull|`. Therefore, you don't need to do like this:

const nsCOMPtr<nsIFormControl> formControl = 
do_QueryInterface(aNode->GetFirstChild());

Instead, you can do:

nsIFormControl* const formControl = 
nsIFormControl::FromNodeOrNull(aNode->GetFirstChild());

The utilities are faster and make you free from using strong pointer.

--
Masayuki Nakano<[email protected]>
Working on DOM, Events, editor and IME handling for Gecko

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/6d94d0c8-b8c0-4ae3-88fc-96f82ca43ec7%40d-toybox.com.

Reply via email to