Bug 1175442 Make nsContentUtils::SendKeyEvent() take nsIWidget* rather than nsCOMPtr<nsIWidget> r=smaug

This commit is contained in:
Masayuki Nakano 2015-06-18 13:41:28 +09:00
parent d302aba021
commit df1ecd1af8
3 changed files with 3 additions and 6 deletions

View File

@ -7575,7 +7575,7 @@ nsContentUtils::GetViewToDispatchEvent(nsPresContext* presContext,
}
nsresult
nsContentUtils::SendKeyEvent(nsCOMPtr<nsIWidget> aWidget,
nsContentUtils::SendKeyEvent(nsIWidget* aWidget,
const nsAString& aType,
int32_t aKeyCode,
int32_t aCharCode,

View File

@ -2363,7 +2363,7 @@ public:
* Synthesize a key event to the given widget
* (see nsIDOMWindowUtils.sendKeyEvent).
*/
static nsresult SendKeyEvent(nsCOMPtr<nsIWidget> aWidget,
static nsresult SendKeyEvent(nsIWidget* aWidget,
const nsAString& aType,
int32_t aKeyCode,
int32_t aCharCode,

View File

@ -2539,10 +2539,7 @@ TabChild::RecvKeyEvent(const nsString& aType,
const bool& aPreventDefault)
{
bool ignored = false;
// XXX Why nsContentUtils::SendKeyEvent takes nsCOMPtr<nsIWidget> for the
// first argument? Why not just nsIWidget*?
nsCOMPtr<nsIWidget> widget(mPuppetWidget);
nsContentUtils::SendKeyEvent(widget, aType, aKeyCode, aCharCode,
nsContentUtils::SendKeyEvent(mPuppetWidget, aType, aKeyCode, aCharCode,
aModifiers, aPreventDefault, &ignored);
return true;
}