diff --git a/dom/events/CommandEvent.cpp b/dom/events/CommandEvent.cpp index e548c89e0b73..dc6ee029fb64 100644 --- a/dom/events/CommandEvent.cpp +++ b/dom/events/CommandEvent.cpp @@ -36,7 +36,7 @@ NS_IMPL_RELEASE_INHERITED(CommandEvent, Event) NS_IMETHODIMP CommandEvent::GetCommand(nsAString& aCommand) { - nsIAtom* command = mEvent->AsCommandEvent()->command; + nsIAtom* command = mEvent->AsCommandEvent()->mCommand; if (command) { command->ToString(aCommand); } else { @@ -53,7 +53,7 @@ CommandEvent::InitCommandEvent(const nsAString& aTypeArg, { Event::InitEvent(aTypeArg, aCanBubbleArg, aCancelableArg); - mEvent->AsCommandEvent()->command = NS_Atomize(aCommand); + mEvent->AsCommandEvent()->mCommand = NS_Atomize(aCommand); return NS_OK; } diff --git a/widget/MiscEvents.h b/widget/MiscEvents.h index 6066fc0aa47d..2ef581d79529 100644 --- a/widget/MiscEvents.h +++ b/widget/MiscEvents.h @@ -110,7 +110,7 @@ public: nsIAtom* aCommand, nsIWidget* aWidget) : WidgetGUIEvent(aIsTrusted, eUnidentifiedEvent, aWidget, eCommandEventClass) - , command(aCommand) + , mCommand(aCommand) { mSpecifiedEventType = aEventType; } @@ -121,13 +121,13 @@ public: "Duplicate() must be overridden by sub class"); // Not copying widget, it is a weak reference. WidgetCommandEvent* result = - new WidgetCommandEvent(false, mSpecifiedEventType, command, nullptr); + new WidgetCommandEvent(false, mSpecifiedEventType, mCommand, nullptr); result->AssignCommandEventData(*this, true); result->mFlags = mFlags; return result; } - nsCOMPtr command; + nsCOMPtr mCommand; // XXX Not tested by test_assign_event_data.html void AssignCommandEventData(const WidgetCommandEvent& aEvent, @@ -135,7 +135,7 @@ public: { AssignGUIEventData(aEvent, aCopyTargets); - // command must have been initialized with the constructor. + // mCommand must have been initialized with the constructor. } };