Bug 1843484 - Use EventTarget* instead of nsISupports* for the event target parameter of the nsContentUtils::Dispatch methods. r=smaug

This saves a few queryInterface calls on the hot path.

Differential Revision: https://phabricator.services.mozilla.com/D186976
This commit is contained in:
Markus Stange
2023-08-28 23:38:42 +00:00
parent 26220b7437
commit 70bd936589
24 changed files with 110 additions and 114 deletions

View File

@@ -472,9 +472,8 @@ void HTMLTextAreaElement::FireChangeEventIfNeeded() {
// Dispatch the change event.
mFocusedValue = value;
nsContentUtils::DispatchTrustedEvent(
OwnerDoc(), static_cast<nsIContent*>(this), u"change"_ns, CanBubble::eYes,
Cancelable::eNo);
nsContentUtils::DispatchTrustedEvent(OwnerDoc(), this, u"change"_ns,
CanBubble::eYes, Cancelable::eNo);
}
nsresult HTMLTextAreaElement::PostHandleEvent(EventChainPostVisitor& aVisitor) {