mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 920425 part.14 Use mozilla::WidgetEvent::AsCommandEvent() r=smaug
This commit is contained in:
parent
369cc09510
commit
daf85a040a
@ -33,7 +33,7 @@ NS_IMPL_RELEASE_INHERITED(nsDOMCommandEvent, nsDOMEvent)
|
||||
NS_IMETHODIMP
|
||||
nsDOMCommandEvent::GetCommand(nsAString& aCommand)
|
||||
{
|
||||
nsIAtom* command = static_cast<WidgetCommandEvent*>(mEvent)->command;
|
||||
nsIAtom* command = mEvent->AsCommandEvent()->command;
|
||||
if (command) {
|
||||
command->ToString(aCommand);
|
||||
} else {
|
||||
@ -51,7 +51,7 @@ nsDOMCommandEvent::InitCommandEvent(const nsAString& aTypeArg,
|
||||
nsresult rv = nsDOMEvent::InitEvent(aTypeArg, aCanBubbleArg, aCancelableArg);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
static_cast<WidgetCommandEvent*>(mEvent)->command = do_GetAtom(aCommand);
|
||||
mEvent->AsCommandEvent()->command = do_GetAtom(aCommand);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -660,8 +660,7 @@ nsDOMEvent::DuplicatePrivateData()
|
||||
}
|
||||
case NS_COMMAND_EVENT:
|
||||
{
|
||||
WidgetCommandEvent* oldCommandEvent =
|
||||
static_cast<WidgetCommandEvent*>(mEvent);
|
||||
WidgetCommandEvent* oldCommandEvent = mEvent->AsCommandEvent();
|
||||
WidgetCommandEvent* commandEvent =
|
||||
new WidgetCommandEvent(false, mEvent->userType,
|
||||
oldCommandEvent->command, nullptr);
|
||||
|
@ -737,7 +737,7 @@ nsEventDispatcher::CreateEvent(mozilla::dom::EventTarget* aOwner,
|
||||
|
||||
case NS_COMMAND_EVENT:
|
||||
return NS_NewDOMCommandEvent(aDOMEvent, aOwner, aPresContext,
|
||||
static_cast<WidgetCommandEvent*>(aEvent));
|
||||
aEvent->AsCommandEvent());
|
||||
case NS_SIMPLE_GESTURE_EVENT:
|
||||
return NS_NewDOMSimpleGestureEvent(aDOMEvent, aOwner, aPresContext,
|
||||
static_cast<WidgetSimpleGestureEvent*>(aEvent));
|
||||
|
Loading…
Reference in New Issue
Block a user