Closed Bug 1175442 Opened 8 years ago Closed 8 years ago
Content Utils::Send Key Event() should take ns IWidget* rather than ns COMPtr<ns IWidget> at its first argument
nsContentUtils::SendKeyEvent() is defined as: > 2360 static nsresult SendKeyEvent(nsCOMPtr<nsIWidget> aWidget, > 2361 const nsAString& aType, > 2362 int32_t aKeyCode, > 2363 int32_t aCharCode, > 2364 int32_t aModifiers, > 2365 uint32_t aAdditionalFlags, > 2366 bool* aDefaultActionTaken); However, this means that the caller needs to create a local variable of nsCOMPtr<nsIWidget> if the caller has a pointer to an nsIWidget derived class. So, it should be nsIWidget* for allowing to accept all nsIWidget derived classes.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Attachment #8623627 - Flags: review?(bugs)
Attachment #8623627 - Flags: review?(bugs) → review+
Out of interest, what about SendMouseEvent?
(In reply to email@example.com from comment #3) > Out of interest, what about SendMouseEvent? I'm not sure. It takes nsCOMPtr<nsIPresShell>, but its concrete class is only PresShell and I don't see such code which holds with nsRefPtr. But if some callers making nsCOMPtr<nsIPresShell> from raw pointer (nsIPresShell*), we should do that too.
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.