Closed
Bug 1175442
Opened 11 years ago
Closed 11 years ago
nsContentUtils::SendKeyEvent() should take nsIWidget* rather than nsCOMPtr<nsIWidget> at its first argument
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
RESOLVED
FIXED
mozilla41
| Tracking | Status | |
|---|---|---|
| firefox41 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(1 file)
|
2.83 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
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 | ||
Comment 1•11 years ago
|
||
Updated•11 years ago
|
Attachment #8623627 -
Flags: review?(bugs) → review+
Comment 3•11 years ago
|
||
Out of interest, what about SendMouseEvent?
| Assignee | ||
Comment 4•11 years ago
|
||
(In reply to neil@parkwaycc.co.uk 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.
Comment 5•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Updated•7 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•