Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Sat, 22 Aug 2015 10:34:51 +0900
changeset 291504 bb91cf98a42b08db96677dd8bc3ebe5218945318
parent 291503 0dcc8b43ed510b164da120dce0c2d96fe2ef22d4
child 291505 756c006944ab770d06841c63a5d0f00616d3d41e
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs895274
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 895274 part.1 Rename WidgetEvent::message to WidgetEvent::mMessage r=smaug
dom/base/Element.cpp
dom/base/FragmentOrElement.cpp
dom/base/TextInputProcessor.cpp
dom/base/nsContentUtils.cpp
dom/base/nsDocument.cpp
dom/base/nsGenConImageContent.cpp
dom/base/nsGlobalWindow.cpp
dom/base/nsQueryContentEventResult.cpp
dom/events/ClipboardEvent.cpp
dom/events/DataTransfer.h
dom/events/Event.cpp
dom/events/Event.h
dom/events/EventDispatcher.cpp
dom/events/EventDispatcher.h
dom/events/EventListenerManager.cpp
dom/events/EventListenerManager.h
dom/events/EventStateManager.cpp
dom/events/EventStateManager.h
dom/events/IMEContentObserver.cpp
dom/events/IMEStateManager.cpp
dom/events/InternalMutationEvent.h
dom/events/KeyboardEvent.cpp
dom/events/NotifyPaintEvent.cpp
dom/events/TextComposition.cpp
dom/events/TouchEvent.cpp
dom/events/WheelHandlingHelper.cpp
dom/html/HTMLButtonElement.cpp
dom/html/HTMLFieldSetElement.cpp
dom/html/HTMLFormElement.cpp
dom/html/HTMLInputElement.cpp
dom/html/HTMLLabelElement.cpp
dom/html/HTMLMenuItemElement.cpp
dom/html/HTMLObjectElement.cpp
dom/html/HTMLSelectElement.cpp
dom/html/HTMLTextAreaElement.cpp
dom/html/nsGenericHTMLElement.cpp
dom/html/nsTextEditorState.cpp
dom/ipc/TabChild.cpp
dom/ipc/TabParent.cpp
dom/plugins/base/nsPluginInstanceOwner.cpp
dom/svg/SVGSVGElement.cpp
dom/xul/nsXULElement.cpp
editor/libeditor/nsEditor.cpp
editor/libeditor/nsEditorEventListener.cpp
editor/libeditor/nsHTMLEditor.cpp
editor/libeditor/nsPlaintextEditor.cpp
gfx/layers/apz/src/APZCTreeManager.cpp
gfx/layers/apz/util/APZEventState.cpp
layout/base/AccessibleCaretEventHub.cpp
layout/base/SelectionCarets.cpp
layout/base/TouchCaret.cpp
layout/base/TouchManager.cpp
layout/base/nsPresShell.cpp
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsImageControlFrame.cpp
layout/forms/nsListControlFrame.cpp
layout/generic/nsFrame.cpp
layout/generic/nsFrameSetFrame.cpp
layout/generic/nsImageFrame.cpp
layout/generic/nsPluginFrame.cpp
layout/printing/nsPrintPreviewListener.cpp
layout/style/nsAnimationManager.h
layout/xul/nsButtonBoxFrame.cpp
layout/xul/nsMenuFrame.cpp
layout/xul/nsResizerFrame.cpp
layout/xul/nsRootBoxFrame.cpp
layout/xul/nsScrollBoxFrame.cpp
layout/xul/nsScrollbarButtonFrame.cpp
layout/xul/nsSliderFrame.cpp
layout/xul/nsSplitterFrame.cpp
layout/xul/nsTitleBarFrame.cpp
layout/xul/tree/nsTreeBodyFrame.cpp
view/nsViewManager.cpp
widget/BasicEvents.h
widget/ContentCache.cpp
widget/ContentEvents.h
widget/InputData.cpp
widget/MiscEvents.h
widget/MouseEvents.h
widget/TextEvents.h
widget/TouchEvents.h
widget/WidgetEventImpl.cpp
widget/android/nsWindow.cpp
widget/cocoa/TextInputHandler.mm
widget/gtk/IMContextWrapper.cpp
widget/gtk/nsGtkKeyUtils.cpp
widget/nsBaseWidget.cpp
widget/nsGUIEventIPC.h
widget/qt/nsWindow.cpp
widget/windows/KeyboardLayout.cpp
widget/windows/WinMouseScrollHandler.cpp
widget/windows/nsWinGesture.cpp
widget/windows/nsWindow.cpp
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -2845,34 +2845,34 @@ Element::Describe(nsAString& aOutDescrip
 }
 
 bool
 Element::CheckHandleEventForLinksPrecondition(EventChainVisitor& aVisitor,
                                               nsIURI** aURI) const
 {
   if (aVisitor.mEventStatus == nsEventStatus_eConsumeNoDefault ||
       (!aVisitor.mEvent->mFlags.mIsTrusted &&
-       (aVisitor.mEvent->message != NS_MOUSE_CLICK) &&
-       (aVisitor.mEvent->message != NS_KEY_PRESS) &&
-       (aVisitor.mEvent->message != NS_UI_ACTIVATE)) ||
+       (aVisitor.mEvent->mMessage != NS_MOUSE_CLICK) &&
+       (aVisitor.mEvent->mMessage != NS_KEY_PRESS) &&
+       (aVisitor.mEvent->mMessage != NS_UI_ACTIVATE)) ||
       !aVisitor.mPresContext ||
       aVisitor.mEvent->mFlags.mMultipleActionsPrevented) {
     return false;
   }
 
   // Make sure we actually are a link
   return IsLink(aURI);
 }
 
 nsresult
 Element::PreHandleEventForLinks(EventChainPreVisitor& aVisitor)
 {
   // Optimisation: return early if this event doesn't interest us.
   // IMPORTANT: this switch and the switch below it must be kept in sync!
-  switch (aVisitor.mEvent->message) {
+  switch (aVisitor.mEvent->mMessage) {
   case NS_MOUSE_OVER:
   case NS_FOCUS_CONTENT:
   case NS_MOUSE_OUT:
   case NS_BLUR_CONTENT:
     break;
   default:
     return NS_OK;
   }
@@ -2882,17 +2882,17 @@ Element::PreHandleEventForLinks(EventCha
   if (!CheckHandleEventForLinksPrecondition(aVisitor, getter_AddRefs(absURI))) {
     return NS_OK;
   }
 
   nsresult rv = NS_OK;
 
   // We do the status bar updates in PreHandleEvent so that the status bar gets
   // updated even if the event is consumed before we have a chance to set it.
-  switch (aVisitor.mEvent->message) {
+  switch (aVisitor.mEvent->mMessage) {
   // Set the status bar similarly for mouseover and focus
   case NS_MOUSE_OVER:
     aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
     // FALL THROUGH
   case NS_FOCUS_CONTENT: {
     InternalFocusEvent* focusEvent = aVisitor.mEvent->AsFocusEvent();
     if (!focusEvent || !focusEvent->isRefocus) {
       nsAutoString target;
@@ -2923,17 +2923,17 @@ Element::PreHandleEventForLinks(EventCha
   return rv;
 }
 
 nsresult
 Element::PostHandleEventForLinks(EventChainPostVisitor& aVisitor)
 {
   // Optimisation: return early if this event doesn't interest us.
   // IMPORTANT: this switch and the switch below it must be kept in sync!
-  switch (aVisitor.mEvent->message) {
+  switch (aVisitor.mEvent->mMessage) {
   case NS_MOUSE_BUTTON_DOWN:
   case NS_MOUSE_CLICK:
   case NS_UI_ACTIVATE:
   case NS_KEY_PRESS:
     break;
   default:
     return NS_OK;
   }
@@ -2941,17 +2941,17 @@ Element::PostHandleEventForLinks(EventCh
   // Make sure we meet the preconditions before continuing
   nsCOMPtr<nsIURI> absURI;
   if (!CheckHandleEventForLinksPrecondition(aVisitor, getter_AddRefs(absURI))) {
     return NS_OK;
   }
 
   nsresult rv = NS_OK;
 
-  switch (aVisitor.mEvent->message) {
+  switch (aVisitor.mEvent->mMessage) {
   case NS_MOUSE_BUTTON_DOWN:
     {
       if (aVisitor.mEvent->AsMouseEvent()->button ==
             WidgetMouseEvent::eLeftButton) {
         // don't make the link grab the focus if there is no link handler
         nsILinkHandler *handler = aVisitor.mPresContext->GetLinkHandler();
         nsIDocument *document = GetComposedDoc();
         if (handler && document) {
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -672,20 +672,20 @@ nsIContent::PreHandleEvent(EventChainPre
 {
   //FIXME! Document how this event retargeting works, Bug 329124.
   aVisitor.mCanHandle = true;
   aVisitor.mMayHaveListenerManager = HasListenerManager();
 
   // Don't propagate mouseover and mouseout events when mouse is moving
   // inside chrome access only content.
   bool isAnonForEvents = IsRootOfChromeAccessOnlySubtree();
-  if ((aVisitor.mEvent->message == NS_MOUSE_OVER ||
-       aVisitor.mEvent->message == NS_MOUSE_OUT ||
-       aVisitor.mEvent->message == NS_POINTER_OVER ||
-       aVisitor.mEvent->message == NS_POINTER_OUT) &&
+  if ((aVisitor.mEvent->mMessage == NS_MOUSE_OVER ||
+       aVisitor.mEvent->mMessage == NS_MOUSE_OUT ||
+       aVisitor.mEvent->mMessage == NS_POINTER_OVER ||
+       aVisitor.mEvent->mMessage == NS_POINTER_OUT) &&
       // Check if we should stop event propagation when event has just been
       // dispatched or when we're about to propagate from
       // chrome access only subtree or if we are about to propagate out of
       // a shadow root to a shadow root host.
       ((this == aVisitor.mEvent->originalTarget &&
         !ChromeOnlyAccess()) || isAnonForEvents || GetShadowRoot())) {
      nsCOMPtr<nsIContent> relatedTarget =
        do_QueryInterface(aVisitor.mEvent->AsMouseEvent()->relatedTarget);
@@ -734,17 +734,17 @@ nsIContent::PreHandleEvent(EventChainPre
               if (originalTarget) {
                 originalTarget->NodeInfo()->NameAtom()->ToString(ot);
               }
               NodeInfo()->NameAtom()->ToString(ct);
               relatedTarget->NodeInfo()->NameAtom()->ToString(rt);
               printf("Stopping %s propagation:"
                      "\n\toriginalTarget=%s \n\tcurrentTarget=%s %s"
                      "\n\trelatedTarget=%s %s \n%s",
-                     (aVisitor.mEvent->message == NS_MOUSE_OVER)
+                     (aVisitor.mEvent->mMessage == NS_MOUSE_OVER)
                        ? "mouseover" : "mouseout",
                      NS_ConvertUTF16toUTF8(ot).get(),
                      NS_ConvertUTF16toUTF8(ct).get(),
                      isAnonForEvents
                        ? "(is native anonymous)"
                        : (ChromeOnlyAccess()
                            ? "(is in native anonymous subtree)" : ""),
                      NS_ConvertUTF16toUTF8(rt).get(),
@@ -800,17 +800,17 @@ nsIContent::PreHandleEvent(EventChainPre
     //   select
     //   change
     //   load
     //   reset
     //   resize
     //   scroll
     //   selectstart
     bool stopEvent = false;
-    switch (aVisitor.mEvent->message) {
+    switch (aVisitor.mEvent->mMessage) {
       case NS_IMAGE_ABORT:
       case NS_LOAD_ERROR:
       case NS_FORM_SELECTED:
       case NS_FORM_CHANGE:
       case NS_LOAD:
       case NS_FORM_RESET:
       case NS_RESIZE_EVENT:
       case NS_SCROLL_EVENT:
@@ -836,17 +836,17 @@ nsIContent::PreHandleEvent(EventChainPre
     }
 
     if (stopEvent) {
       // If we do stop propagation, we still want to propagate
       // the event to chrome (nsPIDOMWindow::GetParentTarget()).
       // The load event is special in that we don't ever propagate it
       // to chrome.
       nsCOMPtr<nsPIDOMWindow> win = OwnerDoc()->GetWindow();
-      EventTarget* parentTarget = win && aVisitor.mEvent->message != NS_LOAD
+      EventTarget* parentTarget = win && aVisitor.mEvent->mMessage != NS_LOAD
         ? win->GetParentTarget() : nullptr;
 
       aVisitor.mParentTarget = parentTarget;
       return NS_OK;
     }
 
     if (!aVisitor.mDestInsertionPoints.IsEmpty()) {
       parent = aVisitor.mDestInsertionPoints.LastElement();
--- a/dom/base/TextInputProcessor.cpp
+++ b/dom/base/TextInputProcessor.cpp
@@ -243,20 +243,20 @@ TextInputProcessor::IsValidStateForCompo
   return NS_OK;
 }
 
 bool
 TextInputProcessor::IsValidEventTypeForComposition(
                       const WidgetKeyboardEvent& aKeyboardEvent) const
 {
   // The key event type of composition methods must be "" or "keydown".
-  if (aKeyboardEvent.message == NS_KEY_DOWN) {
+  if (aKeyboardEvent.mMessage == NS_KEY_DOWN) {
     return true;
   }
-  if (aKeyboardEvent.message == NS_USER_DEFINED_EVENT &&
+  if (aKeyboardEvent.mMessage == NS_USER_DEFINED_EVENT &&
       aKeyboardEvent.userType &&
       nsDependentAtomString(aKeyboardEvent.userType).EqualsLiteral("on")) {
     return true;
   }
   return false;
 }
 
 TextInputProcessor::EventDispatcherResult
@@ -301,19 +301,19 @@ TextInputProcessor::MaybeDispatchKeyupFo
                       uint32_t aKeyFlags)
 {
   EventDispatcherResult result;
 
   if (!aKeyboardEvent) {
     return result;
   }
 
-  // If the message is NS_KEY_DOWN, the caller doesn't want TIP to dispatch
+  // If the mMessage is NS_KEY_DOWN, the caller doesn't want TIP to dispatch
   // keyup event.
-  if (aKeyboardEvent->message == NS_KEY_DOWN) {
+  if (aKeyboardEvent->mMessage == NS_KEY_DOWN) {
     return result;
   }
 
   // If the widget has been destroyed, we can do nothing here.
   result.mResult = IsValidStateForComposition();
   if (NS_FAILED(result.mResult)) {
     result.mCanContinue = false;
     return result;
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -5441,18 +5441,18 @@ nsresult
 nsContentUtils::SetDataTransferInEvent(WidgetDragEvent* aDragEvent)
 {
   if (aDragEvent->dataTransfer || !aDragEvent->mFlags.mIsTrusted)
     return NS_OK;
 
   // For draggesture and dragstart events, the data transfer object is
   // created before the event fires, so it should already be set. For other
   // drag events, get the object from the drag session.
-  NS_ASSERTION(aDragEvent->message != NS_DRAGDROP_GESTURE &&
-               aDragEvent->message != NS_DRAGDROP_START,
+  NS_ASSERTION(aDragEvent->mMessage != NS_DRAGDROP_GESTURE &&
+               aDragEvent->mMessage != NS_DRAGDROP_START,
                "draggesture event created without a dataTransfer");
 
   nsCOMPtr<nsIDragSession> dragSession = GetDragSession();
   NS_ENSURE_TRUE(dragSession, NS_OK); // no drag in progress
 
   nsCOMPtr<nsIDOMDataTransfer> dataTransfer;
   nsCOMPtr<DataTransfer> initialDataTransfer;
   dragSession->GetDataTransfer(getter_AddRefs(dataTransfer));
@@ -5461,47 +5461,49 @@ nsContentUtils::SetDataTransferInEvent(W
     if (!initialDataTransfer) {
       return NS_ERROR_FAILURE;
     }
   } else {
     // A dataTransfer won't exist when a drag was started by some other
     // means, for instance calling the drag service directly, or a drag
     // from another application. In either case, a new dataTransfer should
     // be created that reflects the data.
-    initialDataTransfer = new DataTransfer(aDragEvent->target, aDragEvent->message, true, -1);
+    initialDataTransfer =
+      new DataTransfer(aDragEvent->target, aDragEvent->mMessage, true, -1);
 
     // now set it in the drag session so we don't need to create it again
     dragSession->SetDataTransfer(initialDataTransfer);
   }
 
   bool isCrossDomainSubFrameDrop = false;
-  if (aDragEvent->message == NS_DRAGDROP_DROP ||
-      aDragEvent->message == NS_DRAGDROP_DRAGDROP) {
+  if (aDragEvent->mMessage == NS_DRAGDROP_DROP ||
+      aDragEvent->mMessage == NS_DRAGDROP_DRAGDROP) {
     isCrossDomainSubFrameDrop = CheckForSubFrameDrop(dragSession, aDragEvent);
   }
 
   // each event should use a clone of the original dataTransfer.
-  initialDataTransfer->Clone(aDragEvent->target, aDragEvent->message, aDragEvent->userCancelled,
+  initialDataTransfer->Clone(aDragEvent->target, aDragEvent->mMessage,
+                             aDragEvent->userCancelled,
                              isCrossDomainSubFrameDrop,
                              getter_AddRefs(aDragEvent->dataTransfer));
   NS_ENSURE_TRUE(aDragEvent->dataTransfer, NS_ERROR_OUT_OF_MEMORY);
 
   // for the dragenter and dragover events, initialize the drop effect
   // from the drop action, which platform specific widget code sets before
   // the event is fired based on the keyboard state.
-  if (aDragEvent->message == NS_DRAGDROP_ENTER ||
-      aDragEvent->message == NS_DRAGDROP_OVER) {
+  if (aDragEvent->mMessage == NS_DRAGDROP_ENTER ||
+      aDragEvent->mMessage == NS_DRAGDROP_OVER) {
     uint32_t action, effectAllowed;
     dragSession->GetDragAction(&action);
     aDragEvent->dataTransfer->GetEffectAllowedInt(&effectAllowed);
     aDragEvent->dataTransfer->SetDropEffectInt(FilterDropEffect(action, effectAllowed));
   }
-  else if (aDragEvent->message == NS_DRAGDROP_DROP ||
-           aDragEvent->message == NS_DRAGDROP_DRAGDROP ||
-           aDragEvent->message == NS_DRAGDROP_END) {
+  else if (aDragEvent->mMessage == NS_DRAGDROP_DROP ||
+           aDragEvent->mMessage == NS_DRAGDROP_DRAGDROP ||
+           aDragEvent->mMessage == NS_DRAGDROP_END) {
     // For the drop and dragend events, set the drop effect based on the
     // last value that the dropEffect had. This will have been set in
     // EventStateManager::PostHandleEvent for the last dragenter or
     // dragover event.
     uint32_t dropEffect;
     initialDataTransfer->GetDropEffectInt(&dropEffect);
     aDragEvent->dataTransfer->SetDropEffectInt(dropEffect);
   }
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -8108,17 +8108,17 @@ nsresult
 nsDocument::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
   aVisitor.mCanHandle = true;
    // FIXME! This is a hack to make middle mouse paste working also in Editor.
    // Bug 329119
   aVisitor.mForceContentDispatch = true;
 
   // Load events must not propagate to |window| object, see bug 335251.
-  if (aVisitor.mEvent->message != NS_LOAD) {
+  if (aVisitor.mEvent->mMessage != NS_LOAD) {
     nsGlobalWindow* window = static_cast<nsGlobalWindow*>(GetWindow());
     aVisitor.mParentTarget =
       window ? window->GetTargetForEventTargetChain() : nullptr;
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
--- a/dom/base/nsGenConImageContent.cpp
+++ b/dom/base/nsGenConImageContent.cpp
@@ -44,18 +44,18 @@ public:
                               nsIContent* aBindingParent,
                               bool aCompileEventHandlers) override;
   virtual void UnbindFromTree(bool aDeep, bool aNullParent) override;
   virtual EventStates IntrinsicState() const override;
 
   virtual nsresult PreHandleEvent(EventChainPreVisitor& aVisitor) override
   {
     MOZ_ASSERT(IsInNativeAnonymousSubtree());
-    if (aVisitor.mEvent->message == NS_LOAD ||
-        aVisitor.mEvent->message == NS_LOAD_ERROR) {
+    if (aVisitor.mEvent->mMessage == NS_LOAD ||
+        aVisitor.mEvent->mMessage == NS_LOAD_ERROR) {
       // Don't propagate the events to the parent.
       return NS_OK;
     }
     return nsXMLElement::PreHandleEvent(aVisitor);
   }
   
 private:
   virtual ~nsGenConImageContent();
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -3039,17 +3039,17 @@ nsGlobalWindow::GetJSContextForEventHand
   return nullptr;
 }
 
 nsresult
 nsGlobalWindow::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
   NS_PRECONDITION(IsInnerWindow(), "PreHandleEvent is used on outer window!?");
   static uint32_t count = 0;
-  uint32_t msg = aVisitor.mEvent->message;
+  uint32_t msg = aVisitor.mEvent->mMessage;
 
   aVisitor.mCanHandle = true;
   aVisitor.mForceContentDispatch = true; //FIXME! Bug 329119
   if ((msg == NS_MOUSE_MOVE) && gEntropyCollector) {
     //Chances are this counter will overflow during the life of the
     //process, but that's OK for our case. Means we get a little
     //more entropy.
     if (count++ % 100 == 0) {
@@ -3247,42 +3247,42 @@ nsGlobalWindow::EnableDialogs()
 }
 
 nsresult
 nsGlobalWindow::PostHandleEvent(EventChainPostVisitor& aVisitor)
 {
   NS_PRECONDITION(IsInnerWindow(), "PostHandleEvent is used on outer window!?");
 
   // Return early if there is nothing to do.
-  switch (aVisitor.mEvent->message) {
+  switch (aVisitor.mEvent->mMessage) {
     case NS_RESIZE_EVENT:
     case NS_PAGE_UNLOAD:
     case NS_LOAD:
       break;
     default:
       return NS_OK;
   }
 
   /* mChromeEventHandler and mContext go dangling in the middle of this
    function under some circumstances (events that destroy the window)
    without this addref. */
   nsCOMPtr<nsIDOMEventTarget> kungFuDeathGrip1(mChromeEventHandler);
   nsCOMPtr<nsIScriptContext> kungFuDeathGrip2(GetContextInternal());
 
-  if (aVisitor.mEvent->message == NS_RESIZE_EVENT) {
+  if (aVisitor.mEvent->mMessage == NS_RESIZE_EVENT) {
     mIsHandlingResizeEvent = false;
-  } else if (aVisitor.mEvent->message == NS_PAGE_UNLOAD &&
+  } else if (aVisitor.mEvent->mMessage == NS_PAGE_UNLOAD &&
              aVisitor.mEvent->mFlags.mIsTrusted) {
     // Execute bindingdetached handlers before we tear ourselves
     // down.
     if (mDoc) {
       mDoc->BindingManager()->ExecuteDetachedHandlers();
     }
     mIsDocumentLoaded = false;
-  } else if (aVisitor.mEvent->message == NS_LOAD &&
+  } else if (aVisitor.mEvent->mMessage == NS_LOAD &&
              aVisitor.mEvent->mFlags.mIsTrusted) {
     // This is page load event since load events don't propagate to |window|.
     // @see nsDocument::PreHandleEvent.
     mIsDocumentLoaded = true;
 
     nsCOMPtr<Element> element = GetFrameElementInternal();
     nsIDocShell* docShell = GetDocShell();
     if (element && GetParentInternal() &&
--- a/dom/base/nsQueryContentEventResult.cpp
+++ b/dom/base/nsQueryContentEventResult.cpp
@@ -154,17 +154,17 @@ nsQueryContentEventResult::GetTentativeC
   *aNotFound = (mTentativeCaretOffset == WidgetQueryContentEvent::NOT_FOUND);
   return NS_OK;
 }
 
 void
 nsQueryContentEventResult::SetEventResult(nsIWidget* aWidget,
                                           const WidgetQueryContentEvent &aEvent)
 {
-  mEventID = aEvent.message;
+  mEventID = aEvent.mMessage;
   mSucceeded = aEvent.mSucceeded;
   mReversed = aEvent.mReply.mReversed;
   mRect = aEvent.mReply.mRect;
   mOffset = aEvent.mReply.mOffset;
   mTentativeCaretOffset = aEvent.mReply.mTentativeCaretOffset;
   mString = aEvent.mReply.mString;
 
   if (!IsRectEnabled(mEventID) || !aWidget || !mSucceeded) {
--- a/dom/events/ClipboardEvent.cpp
+++ b/dom/events/ClipboardEvent.cpp
@@ -103,18 +103,18 @@ ClipboardEvent::GetClipboardData()
   InternalClipboardEvent* event = mEvent->AsClipboardEvent();
 
   if (!event->clipboardData) {
     if (mEventIsInternal) {
       event->clipboardData =
         new DataTransfer(ToSupports(this), NS_COPY, false, -1);
     } else {
       event->clipboardData =
-        new DataTransfer(ToSupports(this), event->message,
-                         event->message == NS_PASTE,
+        new DataTransfer(ToSupports(this), event->mMessage,
+                         event->mMessage == NS_PASTE,
                          nsIClipboard::kGlobalClipboard);
     }
   }
 
   return event->clipboardData;
 }
 
 } // namespace dom
--- a/dom/events/DataTransfer.h
+++ b/dom/events/DataTransfer.h
@@ -250,17 +250,17 @@ protected:
   void FillAllExternalData();
 
   void MozClearDataAtHelper(const nsAString& aFormat, uint32_t aIndex,
                             mozilla::ErrorResult& aRv);
 
   nsCOMPtr<nsISupports> mParent;
 
   // the event type this data transfer is for. This will correspond to an
-  // event->message value.
+  // event->mMessage value.
   uint32_t mEventType;
 
   // the drop effect and effect allowed
   uint32_t mDropEffect;
   uint32_t mEffectAllowed;
 
   // Indicates the behavior of the cursor during drag operations
   bool mCursorState;
--- a/dom/events/Event.cpp
+++ b/dom/events/Event.cpp
@@ -260,22 +260,22 @@ Event::IsChrome(JSContext* aCx) const
 // nsIDOMEventInterface
 NS_METHOD
 Event::GetType(nsAString& aType)
 {
   if (!mIsMainThreadEvent || !mEvent->typeString.IsEmpty()) {
     aType = mEvent->typeString;
     return NS_OK;
   }
-  const char* name = GetEventName(mEvent->message);
+  const char* name = GetEventName(mEvent->mMessage);
 
   if (name) {
     CopyASCIItoUTF16(name, aType);
     return NS_OK;
-  } else if (mEvent->message == NS_USER_DEFINED_EVENT && mEvent->userType) {
+  } else if (mEvent->mMessage == NS_USER_DEFINED_EVENT && mEvent->userType) {
     aType = Substring(nsDependentAtomString(mEvent->userType), 2); // Remove "on"
     mEvent->typeString = aType;
     return NS_OK;
   }
 
   aType.Truncate();
   return NS_OK;
 }
@@ -559,20 +559,20 @@ Event::PreventDefaultInternal(bool aCall
 
 void
 Event::SetEventType(const nsAString& aEventTypeArg)
 {
   if (mIsMainThreadEvent) {
     mEvent->typeString.Truncate();
     mEvent->userType =
       nsContentUtils::GetEventIdAndAtom(aEventTypeArg, mEvent->mClass,
-                                        &(mEvent->message));
+                                        &(mEvent->mMessage));
   } else {
     mEvent->userType = nullptr;
-    mEvent->message = NS_USER_DEFINED_EVENT;
+    mEvent->mMessage = NS_USER_DEFINED_EVENT;
     mEvent->typeString = aEventTypeArg;
   }
 }
 
 NS_IMETHODIMP
 Event::InitEvent(const nsAString& aEventTypeArg,
                  bool aCanBubbleArg,
                  bool aCancelableArg)
@@ -710,17 +710,17 @@ Event::GetEventPopupControlState(WidgetE
   }
 
   switch(aEvent->mClass) {
   case eBasicEventClass:
     // For these following events only allow popups if they're
     // triggered while handling user input. See
     // nsPresShell::HandleEventInternal() for details.
     if (EventStateManager::IsHandlingUserInput()) {
-      switch(aEvent->message) {
+      switch(aEvent->mMessage) {
       case NS_FORM_SELECTED :
         if (PopupAllowedForEvent("select")) {
           abuse = openControlled;
         }
         break;
       case NS_FORM_CHANGE :
         if (PopupAllowedForEvent("change")) {
           abuse = openControlled;
@@ -729,46 +729,46 @@ Event::GetEventPopupControlState(WidgetE
       }
     }
     break;
   case eEditorInputEventClass:
     // For this following event only allow popups if it's triggered
     // while handling user input. See
     // nsPresShell::HandleEventInternal() for details.
     if (EventStateManager::IsHandlingUserInput()) {
-      switch(aEvent->message) {
+      switch(aEvent->mMessage) {
       case NS_EDITOR_INPUT:
         if (PopupAllowedForEvent("input")) {
           abuse = openControlled;
         }
         break;
       }
     }
     break;
   case eInputEventClass:
     // For this following event only allow popups if it's triggered
     // while handling user input. See
     // nsPresShell::HandleEventInternal() for details.
     if (EventStateManager::IsHandlingUserInput()) {
-      switch(aEvent->message) {
+      switch(aEvent->mMessage) {
       case NS_FORM_CHANGE :
         if (PopupAllowedForEvent("change")) {
           abuse = openControlled;
         }
         break;
       case NS_XUL_COMMAND:
         abuse = openControlled;
         break;
       }
     }
     break;
   case eKeyboardEventClass:
     if (aEvent->mFlags.mIsTrusted) {
       uint32_t key = aEvent->AsKeyboardEvent()->keyCode;
-      switch(aEvent->message) {
+      switch(aEvent->mMessage) {
       case NS_KEY_PRESS :
         // return key on focused button. see note at NS_MOUSE_CLICK.
         if (key == nsIDOMKeyEvent::DOM_VK_RETURN) {
           abuse = openAllowed;
         } else if (PopupAllowedForEvent("keypress")) {
           abuse = openControlled;
         }
         break;
@@ -785,34 +785,34 @@ Event::GetEventPopupControlState(WidgetE
           abuse = openControlled;
         }
         break;
       }
     }
     break;
   case eTouchEventClass:
     if (aEvent->mFlags.mIsTrusted) {
-      switch (aEvent->message) {
+      switch (aEvent->mMessage) {
       case NS_TOUCH_START :
         if (PopupAllowedForEvent("touchstart")) {
           abuse = openControlled;
         }
         break;
       case NS_TOUCH_END :
         if (PopupAllowedForEvent("touchend")) {
           abuse = openControlled;
         }
         break;
       }
     }
     break;
   case eMouseEventClass:
     if (aEvent->mFlags.mIsTrusted &&
         aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) {
-      switch(aEvent->message) {
+      switch(aEvent->mMessage) {
       case NS_MOUSE_BUTTON_UP :
         if (PopupAllowedForEvent("mouseup")) {
           abuse = openControlled;
         }
         break;
       case NS_MOUSE_BUTTON_DOWN :
         if (PopupAllowedForEvent("mousedown")) {
           abuse = openControlled;
@@ -835,17 +835,17 @@ Event::GetEventPopupControlState(WidgetE
       }
     }
     break;
   case eFormEventClass:
     // For these following events only allow popups if they're
     // triggered while handling user input. See
     // nsPresShell::HandleEventInternal() for details.
     if (EventStateManager::IsHandlingUserInput()) {
-      switch(aEvent->message) {
+      switch(aEvent->mMessage) {
       case NS_FORM_SUBMIT :
         if (PopupAllowedForEvent("submit")) {
           abuse = openControlled;
         }
         break;
       case NS_FORM_RESET :
         if (PopupAllowedForEvent("reset")) {
           abuse = openControlled;
--- a/dom/events/Event.h
+++ b/dom/events/Event.h
@@ -265,17 +265,17 @@ protected:
   mozilla::WidgetEvent*       mEvent;
   nsRefPtr<nsPresContext>     mPresContext;
   nsCOMPtr<EventTarget>       mExplicitOriginalTarget;
   nsCOMPtr<nsIGlobalObject>   mOwner;
   bool                        mEventIsInternal;
   bool                        mPrivateDataDuplicated;
   bool                        mIsMainThreadEvent;
   // True when popup control check should rely on event.type, not
-  // WidgetEvent.message.
+  // WidgetEvent.mMessage.
   bool                        mWantsPopupControlCheck;
 };
 
 class MOZ_STACK_CLASS WantsPopupControlCheck
 {
 public:
   explicit WantsPopupControlCheck(nsIDOMEvent* aEvent) :
     mEvent(aEvent->InternalDOMEvent())
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -415,22 +415,22 @@ EventDispatcher::Dispatch(nsISupports* a
                           nsTArray<EventTarget*>* aTargets)
 {
   PROFILER_LABEL("EventDispatcher", "Dispatch",
     js::ProfileEntry::Category::EVENTS);
 
   NS_ASSERTION(aEvent, "Trying to dispatch without WidgetEvent!");
   NS_ENSURE_TRUE(!aEvent->mFlags.mIsBeingDispatched,
                  NS_ERROR_DOM_INVALID_STATE_ERR);
-  NS_ASSERTION(!aTargets || !aEvent->message, "Wrong parameters!");
+  NS_ASSERTION(!aTargets || !aEvent->mMessage, "Wrong parameters!");
 
   // If we're dispatching an already created DOMEvent object, make
   // sure it is initialized!
   // If aTargets is non-null, the event isn't going to be dispatched.
-  NS_ENSURE_TRUE(aEvent->message || !aDOMEvent || aTargets,
+  NS_ENSURE_TRUE(aEvent->mMessage || !aDOMEvent || aTargets,
                  NS_ERROR_DOM_INVALID_STATE_ERR);
 
 #ifdef MOZ_TASK_TRACER
   {
     if (aDOMEvent) {
       nsAutoString eventType;
       aDOMEvent->GetType(eventType);
 
@@ -488,17 +488,18 @@ EventDispatcher::Dispatch(nsISupports* a
       // Set the target to be the original dispatch target,
       aEvent->target = target;
       // but use chrome event handler or TabChildGlobal for event target chain.
       target = piTarget;
     }
   }
 
 #ifdef DEBUG
-  if (aEvent->message != NS_EVENT_NULL && !nsContentUtils::IsSafeToRunScript()) {
+  if (aEvent->mMessage != NS_EVENT_NULL &&
+      !nsContentUtils::IsSafeToRunScript()) {
     nsresult rv = NS_ERROR_FAILURE;
     if (target->GetContextForEventHandlers(&rv) ||
         NS_FAILED(rv)) {
       nsCOMPtr<nsINode> node = do_QueryInterface(target);
       if (node && nsContentUtils::IsChromeDoc(node->OwnerDoc())) {
         NS_WARNING("Fix the caller!");
       } else {
         NS_ERROR("This is unsafe! Fix the caller!");
--- a/dom/events/EventDispatcher.h
+++ b/dom/events/EventDispatcher.h
@@ -241,17 +241,17 @@ public:
    * retargeting) and the originalTarget of the DOM Event.
    * aTarget is always used as the starting point for constructing the event
    * target chain, no matter what the value of aEvent->target is.
    * In other words, aEvent->target is only a property of the event and it has
    * nothing to do with the construction of the event target chain.
    * Neither aTarget nor aEvent is allowed to be nullptr.
    *
    * If aTargets is non-null, event target chain will be created, but
-   * event won't be handled. In this case aEvent->message should be
+   * event won't be handled. In this case aEvent->mMessage should be
    * NS_EVENT_NULL.
    * @note Use this method when dispatching a WidgetEvent.
    */
   static nsresult Dispatch(nsISupports* aTarget,
                            nsPresContext* aPresContext,
                            WidgetEvent* aEvent,
                            nsIDOMEvent* aDOMEvent = nullptr,
                            nsEventStatus* aEventStatus = nullptr,
--- a/dom/events/EventListenerManager.cpp
+++ b/dom/events/EventListenerManager.cpp
@@ -553,30 +553,30 @@ EventListenerManager::RemoveEventListene
   }
 }
 
 bool
 EventListenerManager::ListenerCanHandle(Listener* aListener,
                                         WidgetEvent* aEvent)
 {
   // This is slightly different from EVENT_TYPE_EQUALS in that it returns
-  // true even when aEvent->message == NS_USER_DEFINED_EVENT and
+  // true even when aEvent->mMessage == NS_USER_DEFINED_EVENT and
   // aListener=>mEventType != NS_USER_DEFINED_EVENT as long as the atoms are
   // the same
   if (aListener->mAllEvents) {
     return true;
   }
-  if (aEvent->message == NS_USER_DEFINED_EVENT) {
+  if (aEvent->mMessage == NS_USER_DEFINED_EVENT) {
     if (mIsMainThreadELM) {
       return aListener->mTypeAtom == aEvent->userType;
     }
     return aListener->mTypeString.Equals(aEvent->typeString);
   }
   MOZ_ASSERT(mIsMainThreadELM);
-  return aListener->mEventType == aEvent->message;
+  return aListener->mEventType == aEvent->mMessage;
 }
 
 void
 EventListenerManager::AddEventListenerByType(
                         const EventListenerHolder& aListenerHolder,
                         const nsAString& aType,
                         const EventListenerFlags& aFlags)
 {
@@ -1158,17 +1158,17 @@ EventListenerManager::HandleEventInterna
         }
       }
     }
   }
 
   aEvent->currentTarget = nullptr;
 
   if (mIsMainThreadELM && !hasListener) {
-    mNoListenerForEvent = aEvent->message;
+    mNoListenerForEvent = aEvent->mMessage;
     mNoListenerForEventAtom = aEvent->userType;
   }
 
   if (aEvent->mFlags.mDefaultPrevented) {
     *aEventStatus = nsEventStatus_eConsumeNoDefault;
   }
 }
 
--- a/dom/events/EventListenerManager.h
+++ b/dom/events/EventListenerManager.h
@@ -316,17 +316,17 @@ public:
       return;
     }
 
     if (!mMayHaveSystemGroupListeners && aEvent->mFlags.mInSystemGroup) {
       return;
     }
 
     // Check if we already know that there is no event listener for the event.
-    if (mNoListenerForEvent == aEvent->message &&
+    if (mNoListenerForEvent == aEvent->mMessage &&
         (mNoListenerForEvent != NS_USER_DEFINED_EVENT ||
          mNoListenerForEventAtom == aEvent->userType)) {
       return;
     }
     HandleEventInternal(aPresContext, aEvent, aDOMEvent, aCurrentTarget,
                         aEventStatus);
   }
 
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -494,18 +494,18 @@ EventStateManager::PreHandleEvent(nsPres
   mCurrentTarget = aTargetFrame;
   mCurrentTargetContent = nullptr;
 
   // Do not take account NS_MOUSE_ENTER_WIDGET/EXIT_WIDGET so that loading a page
   // when user is not active doesn't change the state to active.
   WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
   if (aEvent->mFlags.mIsTrusted &&
       ((mouseEvent && mouseEvent->IsReal() &&
-        mouseEvent->message != NS_MOUSE_ENTER_WIDGET &&
-        mouseEvent->message != NS_MOUSE_EXIT_WIDGET) ||
+        mouseEvent->mMessage != NS_MOUSE_ENTER_WIDGET &&
+        mouseEvent->mMessage != NS_MOUSE_EXIT_WIDGET) ||
        aEvent->mClass == eWheelEventClass ||
        aEvent->mClass == eKeyboardEventClass)) {
     if (gMouseOrKeyboardEventCounter == 0) {
       nsCOMPtr<nsIObserverService> obs =
         mozilla::services::GetObserverService();
       if (obs) {
         obs->NotifyObservers(nullptr, "user-interaction-active", nullptr);
         UpdateUserActivityTimer();
@@ -537,17 +537,17 @@ EventStateManager::PreHandleEvent(nsPres
     sLastScreenPoint =
       UIEvent::CalculateScreenPoint(aPresContext, aEvent);
     sLastClientPoint =
       UIEvent::CalculateClientPoint(aPresContext, aEvent, nullptr);
   }
 
   *aStatus = nsEventStatus_eIgnore;
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
   case NS_CONTEXTMENU:
     if (sIsPointerLocked) {
       return NS_ERROR_DOM_INVALID_STATE_ERR;
     }
     break;
   case NS_MOUSE_BUTTON_DOWN: {
     switch (mouseEvent->button) {
     case WidgetMouseEvent::eLeftButton:
@@ -610,27 +610,27 @@ EventStateManager::PreHandleEvent(nsPres
 
     // If the event is not a top-level window exit, then it's not
     // really an exit --- we may have traversed widget boundaries but
     // we're still in our toplevel window.
     if (mouseEvent->exit != WidgetMouseEvent::eTopLevel) {
       // Treat it as a synthetic move so we don't generate spurious
       // "exit" or "move" events.  Any necessary "out" or "over" events
       // will be generated by GenerateMouseEnterExit
-      mouseEvent->message = NS_MOUSE_MOVE;
+      mouseEvent->mMessage = NS_MOUSE_MOVE;
       mouseEvent->reason = WidgetMouseEvent::eSynthesized;
       // then fall through...
     } else {
       if (sPointerEventEnabled) {
         // We should synthetize corresponding pointer events
         GeneratePointerEnterExit(NS_POINTER_LEAVE, mouseEvent);
       }
       GenerateMouseEnterExit(mouseEvent);
       //This is a window level mouse exit event and should stop here
-      aEvent->message = 0;
+      aEvent->mMessage = 0;
       break;
     }
   case NS_MOUSE_MOVE:
   case NS_POINTER_DOWN:
   case NS_POINTER_MOVE: {
     // on the Mac, GenerateDragGesture() may not return until the drag
     // has completed and so |aTargetFrame| may have been deleted (moving
     // a bookmark, for example).  If this is the case, however, we know
@@ -712,17 +712,17 @@ EventStateManager::PreHandleEvent(nsPres
       NS_ASSERTION(aEvent->mFlags.mIsTrusted,
                    "Untrusted wheel event shouldn't be here");
 
       nsIContent* content = GetFocusedContent();
       if (content) {
         mCurrentTargetContent = content;
       }
 
-      if (aEvent->message != NS_WHEEL_WHEEL) {
+      if (aEvent->mMessage != NS_WHEEL_WHEEL) {
         break;
       }
 
       WidgetWheelEvent* wheelEvent = aEvent->AsWheelEvent();
       WheelPrefs::GetInstance()->ApplyUserPrefsToDelta(wheelEvent);
 
       // If we won't dispatch a DOM event for this event, nothing to do anymore.
       if (!wheelEvent->IsAllowedToDispatchDOMEvent()) {
@@ -1162,39 +1162,39 @@ EventStateManager::IsRemoteTarget(nsICon
 bool
 CrossProcessSafeEvent(const WidgetEvent& aEvent)
 {
   switch (aEvent.mClass) {
   case eKeyboardEventClass:
   case eWheelEventClass:
     return true;
   case eMouseEventClass:
-    switch (aEvent.message) {
+    switch (aEvent.mMessage) {
     case NS_MOUSE_BUTTON_DOWN:
     case NS_MOUSE_BUTTON_UP:
     case NS_MOUSE_MOVE:
     case NS_CONTEXTMENU:
     case NS_MOUSE_ENTER_WIDGET:
     case NS_MOUSE_EXIT_WIDGET:
       return true;
     default:
       return false;
     }
   case eTouchEventClass:
-    switch (aEvent.message) {
+    switch (aEvent.mMessage) {
     case NS_TOUCH_START:
     case NS_TOUCH_MOVE:
     case NS_TOUCH_END:
     case NS_TOUCH_CANCEL:
       return true;
     default:
       return false;
     }
   case eDragEventClass:
-    switch (aEvent.message) {
+    switch (aEvent.mMessage) {
     case NS_DRAGDROP_OVER:
     case NS_DRAGDROP_EXIT:
     case NS_DRAGDROP_DROP:
       return true;
     }
   default:
     return false;
   }
@@ -1210,17 +1210,17 @@ EventStateManager::HandleCrossProcessEve
   }
 
   // Collect the remote event targets we're going to forward this
   // event to.
   //
   // NB: the elements of |targets| must be unique, for correctness.
   nsAutoTArray<nsCOMPtr<nsIContent>, 1> targets;
   if (aEvent->mClass != eTouchEventClass ||
-      aEvent->message == NS_TOUCH_START) {
+      aEvent->mMessage == NS_TOUCH_START) {
     // If this event only has one target, and it's remote, add it to
     // the array.
     nsIFrame* frame = GetEventTarget();
     nsIContent* target = frame ? frame->GetContent() : nullptr;
     if (IsRemoteTarget(target)) {
       targets.AppendElement(target);
     }
   } else {
@@ -2583,17 +2583,17 @@ EventStateManager::DoScrollText(nsIScrol
   WheelPrefs::GetInstance()->CancelApplyingUserPrefsFromOverflowDelta(aEvent);
 }
 
 void
 EventStateManager::DecideGestureEvent(WidgetGestureNotifyEvent* aEvent,
                                       nsIFrame* targetFrame)
 {
 
-  NS_ASSERTION(aEvent->message == NS_GESTURENOTIFY_EVENT_START,
+  NS_ASSERTION(aEvent->mMessage == NS_GESTURENOTIFY_EVENT_START,
                "DecideGestureEvent called with a non-gesture event");
 
   /* Check the ancestor tree to decide if any frame is willing* to receive
    * a MozPixelScroll event. If that's the case, the current touch gesture
    * will be used as a pan gesture; otherwise it will be a regular
    * mousedown/mousemove/click event.
    *
    * *willing: determine if it makes sense to pan the element using scroll events:
@@ -2786,26 +2786,26 @@ EventStateManager::PostHandleEvent(nsPre
   bool dispatchedToContentProcess = HandleCrossProcessEvent(aEvent,
                                                             aStatus);
 
   mCurrentTarget = aTargetFrame;
   mCurrentTargetContent = nullptr;
 
   // Most of the events we handle below require a frame.
   // Add special cases here.
-  if (!mCurrentTarget && aEvent->message != NS_MOUSE_BUTTON_UP &&
-      aEvent->message != NS_MOUSE_BUTTON_DOWN) {
+  if (!mCurrentTarget && aEvent->mMessage != NS_MOUSE_BUTTON_UP &&
+      aEvent->mMessage != NS_MOUSE_BUTTON_DOWN) {
     return NS_OK;
   }
 
   //Keep the prescontext alive, we might need it after event dispatch
   nsRefPtr<nsPresContext> presContext = aPresContext;
   nsresult ret = NS_OK;
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
   case NS_MOUSE_BUTTON_DOWN:
     {
       WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
       if (mouseEvent->button == WidgetMouseEvent::eLeftButton &&
           !sNormalLMouseEventInProcess) {
         // We got a mouseup event while a mousedown event was being processed.
         // Make sure that the capturing content is cleared.
         nsIPresShell::SetCapturingContent(nullptr, 0);
@@ -3068,17 +3068,17 @@ EventStateManager::PostHandleEvent(nsPre
       }
       switch (action) {
         case WheelPrefs::ACTION_SCROLL: {
           // For scrolling of default action, we should honor the mouse wheel
           // transaction.
 
           ScrollbarsForWheel::PrepareToScrollText(this, aTargetFrame, wheelEvent);
 
-          if (aEvent->message != NS_WHEEL_WHEEL ||
+          if (aEvent->mMessage != NS_WHEEL_WHEEL ||
               (!wheelEvent->deltaX && !wheelEvent->deltaY)) {
             break;
           }
 
           nsIScrollableFrame* scrollTarget =
             ComputeScrollTarget(aTargetFrame, wheelEvent,
                                 COMPUTE_DEFAULT_ACTION_TARGET);
 
@@ -3232,23 +3232,23 @@ EventStateManager::PostHandleEvent(nsPre
           dropEffect = nsIDragService::DRAGDROP_ACTION_NONE;
 
         // inform the drag session that a drop is allowed on this node.
         dragSession->SetDragAction(action);
         dragSession->SetCanDrop(action != nsIDragService::DRAGDROP_ACTION_NONE);
 
         // For now, do this only for dragover.
         //XXXsmaug dragenter needs some more work.
-        if (aEvent->message == NS_DRAGDROP_OVER && !isChromeDoc) {
+        if (aEvent->mMessage == NS_DRAGDROP_OVER && !isChromeDoc) {
           // Someone has called preventDefault(), check whether is was on
           // content or chrome.
           dragSession->SetOnlyChromeDrop(
             !dragEvent->mDefaultPreventedOnContent);
         }
-      } else if (aEvent->message == NS_DRAGDROP_OVER && !isChromeDoc) {
+      } else if (aEvent->mMessage == NS_DRAGDROP_OVER && !isChromeDoc) {
         // No one called preventDefault(), so handle drop only in chrome.
         dragSession->SetOnlyChromeDrop(true);
       }
       if (ContentChild* child = ContentChild::GetSingleton()) {
         child->SendUpdateDropEffect(action, dropEffect);
       }
       if (dispatchedToContentProcess) {
         dragSession->SetCanDrop(true);
@@ -4053,31 +4053,31 @@ GetWindowInnerRectCenter(nsPIDOMWindow* 
     aContext->CSSPixelsToDevPixels(innerX - cssScreenX + innerWidth / 2),
     aContext->CSSPixelsToDevPixels(innerY - cssScreenY + innerHeight / 2));
 }
 
 void
 EventStateManager::GeneratePointerEnterExit(uint32_t aMessage, WidgetMouseEvent* aEvent)
 {
   WidgetPointerEvent pointerEvent(*aEvent);
-  pointerEvent.message = aMessage;
+  pointerEvent.mMessage = aMessage;
   GenerateMouseEnterExit(&pointerEvent);
 }
 
 void
 EventStateManager::GenerateMouseEnterExit(WidgetMouseEvent* aMouseEvent)
 {
   EnsureDocument(mPresContext);
   if (!mDocument)
     return;
 
   // Hold onto old target content through the event and reset after.
   nsCOMPtr<nsIContent> targetBeforeEvent = mCurrentTargetContent;
 
-  switch(aMouseEvent->message) {
+  switch(aMouseEvent->mMessage) {
   case NS_MOUSE_MOVE:
     {
       // Mouse movement is reported on the MouseEvent.movement{X,Y} fields.
       // Movement is calculated in UIEvent::GetMovementPoint() as:
       //   previous_mousemove_refPoint - current_mousemove_refPoint.
       if (sIsPointerLocked && aMouseEvent->widget) {
         // The pointer is locked. If the pointer is not located at the center of
         // the window, dispatch a synthetic mousemove to return the pointer there.
@@ -4263,17 +4263,17 @@ EventStateManager::SetPointerLock(nsIWid
 
 void
 EventStateManager::GenerateDragDropEnterExit(nsPresContext* aPresContext,
                                              WidgetDragEvent* aDragEvent)
 {
   //Hold onto old target content through the event and reset after.
   nsCOMPtr<nsIContent> targetBeforeEvent = mCurrentTargetContent;
 
-  switch(aDragEvent->message) {
+  switch(aDragEvent->mMessage) {
   case NS_DRAGDROP_OVER:
     {
       // when dragging from one frame to another, events are fired in the
       // order: dragexit, dragenter, dragleave
       if (sLastDragOverFrame != mCurrentTarget) {
         //We'll need the content, too, to check if it changed separately from the frames.
         nsCOMPtr<nsIContent> lastContent;
         nsCOMPtr<nsIContent> targetContent;
@@ -4415,56 +4415,56 @@ EventStateManager::SetClickCount(nsPresC
     }
     if (mouseContent && mouseContent->IsRootOfNativeAnonymousSubtree()) {
       mouseContentParent = mouseContent->GetParent();
     }
   }
 
   switch (aEvent->button) {
   case WidgetMouseEvent::eLeftButton:
-    if (aEvent->message == NS_MOUSE_BUTTON_DOWN) {
+    if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
       mLastLeftMouseDownContent = mouseContent;
       mLastLeftMouseDownContentParent = mouseContentParent;
-    } else if (aEvent->message == NS_MOUSE_BUTTON_UP) {
+    } else if (aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
       if (mLastLeftMouseDownContent == mouseContent ||
           mLastLeftMouseDownContentParent == mouseContent ||
           mLastLeftMouseDownContent == mouseContentParent) {
         aEvent->clickCount = mLClickCount;
         mLClickCount = 0;
       } else {
         aEvent->clickCount = 0;
       }
       mLastLeftMouseDownContent = nullptr;
       mLastLeftMouseDownContentParent = nullptr;
     }
     break;
 
   case WidgetMouseEvent::eMiddleButton:
-    if (aEvent->message == NS_MOUSE_BUTTON_DOWN) {
+    if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
       mLastMiddleMouseDownContent = mouseContent;
       mLastMiddleMouseDownContentParent = mouseContentParent;
-    } else if (aEvent->message == NS_MOUSE_BUTTON_UP) {
+    } else if (aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
       if (mLastMiddleMouseDownContent == mouseContent ||
           mLastMiddleMouseDownContentParent == mouseContent ||
           mLastMiddleMouseDownContent == mouseContentParent) {
         aEvent->clickCount = mMClickCount;
         mMClickCount = 0;
       } else {
         aEvent->clickCount = 0;
       }
       mLastMiddleMouseDownContent = nullptr;
       mLastMiddleMouseDownContentParent = nullptr;
     }
     break;
 
   case WidgetMouseEvent::eRightButton:
-    if (aEvent->message == NS_MOUSE_BUTTON_DOWN) {
+    if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
       mLastRightMouseDownContent = mouseContent;
       mLastRightMouseDownContentParent = mouseContentParent;
-    } else if (aEvent->message == NS_MOUSE_BUTTON_UP) {
+    } else if (aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
       if (mLastRightMouseDownContent == mouseContent ||
           mLastRightMouseDownContentParent == mouseContent ||
           mLastRightMouseDownContent == mouseContentParent) {
         aEvent->clickCount = mRClickCount;
         mRClickCount = 0;
       } else {
         aEvent->clickCount = 0;
       }
@@ -4568,18 +4568,18 @@ EventStateManager::GetEventTarget()
   nsIFrame* frame = shell->GetEventTargetFrame();
   return (mCurrentTarget = frame);
 }
 
 already_AddRefed<nsIContent>
 EventStateManager::GetEventTargetContent(WidgetEvent* aEvent)
 {
   if (aEvent &&
-      (aEvent->message == NS_FOCUS_CONTENT ||
-       aEvent->message == NS_BLUR_CONTENT)) {
+      (aEvent->mMessage == NS_FOCUS_CONTENT ||
+       aEvent->mMessage == NS_BLUR_CONTENT)) {
     nsCOMPtr<nsIContent> content = GetFocusedContent();
     return content.forget();
   }
 
   if (mCurrentTargetContent) {
     nsCOMPtr<nsIContent> content = mCurrentTargetContent;
     return content.forget();
   }
@@ -4937,17 +4937,17 @@ EventStateManager::ContentRemoved(nsIDoc
   ResetLastOverForContent(0, mMouseEnterLeaveHelper, aContent);
   mPointersEnterLeaveHelper.Enumerate(
     &EventStateManager::ResetLastOverForContent, aContent);
 }
 
 bool
 EventStateManager::EventStatusOK(WidgetGUIEvent* aEvent)
 {
-  return !(aEvent->message == NS_MOUSE_BUTTON_DOWN &&
+  return !(aEvent->mMessage == NS_MOUSE_BUTTON_DOWN &&
            aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton &&
            !sNormalLMouseEventInProcess);
 }
 
 //-------------------------------------------
 // Access Key Registration
 //-------------------------------------------
 void
@@ -5033,17 +5033,17 @@ EventStateManager::DoContentCommandEvent
   EnsureDocument(mPresContext);
   NS_ENSURE_TRUE(mDocument, NS_ERROR_FAILURE);
   nsCOMPtr<nsPIDOMWindow> window(mDocument->GetWindow());
   NS_ENSURE_TRUE(window, NS_ERROR_FAILURE);
 
   nsCOMPtr<nsPIWindowRoot> root = window->GetTopWindowRoot();
   NS_ENSURE_TRUE(root, NS_ERROR_FAILURE);
   const char* cmd;
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_CONTENT_COMMAND_CUT:
       cmd = "cmd_cut";
       break;
     case NS_CONTENT_COMMAND_COPY:
       cmd = "cmd_copy";
       break;
     case NS_CONTENT_COMMAND_PASTE:
       cmd = "cmd_paste";
@@ -5071,17 +5071,17 @@ EventStateManager::DoContentCommandEvent
     // command isn't supported.
     aEvent->mIsEnabled = false;
   } else {
     bool canDoIt;
     rv = controller->IsCommandEnabled(cmd, &canDoIt);
     NS_ENSURE_SUCCESS(rv, rv);
     aEvent->mIsEnabled = canDoIt;
     if (canDoIt && !aEvent->mOnlyEnabledCheck) {
-      switch (aEvent->message) {
+      switch (aEvent->mMessage) {
         case NS_CONTENT_COMMAND_PASTE_TRANSFERABLE: {
           nsCOMPtr<nsICommandController> commandController = do_QueryInterface(controller);
           NS_ENSURE_STATE(commandController);
 
           nsCOMPtr<nsICommandParams> params = do_CreateInstance("@mozilla.org/embedcomp/command-params;1", &rv);
           NS_ENSURE_SUCCESS(rv, rv);
 
           rv = params->SetISupportsValue("transferable", aEvent->mTransferable);
@@ -5725,32 +5725,33 @@ EventStateManager::Prefs::GetAccessModif
 /* mozilla::AutoHandlingUserInputStatePusher                      */
 /******************************************************************/
 
 AutoHandlingUserInputStatePusher::AutoHandlingUserInputStatePusher(
                                     bool aIsHandlingUserInput,
                                     WidgetEvent* aEvent,
                                     nsIDocument* aDocument) :
   mIsHandlingUserInput(aIsHandlingUserInput),
-  mIsMouseDown(aEvent && aEvent->message == NS_MOUSE_BUTTON_DOWN),
+  mIsMouseDown(aEvent && aEvent->mMessage == NS_MOUSE_BUTTON_DOWN),
   mResetFMMouseButtonHandlingState(false)
 {
   if (!aIsHandlingUserInput) {
     return;
   }
   EventStateManager::StartHandlingUserInput();
   if (mIsMouseDown) {
     nsIPresShell::SetCapturingContent(nullptr, 0);
     nsIPresShell::AllowMouseCapture(true);
   }
   if (!aDocument || !aEvent || !aEvent->mFlags.mIsTrusted) {
     return;
   }
-  mResetFMMouseButtonHandlingState = (aEvent->message == NS_MOUSE_BUTTON_DOWN ||
-                                      aEvent->message == NS_MOUSE_BUTTON_UP);
+  mResetFMMouseButtonHandlingState =
+    (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN ||
+     aEvent->mMessage == NS_MOUSE_BUTTON_UP);
   if (mResetFMMouseButtonHandlingState) {
     nsFocusManager* fm = nsFocusManager::GetFocusManager();
     NS_ENSURE_TRUE_VOID(fm);
     // If it's in modal state, mouse button event handling may be nested.
     // E.g., a modal dialog is opened at mousedown or mouseup event handler
     // and the dialog is clicked.  Therefore, we should store current
     // mouse button event handling document if nsFocusManager already has it.
     mMouseButtonEventHandlingDocument =
--- a/dom/events/EventStateManager.h
+++ b/dom/events/EventStateManager.h
@@ -952,12 +952,12 @@ private:
 };
 
 } // namespace mozilla
 
 // Click and double-click events need to be handled even for content that
 // has no frame. This is required for Web compatibility.
 #define NS_EVENT_NEEDS_FRAME(event) \
     (!(event)->HasPluginActivationEventMessage() && \
-     (event)->message != NS_MOUSE_CLICK && \
-     (event)->message != NS_MOUSE_DOUBLECLICK)
+     (event)->mMessage != NS_MOUSE_CLICK && \
+     (event)->mMessage != NS_MOUSE_DOUBLECLICK)
 
 #endif // mozilla_EventStateManager_h_
--- a/dom/events/IMEContentObserver.cpp
+++ b/dom/events/IMEContentObserver.cpp
@@ -451,17 +451,17 @@ IMEContentObserver::OnMouseButtonEvent(n
     return false;
   }
   if (!aMouseEvent->mFlags.mIsTrusted ||
       aMouseEvent->mFlags.mDefaultPrevented ||
       !aMouseEvent->widget) {
     return false;
   }
   // Now, we need to notify only mouse down and mouse up event.
-  switch (aMouseEvent->message) {
+  switch (aMouseEvent->mMessage) {
     case NS_MOUSE_BUTTON_UP:
     case NS_MOUSE_BUTTON_DOWN:
       break;
     default:
       return false;
   }
   if (NS_WARN_IF(!mWidget) || NS_WARN_IF(mWidget->Destroyed())) {
     return false;
@@ -496,17 +496,17 @@ IMEContentObserver::OnMouseButtonEvent(n
   // The refPt is relative to its widget.
   // We should notify it with offset in the widget.
   if (aMouseEvent->widget != mWidget) {
     charAtPt.refPoint += aMouseEvent->widget->WidgetToScreenOffset() -
       mWidget->WidgetToScreenOffset();
   }
 
   IMENotification notification(NOTIFY_IME_OF_MOUSE_BUTTON_EVENT);
-  notification.mMouseButtonEventData.mEventMessage = aMouseEvent->message;
+  notification.mMouseButtonEventData.mEventMessage = aMouseEvent->mMessage;
   notification.mMouseButtonEventData.mOffset = charAtPt.mReply.mOffset;
   notification.mMouseButtonEventData.mCursorPos.Set(
     LayoutDeviceIntPoint::ToUntyped(charAtPt.refPoint));
   notification.mMouseButtonEventData.mCharRect.Set(
     LayoutDevicePixel::ToUntyped(charAtPt.mReply.mRect));
   notification.mMouseButtonEventData.mButton = aMouseEvent->button;
   notification.mMouseButtonEventData.mButtons = aMouseEvent->buttons;
   notification.mMouseButtonEventData.mModifiers = aMouseEvent->modifiers;
--- a/dom/events/IMEStateManager.cpp
+++ b/dom/events/IMEStateManager.cpp
@@ -1132,51 +1132,51 @@ IMEStateManager::DispatchCompositionEven
       TabParent::GetFrom(aEventTargetNode->AsContent()) : nullptr;
 
   MOZ_LOG(sISMLog, LogLevel::Info,
     ("ISM: IMEStateManager::DispatchCompositionEvent(aNode=0x%p, "
      "aPresContext=0x%p, aCompositionEvent={ message=%s, "
      "mFlags={ mIsTrusted=%s, mPropagationStopped=%s } }, "
      "aIsSynthesized=%s), tabParent=%p",
      aEventTargetNode, aPresContext,
-     GetEventMessageName(aCompositionEvent->message),
+     GetEventMessageName(aCompositionEvent->mMessage),
      GetBoolName(aCompositionEvent->mFlags.mIsTrusted),
      GetBoolName(aCompositionEvent->mFlags.mPropagationStopped),
      GetBoolName(aIsSynthesized), tabParent.get()));
 
   if (!aCompositionEvent->mFlags.mIsTrusted ||
       aCompositionEvent->mFlags.mPropagationStopped) {
     return;
   }
 
-  MOZ_ASSERT(aCompositionEvent->message != NS_COMPOSITION_UPDATE,
+  MOZ_ASSERT(aCompositionEvent->mMessage != NS_COMPOSITION_UPDATE,
              "compositionupdate event shouldn't be dispatched manually");
 
   EnsureTextCompositionArray();
 
   nsRefPtr<TextComposition> composition =
     sTextCompositions->GetCompositionFor(aCompositionEvent->widget);
   if (!composition) {
     // If synthesized event comes after delayed native composition events
     // for request of commit or cancel, we should ignore it.
     if (NS_WARN_IF(aIsSynthesized)) {
       return;
     }
     MOZ_LOG(sISMLog, LogLevel::Debug,
       ("ISM:   IMEStateManager::DispatchCompositionEvent(), "
        "adding new TextComposition to the array"));
-    MOZ_ASSERT(aCompositionEvent->message == NS_COMPOSITION_START);
+    MOZ_ASSERT(aCompositionEvent->mMessage == NS_COMPOSITION_START);
     composition =
       new TextComposition(aPresContext, aEventTargetNode, tabParent,
                           aCompositionEvent);
     sTextCompositions->AppendElement(composition);
   }
 #ifdef DEBUG
   else {
-    MOZ_ASSERT(aCompositionEvent->message != NS_COMPOSITION_START);
+    MOZ_ASSERT(aCompositionEvent->mMessage != NS_COMPOSITION_START);
   }
 #endif // #ifdef DEBUG
 
   // Dispatch the event on composing target.
   composition->DispatchCompositionEvent(aCompositionEvent, aStatus, aCallBack,
                                         aIsSynthesized);
 
   // WARNING: the |composition| might have been destroyed already.
@@ -1227,20 +1227,20 @@ IMEStateManager::HandleSelectionEvent(ns
   nsIContent* eventTargetContent =
     aEventTargetContent ? aEventTargetContent :
                           GetRootContent(aPresContext);
   nsRefPtr<TabParent> tabParent =
     eventTargetContent ? TabParent::GetFrom(eventTargetContent) : nullptr;
 
   MOZ_LOG(sISMLog, LogLevel::Info,
     ("ISM: IMEStateManager::HandleSelectionEvent(aPresContext=0x%p, "
-     "aEventTargetContent=0x%p, aSelectionEvent={ message=%s, "
+     "aEventTargetContent=0x%p, aSelectionEvent={ mMessage=%s, "
      "mFlags={ mIsTrusted=%s } }), tabParent=%p",
      aPresContext, aEventTargetContent,
-     GetEventMessageName(aSelectionEvent->message),
+     GetEventMessageName(aSelectionEvent->mMessage),
      GetBoolName(aSelectionEvent->mFlags.mIsTrusted),
      tabParent.get()));
 
   if (!aSelectionEvent->mFlags.mIsTrusted) {
     return;
   }
 
   nsRefPtr<TextComposition> composition = sTextCompositions ?
@@ -1262,27 +1262,27 @@ void
 IMEStateManager::OnCompositionEventDiscarded(
                    WidgetCompositionEvent* aCompositionEvent)
 {
   // Note that this method is never called for synthesized events for emulating
   // commit or cancel composition.
 
   MOZ_LOG(sISMLog, LogLevel::Info,
     ("ISM: IMEStateManager::OnCompositionEventDiscarded(aCompositionEvent={ "
-     "message=%s, mFlags={ mIsTrusted=%s } })",
-     GetEventMessageName(aCompositionEvent->message),
+     "mMessage=%s, mFlags={ mIsTrusted=%s } })",
+     GetEventMessageName(aCompositionEvent->mMessage),
      GetBoolName(aCompositionEvent->mFlags.mIsTrusted)));
 
   if (!aCompositionEvent->mFlags.mIsTrusted) {
     return;
   }
 
   // Ignore compositionstart for now because sTextCompositions may not have
   // been created yet.
-  if (aCompositionEvent->message == NS_COMPOSITION_START) {
+  if (aCompositionEvent->mMessage == NS_COMPOSITION_START) {
     return;
   }
 
   nsRefPtr<TextComposition> composition =
     sTextCompositions->GetCompositionFor(aCompositionEvent->widget);
   if (!composition) {
     // If the PresShell has been being destroyed during composition,
     // a TextComposition instance for the composition was already removed from
--- a/dom/events/InternalMutationEvent.h
+++ b/dom/events/InternalMutationEvent.h
@@ -25,17 +25,17 @@ public:
   {
     mFlags.mCancelable = false;
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eMutationEventClass,
                "Duplicate() must be overridden by sub class");
-    InternalMutationEvent* result = new InternalMutationEvent(false, message);
+    InternalMutationEvent* result = new InternalMutationEvent(false, mMessage);
     result->AssignMutationEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   nsCOMPtr<nsIDOMNode> mRelatedNode;
   nsCOMPtr<nsIAtom>    mAttrName;
   nsCOMPtr<nsIAtom>    mPrevAttrValue;
--- a/dom/events/KeyboardEvent.cpp
+++ b/dom/events/KeyboardEvent.cpp
@@ -146,17 +146,17 @@ KeyboardEvent::GetCharCode(uint32_t* aCh
 uint32_t
 KeyboardEvent::CharCode()
 {
   // If this event is initialized with ctor, we shouldn't check event type.
   if (mInitializedByCtor) {
     return mEvent->AsKeyboardEvent()->charCode;
   }
 
-  switch (mEvent->message) {
+  switch (mEvent->mMessage) {
   case NS_KEY_BEFORE_DOWN:
   case NS_KEY_DOWN:
   case NS_KEY_AFTER_DOWN:
   case NS_KEY_BEFORE_UP:
   case NS_KEY_UP:
   case NS_KEY_AFTER_UP:
     return 0;
   case NS_KEY_PRESS:
@@ -190,17 +190,17 @@ KeyboardEvent::KeyCode()
 uint32_t
 KeyboardEvent::Which()
 {
   // If this event is initialized with ctor, which can have independent value.
   if (mInitializedByCtor) {
     return mInitializedWhichValue;
   }
 
-  switch (mEvent->message) {
+  switch (mEvent->mMessage) {
     case NS_KEY_BEFORE_DOWN:
     case NS_KEY_DOWN:
     case NS_KEY_AFTER_DOWN:
     case NS_KEY_BEFORE_UP:
     case NS_KEY_UP:
     case NS_KEY_AFTER_UP:
       return KeyCode();
     case NS_KEY_PRESS:
--- a/dom/events/NotifyPaintEvent.cpp
+++ b/dom/events/NotifyPaintEvent.cpp
@@ -18,17 +18,17 @@ namespace dom {
 NotifyPaintEvent::NotifyPaintEvent(EventTarget* aOwner,
                                    nsPresContext* aPresContext,
                                    WidgetEvent* aEvent,
                                    uint32_t aEventType,
                                    nsInvalidateRequestList* aInvalidateRequests)
   : Event(aOwner, aPresContext, aEvent)
 {
   if (mEvent) {
-    mEvent->message = aEventType;
+    mEvent->mMessage = aEventType;
   }
   if (aInvalidateRequests) {
     mInvalidateRequests.AppendElements(Move(aInvalidateRequests->mRequests));
   }
 }
 
 NS_INTERFACE_MAP_BEGIN(NotifyPaintEvent)
   NS_INTERFACE_MAP_ENTRY(nsIDOMNotifyPaintEvent)
--- a/dom/events/TextComposition.cpp
+++ b/dom/events/TextComposition.cpp
@@ -228,31 +228,31 @@ TextComposition::DispatchCompositionEven
     }
     return;
   }
 
   if (!mAllowControlCharacters) {
     RemoveControlCharactersFrom(aCompositionEvent->mData,
                                 aCompositionEvent->mRanges);
   }
-  if (aCompositionEvent->message == NS_COMPOSITION_COMMIT_AS_IS) {
+  if (aCompositionEvent->mMessage == NS_COMPOSITION_COMMIT_AS_IS) {
     NS_ASSERTION(!aCompositionEvent->mRanges,
                  "mRanges of NS_COMPOSITION_COMMIT_AS_IS should be null");
     aCompositionEvent->mRanges = nullptr;
     NS_ASSERTION(aCompositionEvent->mData.IsEmpty(),
                  "mData of NS_COMPOSITION_COMMIT_AS_IS should be empty string");
     if (mLastData == IDEOGRAPHIC_SPACE) {
       // If the last data is an ideographic space (FullWidth space), it must be
       // a placeholder character of some Chinese IME.  So, committing with
       // this data must not be expected by users.  Let's use empty string.
       aCompositionEvent->mData.Truncate();
     } else {
       aCompositionEvent->mData = mLastData;
     }
-  } else if (aCompositionEvent->message == NS_COMPOSITION_COMMIT) {
+  } else if (aCompositionEvent->mMessage == NS_COMPOSITION_COMMIT) {
     NS_ASSERTION(!aCompositionEvent->mRanges,
                  "mRanges of NS_COMPOSITION_COMMIT should be null");
     aCompositionEvent->mRanges = nullptr;
   }
 
   if (!IsValidStateForComposition(aCompositionEvent->widget)) {
     *aStatus = nsEventStatus_eConsumeNoDefault;
     return;
@@ -277,17 +277,17 @@ TextComposition::DispatchCompositionEven
   // Note that most Chinese IMEs don't expose actual composition string to us.
   // They typically tell us an IDEOGRAPHIC SPACE or empty string as composition
   // string.  Therefore, we should hack it only when:
   // 1. committing string is empty string at requesting commit but the last
   //    data isn't IDEOGRAPHIC SPACE.
   // 2. non-empty string is committed at requesting cancel.
   if (!aIsSynthesized && (mIsRequestingCommit || mIsRequestingCancel)) {
     nsString* committingData = nullptr;
-    switch (aCompositionEvent->message) {
+    switch (aCompositionEvent->mMessage) {
       case NS_COMPOSITION_END:
       case NS_COMPOSITION_CHANGE:
       case NS_COMPOSITION_COMMIT_AS_IS:
       case NS_COMPOSITION_COMMIT:
         committingData = &aCompositionEvent->mData;
         break;
       default:
         NS_WARNING("Unexpected event comes during committing or "
@@ -307,26 +307,26 @@ TextComposition::DispatchCompositionEven
   bool dispatchEvent = true;
   bool dispatchDOMTextEvent = aCompositionEvent->CausesDOMTextEvent();
 
   // When mIsComposing is false but the committing string is different from
   // the last data (E.g., previous NS_COMPOSITION_CHANGE event made the
   // composition string empty or didn't have clause information), we don't
   // need to dispatch redundant DOM text event.
   if (dispatchDOMTextEvent &&
-      aCompositionEvent->message != NS_COMPOSITION_CHANGE &&
+      aCompositionEvent->mMessage != NS_COMPOSITION_CHANGE &&
       !mIsComposing && mLastData == aCompositionEvent->mData) {
     dispatchEvent = dispatchDOMTextEvent = false;
   }
 
   // widget may dispatch redundant NS_COMPOSITION_CHANGE event
   // which modifies neither composition string, clauses nor caret
   // position.  In such case, we shouldn't dispatch DOM events.
   if (dispatchDOMTextEvent &&
-      aCompositionEvent->message == NS_COMPOSITION_CHANGE &&
+      aCompositionEvent->mMessage == NS_COMPOSITION_CHANGE &&
       mLastData == aCompositionEvent->mData &&
       mRanges && aCompositionEvent->mRanges &&
       mRanges->Equals(*aCompositionEvent->mRanges)) {
     dispatchEvent = dispatchDOMTextEvent = false;
   }
 
   if (dispatchDOMTextEvent) {
     if (!MaybeDispatchCompositionUpdate(aCompositionEvent)) {
@@ -335,17 +335,17 @@ TextComposition::DispatchCompositionEven
   }
 
   if (dispatchEvent) {
     // If the composition event should cause a DOM text event, we should
     // overwrite the event message as NS_COMPOSITION_CHANGE because due to
     // the limitation of mapping between event messages and DOM event types,
     // we cannot map multiple event messages to a DOM event type.
     if (dispatchDOMTextEvent &&
-        aCompositionEvent->message != NS_COMPOSITION_CHANGE) {
+        aCompositionEvent->mMessage != NS_COMPOSITION_CHANGE) {
       aCompositionEvent->mFlags =
         CloneAndDispatchAs(aCompositionEvent, NS_COMPOSITION_CHANGE,
                            aStatus, aCallBack);
     } else {
       EventDispatcher::Dispatch(mNode, mPresContext,
                                 aCompositionEvent, nullptr, aStatus, aCallBack);
     }
   } else {
@@ -360,17 +360,17 @@ TextComposition::DispatchCompositionEven
   // if no editor handles composition events.
   if (dispatchDOMTextEvent && !HasEditor()) {
     EditorWillHandleCompositionChangeEvent(aCompositionEvent);
     EditorDidHandleCompositionChangeEvent();
   }
 
   if (aCompositionEvent->CausesDOMCompositionEndEvent()) {
     // Dispatch a compositionend event if it's necessary.
-    if (aCompositionEvent->message != NS_COMPOSITION_END) {
+    if (aCompositionEvent->mMessage != NS_COMPOSITION_END) {
       CloneAndDispatchAs(aCompositionEvent, NS_COMPOSITION_END);
     }
     MOZ_ASSERT(!mIsComposing, "Why is the editor still composing?");
     MOZ_ASSERT(!HasEditor(), "Why does the editor still keep to hold this?");
   }
 
   // Notify composition update to widget if possible
   NotityUpdateComposition(aCompositionEvent);
@@ -406,17 +406,17 @@ TextComposition::NotityUpdateComposition
 {
   MOZ_RELEASE_ASSERT(!mTabParent);
 
   nsEventStatus status;
 
   // When compositon start, notify the rect of first offset character.
   // When not compositon start, notify the rect of selected composition
   // string if compositionchange event.
-  if (aCompositionEvent->message == NS_COMPOSITION_START) {
+  if (aCompositionEvent->mMessage == NS_COMPOSITION_START) {
     nsCOMPtr<nsIWidget> widget = mPresContext->GetRootWidget();
     // Update composition start offset
     WidgetQueryContentEvent selectedTextEvent(true,
                                               NS_QUERY_SELECTED_TEXT,
                                               widget);
     widget->DispatchEvent(&selectedTextEvent, status);
     if (selectedTextEvent.mSucceeded) {
       mCompositionStartOffset = selectedTextEvent.mReply.mOffset;
--- a/dom/events/TouchEvent.cpp
+++ b/dom/events/TouchEvent.cpp
@@ -116,17 +116,18 @@ TouchEvent::InitTouchEvent(const nsAStri
   mChangedTouches = aChangedTouches;
 }
 
 TouchList*
 TouchEvent::Touches()
 {
   if (!mTouches) {
     WidgetTouchEvent* touchEvent = mEvent->AsTouchEvent();
-    if (mEvent->message == NS_TOUCH_END || mEvent->message == NS_TOUCH_CANCEL) {
+    if (mEvent->mMessage == NS_TOUCH_END ||
+        mEvent->mMessage == NS_TOUCH_CANCEL) {
       // for touchend events, remove any changed touches from the touches array
       WidgetTouchEvent::AutoTouchArray unchangedTouches;
       const WidgetTouchEvent::TouchArray& touches = touchEvent->touches;
       for (uint32_t i = 0; i < touches.Length(); ++i) {
         if (!touches[i]->mChanged) {
           unchangedTouches.AppendElement(touches[i]);
         }
       }
@@ -143,18 +144,18 @@ TouchEvent::TargetTouches()
 {
   if (!mTargetTouches) {
     WidgetTouchEvent::AutoTouchArray targetTouches;
     WidgetTouchEvent* touchEvent = mEvent->AsTouchEvent();
     const WidgetTouchEvent::TouchArray& touches = touchEvent->touches;
     for (uint32_t i = 0; i < touches.Length(); ++i) {
       // for touchend/cancel events, don't append to the target list if this is a
       // touch that is ending
-      if ((mEvent->message != NS_TOUCH_END &&
-           mEvent->message != NS_TOUCH_CANCEL) || !touches[i]->mChanged) {
+      if ((mEvent->mMessage != NS_TOUCH_END &&
+           mEvent->mMessage != NS_TOUCH_CANCEL) || !touches[i]->mChanged) {
         if (touches[i]->mTarget == mEvent->originalTarget) {
           targetTouches.AppendElement(touches[i]);
         }
       }
     }
     mTargetTouches = new TouchList(ToSupports(this), targetTouches);
   }
   return mTargetTouches;
--- a/dom/events/WheelHandlingHelper.cpp
+++ b/dom/events/WheelHandlingHelper.cpp
@@ -89,17 +89,17 @@ WheelTransaction::OwnScrollbars(bool aOw
   sOwnScrollbars = aOwn;
 }
 
 /* static */ void
 WheelTransaction::BeginTransaction(nsIFrame* aTargetFrame,
                                    WidgetWheelEvent* aEvent)
 {
   NS_ASSERTION(!sTargetFrame, "previous transaction is not finished!");
-  MOZ_ASSERT(aEvent->message == NS_WHEEL_WHEEL,
+  MOZ_ASSERT(aEvent->mMessage == NS_WHEEL_WHEEL,
              "Transaction must be started with a wheel event");
   ScrollbarsForWheel::OwnWheelTransaction(false);
   sTargetFrame = aTargetFrame;
   sScrollSeriesCounter = 0;
   if (!UpdateTransaction(aEvent)) {
     NS_ERROR("BeginTransaction is called even cannot scroll the frame");
     EndTransaction();
   }
@@ -170,17 +170,17 @@ WheelTransaction::OnEvent(WidgetEvent* a
     // Even if the scroll event which is handled after timeout, but onTimeout
     // was not fired by timer, then the scroll event will scroll old frame,
     // therefore, we should call OnTimeout here and ensure to finish the old
     // transaction.
     OnTimeout(nullptr, nullptr);
     return;
   }
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_WHEEL_WHEEL:
       if (sMouseMoved != 0 &&
           OutOfTime(sMouseMoved, GetIgnoreMoveDelayTime())) {
         // Terminate the current mousewheel transaction if the mouse moved more
         // than ignoremovedelay milliseconds ago
         EndTransaction();
       }
       return;
@@ -408,17 +408,17 @@ nsWeakFrame ScrollbarsForWheel::sActivat
 bool ScrollbarsForWheel::sHadWheelStart = false;
 bool ScrollbarsForWheel::sOwnWheelTransaction = false;
 
 /* static */ void
 ScrollbarsForWheel::PrepareToScrollText(EventStateManager* aESM,
                                         nsIFrame* aTargetFrame,
                                         WidgetWheelEvent* aEvent)
 {
-  if (aEvent->message == NS_WHEEL_START) {
+  if (aEvent->mMessage == NS_WHEEL_START) {
     WheelTransaction::OwnScrollbars(false);
     if (!IsActive()) {
       TemporarilyActivateAllPossibleScrollTargets(aESM, aTargetFrame, aEvent);
       sHadWheelStart = true;
     }
   } else {
     DeactivateAllTemporarilyActivatedScrollTargets();
   }
--- a/dom/html/HTMLButtonElement.cpp
+++ b/dom/html/HTMLButtonElement.cpp
@@ -206,28 +206,28 @@ HTMLButtonElement::IsDisabledForEvents(u
   nsIFrame* formFrame = do_QueryFrame(formControlFrame);
   return IsElementDisabledForEvents(aMessage, formFrame);
 }
 
 nsresult
 HTMLButtonElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
   aVisitor.mCanHandle = false;
-  if (IsDisabledForEvents(aVisitor.mEvent->message)) {
+  if (IsDisabledForEvents(aVisitor.mEvent->mMessage)) {
     return NS_OK;
   }
 
   // Track whether we're in the outermost Dispatch invocation that will
   // cause activation of the input.  That is, if we're a click event, or a
   // DOMActivate that was dispatched directly, this will be set, but if we're
   // a DOMActivate dispatched from click handling, it will not be set.
   WidgetMouseEvent* mouseEvent = aVisitor.mEvent->AsMouseEvent();
   bool outerActivateEvent =
     ((mouseEvent && mouseEvent->IsLeftClickEvent()) ||
-     (aVisitor.mEvent->message == NS_UI_ACTIVATE &&
+     (aVisitor.mEvent->mMessage == NS_UI_ACTIVATE &&
       !mInInternalActivate));
 
   if (outerActivateEvent) {
     aVisitor.mItemFlags |= NS_OUTER_ACTIVATE_EVENT;
     if (mType == NS_FORM_BUTTON_SUBMIT && mForm) {
       aVisitor.mItemFlags |= NS_IN_SUBMIT_CLICK;
       // tell the form that we are about to enter a click handler.
       // that means that if there are scripted submissions, the
@@ -277,27 +277,27 @@ HTMLButtonElement::PostHandleEvent(Event
     // tell the form that we are about to exit a click handler
     // so the form knows not to defer subsequent submissions
     // the pending ones that were created during the handler
     // will be flushed or forgoten.
     mForm->OnSubmitClickEnd();
   }
 
   if (nsEventStatus_eIgnore == aVisitor.mEventStatus) {
-    switch (aVisitor.mEvent->message) {
+    switch (aVisitor.mEvent->mMessage) {
       case NS_KEY_PRESS:
       case NS_KEY_UP:
         {
           // For backwards compat, trigger buttons with space or enter
           // (bug 25300)
           WidgetKeyboardEvent* keyEvent = aVisitor.mEvent->AsKeyboardEvent();
           if ((keyEvent->keyCode == NS_VK_RETURN &&
-               NS_KEY_PRESS == aVisitor.mEvent->message) ||
+               NS_KEY_PRESS == aVisitor.mEvent->mMessage) ||
               (keyEvent->keyCode == NS_VK_SPACE &&
-               NS_KEY_UP == aVisitor.mEvent->message)) {
+               NS_KEY_UP == aVisitor.mEvent->mMessage)) {
             nsEventStatus status = nsEventStatus_eIgnore;
 
             WidgetMouseEvent event(aVisitor.mEvent->mFlags.mIsTrusted,
                                    NS_MOUSE_CLICK, nullptr,
                                    WidgetMouseEvent::eReal);
             event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD;
             EventDispatcher::Dispatch(static_cast<nsIContent*>(this),
                                       aVisitor.mPresContext, &event, nullptr,
@@ -378,17 +378,17 @@ HTMLButtonElement::PostHandleEvent(Event
         nsCOMPtr<nsIPresShell> presShell =
           aVisitor.mPresContext->GetPresShell();
         // If |nsIPresShell::Destroy| has been called due to
         // handling the event, the pres context will return
         // a null pres shell.  See bug 125624.
         //
         // Using presShell to dispatch the event. It makes sure that
         // event is not handled if the window is being destroyed.
-        if (presShell && (event.message != NS_FORM_SUBMIT ||
+        if (presShell && (event.mMessage != NS_FORM_SUBMIT ||
                           mForm->HasAttr(kNameSpaceID_None, nsGkAtoms::novalidate) ||
                           // We know the element is a submit control, if this check is moved,
                           // make sure formnovalidate is used only if it's a submit control.
                           HasAttr(kNameSpaceID_None, nsGkAtoms::formnovalidate) ||
                           mForm->CheckValidFormSubmission())) {
           // TODO: removing this code and have the submit event sent by the form
           // see bug 592124.
           // Hold a strong ref while dispatching
--- a/dom/html/HTMLFieldSetElement.cpp
+++ b/dom/html/HTMLFieldSetElement.cpp
@@ -69,17 +69,17 @@ HTMLFieldSetElement::IsDisabledForEvents
 }
 
 // nsIContent
 nsresult
 HTMLFieldSetElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
   // Do not process any DOM events if the element is disabled.
   aVisitor.mCanHandle = false;
-  if (IsDisabledForEvents(aVisitor.mEvent->message)) {
+  if (IsDisabledForEvents(aVisitor.mEvent->mMessage)) {
     return NS_OK;
   }
 
   return nsGenericHTMLFormElement::PreHandleEvent(aVisitor);
 }
 
 nsresult
 HTMLFieldSetElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
--- a/dom/html/HTMLFormElement.cpp
+++ b/dom/html/HTMLFormElement.cpp
@@ -487,17 +487,17 @@ HTMLFormElement::UnbindFromTree(bool aDe
   ForgetCurrentSubmission();
 }
 
 nsresult
 HTMLFormElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
   aVisitor.mWantsWillHandleEvent = true;
   if (aVisitor.mEvent->originalTarget == static_cast<nsIContent*>(this)) {
-    uint32_t msg = aVisitor.mEvent->message;
+    uint32_t msg = aVisitor.mEvent->mMessage;
     if (msg == NS_FORM_SUBMIT) {
       if (mGeneratingSubmit) {
         aVisitor.mCanHandle = false;
         return NS_OK;
       }
       mGeneratingSubmit = true;
 
       // let the form know that it needs to defer the submission,
@@ -517,30 +517,30 @@ HTMLFormElement::PreHandleEvent(EventCha
 }
 
 nsresult
 HTMLFormElement::WillHandleEvent(EventChainPostVisitor& aVisitor)
 {
   // If this is the bubble stage and there is a nested form below us which
   // received a submit event we do *not* want to handle the submit event
   // for this form too.
-  if ((aVisitor.mEvent->message == NS_FORM_SUBMIT ||
-       aVisitor.mEvent->message == NS_FORM_RESET) &&
+  if ((aVisitor.mEvent->mMessage == NS_FORM_SUBMIT ||
+       aVisitor.mEvent->mMessage == NS_FORM_RESET) &&
       aVisitor.mEvent->mFlags.mInBubblingPhase &&
       aVisitor.mEvent->originalTarget != static_cast<nsIContent*>(this)) {
     aVisitor.mEvent->mFlags.mPropagationStopped = true;
   }
   return NS_OK;
 }
 
 nsresult
 HTMLFormElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
 {
   if (aVisitor.mEvent->originalTarget == static_cast<nsIContent*>(this)) {
-    uint32_t msg = aVisitor.mEvent->message;
+    uint32_t msg = aVisitor.mEvent->mMessage;
     if (msg == NS_FORM_SUBMIT) {
       // let the form know not to defer subsequent submissions
       mDeferSubmission = false;
     }
 
     if (aVisitor.mEventStatus == nsEventStatus_eIgnore) {
       switch (msg) {
         case NS_FORM_RESET:
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -3020,17 +3020,17 @@ HTMLInputElement::NeedToInitializeEditor
   // certain types of events, because we know that those events are safe to be
   // handled without the editor being initialized.  These events include:
   // mousein/move/out, overflow/underflow, and DOM mutation events.
   if (!IsSingleLineTextControl(false) ||
       aVisitor.mEvent->mClass == eMutationEventClass) {
     return false;
   }
 
-  switch (aVisitor.mEvent->message) {
+  switch (aVisitor.mEvent->mMessage) {
   case NS_MOUSE_MOVE:
   case NS_MOUSE_ENTER_WIDGET:
   case NS_MOUSE_EXIT_WIDGET:
   case NS_MOUSE_OVER:
   case NS_MOUSE_OUT:
   case NS_SCROLLPORT_UNDERFLOW:
   case NS_SCROLLPORT_OVERFLOW:
     return false;
@@ -3045,17 +3045,17 @@ HTMLInputElement::IsDisabledForEvents(ui
   return IsElementDisabledForEvents(aMessage, GetPrimaryFrame());
 }
 
 nsresult
 HTMLInputElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
   // Do not process any DOM events if the element is disabled
   aVisitor.mCanHandle = false;
-  if (IsDisabledForEvents(aVisitor.mEvent->message)) {
+  if (IsDisabledForEvents(aVisitor.mEvent->mMessage)) {
     return NS_OK;
   }
 
   // Initialize the editor if needed.
   if (NeedToInitializeEditorForEvent(aVisitor)) {
     nsITextControlFrame* textControlFrame = do_QueryFrame(GetPrimaryFrame());
     if (textControlFrame)
       textControlFrame->EnsureEditorInitialized();
@@ -3083,17 +3083,17 @@ HTMLInputElement::PreHandleEvent(EventCh
 
   // Track whether we're in the outermost Dispatch invocation that will
   // cause activation of the input.  That is, if we're a click event, or a
   // DOMActivate that was dispatched directly, this will be set, but if we're
   // a DOMActivate dispatched from click handling, it will not be set.
   WidgetMouseEvent* mouseEvent = aVisitor.mEvent->AsMouseEvent();
   bool outerActivateEvent =
     ((mouseEvent && mouseEvent->IsLeftClickEvent()) ||
-     (aVisitor.mEvent->message == NS_UI_ACTIVATE && !mInInternalActivate));
+     (aVisitor.mEvent->mMessage == NS_UI_ACTIVATE && !mInInternalActivate));
 
   if (outerActivateEvent) {
     aVisitor.mItemFlags |= NS_OUTER_ACTIVATE_EVENT;
   }
 
   bool originalCheckedValue = false;
 
   if (outerActivateEvent) {
@@ -3148,43 +3148,43 @@ HTMLInputElement::PreHandleEvent(EventCh
 
   // If mNoContentDispatch is true we will not allow content to handle
   // this event.  But to allow middle mouse button paste to work we must allow
   // middle clicks to go to text fields anyway.
   if (aVisitor.mEvent->mFlags.mNoContentDispatch) {
     aVisitor.mItemFlags |= NS_NO_CONTENT_DISPATCH;
   }
   if (IsSingleLineTextControl(false) &&
-      aVisitor.mEvent->message == NS_MOUSE_CLICK &&
+      aVisitor.mEvent->mMessage == NS_MOUSE_CLICK &&
       aVisitor.mEvent->AsMouseEvent()->button ==
         WidgetMouseEvent::eMiddleButton) {
     aVisitor.mEvent->mFlags.mNoContentDispatch = false;
   }
 
   // We must cache type because mType may change during JS event (bug 2369)
   aVisitor.mItemFlags |= mType;
 
   // Fire onchange (if necessary), before we do the blur, bug 357684.
-  if (aVisitor.mEvent->message == NS_BLUR_CONTENT) {
+  if (aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
     // Experimental mobile types rely on the system UI to prevent users to not
     // set invalid values but we have to be extra-careful. Especially if the
     // option has been enabled on desktop.
     if (IsExperimentalMobileType(mType)) {
       nsAutoString aValue;
       GetValueInternal(aValue);
       nsresult rv =
         SetValueInternal(aValue, nsTextEditorState::eSetValue_Internal);
       NS_ENSURE_SUCCESS(rv, rv);
     }
     FireChangeEventIfNeeded();
   }
 
   if (mType == NS_FORM_INPUT_RANGE &&
-      (aVisitor.mEvent->message == NS_FOCUS_CONTENT ||
-       aVisitor.mEvent->message == NS_BLUR_CONTENT)) {
+      (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
+       aVisitor.mEvent->mMessage == NS_BLUR_CONTENT)) {
     // Just as nsGenericHTMLFormElementWithState::PreHandleEvent calls
     // nsIFormControlFrame::SetFocus, we handle focus here.
     nsIFrame* frame = GetPrimaryFrame();
     if (frame) {
       frame->InvalidateFrameSubtree();
     }
   }
 
@@ -3192,17 +3192,17 @@ HTMLInputElement::PreHandleEvent(EventCh
       aVisitor.mEvent->mFlags.mIsTrusted) {
     if (mNumberControlSpinnerIsSpinning) {
       // If the timer is running the user has depressed the mouse on one of the
       // spin buttons. If the mouse exits the button we either want to reverse
       // the direction of spin if it has moved over the other button, or else
       // we want to end the spin. We do this here (rather than in
       // PostHandleEvent) because we don't want to let content preventDefault()
       // the end of the spin.
-      if (aVisitor.mEvent->message == NS_MOUSE_MOVE) {
+      if (aVisitor.mEvent->mMessage == NS_MOUSE_MOVE) {
         // Be aggressive about stopping the spin:
         bool stopSpin = true;
         nsNumberControlFrame* numberControlFrame =
           do_QueryFrame(GetPrimaryFrame());
         if (numberControlFrame) {
           bool oldNumberControlSpinTimerSpinsUpValue =
                  mNumberControlSpinnerSpinsUp;
           switch (numberControlFrame->GetSpinButtonForPointerEvent(
@@ -3223,23 +3223,23 @@ HTMLInputElement::PreHandleEvent(EventCh
             if (numberControlFrame) {
               numberControlFrame->SpinnerStateChanged();
             }
           }
         }
         if (stopSpin) {
           StopNumberControlSpinnerSpin();
         }
-      } else if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_UP) {
+      } else if (aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_UP) {
         StopNumberControlSpinnerSpin();
       }
     }
-    if (aVisitor.mEvent->message == NS_FOCUS_CONTENT ||
-        aVisitor.mEvent->message == NS_BLUR_CONTENT) {
-      if (aVisitor.mEvent->message == NS_FOCUS_CONTENT) {
+    if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
+        aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
+      if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT) {
         // Tell our frame it's getting focus so that it can make sure focus
         // is moved to our anonymous text control.
         nsNumberControlFrame* numberControlFrame =
           do_QueryFrame(GetPrimaryFrame());
         if (numberControlFrame) {
           // This could kill the frame!
           numberControlFrame->HandleFocusEvent(aVisitor.mEvent);
         }
@@ -3249,17 +3249,17 @@ HTMLInputElement::PreHandleEvent(EventCh
         // Our frame's nested <input type=text> will be invalidated when it
         // loses focus, but since we are also native themed we need to make
         // sure that our entire area is repainted since any focus highlight
         // from the theme should be removed from us (the repainting of the
         // sub-area occupied by the anon text control is not enough to do
         // that).
         frame->InvalidateFrame();
       }
-    } else if (aVisitor.mEvent->message == NS_KEY_UP) {
+    } else if (aVisitor.mEvent->mMessage == NS_KEY_UP) {
       WidgetKeyboardEvent* keyEvent = aVisitor.mEvent->AsKeyboardEvent();
       if ((keyEvent->keyCode == NS_VK_UP || keyEvent->keyCode == NS_VK_DOWN) &&
           !(keyEvent->IsShift() || keyEvent->IsControl() ||
             keyEvent->IsAlt() || keyEvent->IsMeta() ||
             keyEvent->IsAltGraph() || keyEvent->IsFn() ||
             keyEvent->IsOS())) {
         // The up/down arrow key events fire 'change' events when released
         // so that at the end of a series of up/down arrow key repeat events
@@ -3281,31 +3281,31 @@ HTMLInputElement::PreHandleEvent(EventCh
     // to do some special handling here.
     HTMLInputElement* textControl = nullptr;
     nsNumberControlFrame* numberControlFrame =
       do_QueryFrame(GetPrimaryFrame());
     if (numberControlFrame) {
       textControl = numberControlFrame->GetAnonTextControl();
     }
     if (textControl && aVisitor.mEvent->originalTarget == textControl) {
-      if (aVisitor.mEvent->message == NS_EDITOR_INPUT) {
+      if (aVisitor.mEvent->mMessage == NS_EDITOR_INPUT) {
         // Propogate the anon text control's new value to our HTMLInputElement:
         nsAutoString value;
         numberControlFrame->GetValueOfAnonTextControl(value);
         numberControlFrame->HandlingInputEvent(true);
         nsWeakFrame weakNumberControlFrame(numberControlFrame);
         rv = SetValueInternal(value,
                               nsTextEditorState::eSetValue_BySetUserInput |
                               nsTextEditorState::eSetValue_Notify);
         NS_ENSURE_SUCCESS(rv, rv);
         if (weakNumberControlFrame.IsAlive()) {
           numberControlFrame->HandlingInputEvent(false);
         }
       }
-      else if (aVisitor.mEvent->message == NS_FORM_CHANGE) {
+      else if (aVisitor.mEvent->mMessage == NS_FORM_CHANGE) {
         // We cancel the DOM 'change' event that is fired for any change to our
         // anonymous text control since we fire our own 'change' events and
         // content shouldn't be seeing two 'change' events. Besides that we
         // (as a number) control have tighter restrictions on when our internal
         // value changes than our anon text control does, so in some cases
         // (if our text control's value doesn't parse as a number) we don't
         // want to fire a 'change' event at all.
         aVisitor.mCanHandle = false;
@@ -3583,33 +3583,33 @@ nsresult
 HTMLInputElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
 {
   if (!aVisitor.mPresContext) {
     // Hack alert! In order to open file picker even in case the element isn't
     // in document, try to init picker even without PresContext.
     return MaybeInitPickers(aVisitor);
   }
 
-  if (aVisitor.mEvent->message == NS_FOCUS_CONTENT ||
-      aVisitor.mEvent->message == NS_BLUR_CONTENT) {
-    if (aVisitor.mEvent->message == NS_FOCUS_CONTENT &&
+  if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
+      aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
+    if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT &&
         MayFireChangeOnBlur() &&
         !mIsDraggingRange) { // StartRangeThumbDrag already set mFocusedValue
       GetValue(mFocusedValue);
     }
 
-    if (aVisitor.mEvent->message == NS_BLUR_CONTENT) {
+    if (aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
       if (mIsDraggingRange) {
         FinishRangeThumbDrag();
       } else if (mNumberControlSpinnerIsSpinning) {
         StopNumberControlSpinnerSpin();
       }
     }
 
-    UpdateValidityUIBits(aVisitor.mEvent->message == NS_FOCUS_CONTENT);
+    UpdateValidityUIBits(aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT);
 
     UpdateState(true);
   }
 
   nsresult rv = NS_OK;
   bool outerActivateEvent = !!(aVisitor.mItemFlags & NS_OUTER_ACTIVATE_EVENT);
   bool originalCheckedValue =
     !!(aVisitor.mItemFlags & NS_ORIGINAL_CHECKED_VALUE);
@@ -3716,17 +3716,17 @@ HTMLInputElement::PostHandleEvent(EventC
       }
 #endif
     }
   }
 
   if (NS_SUCCEEDED(rv)) {
     WidgetKeyboardEvent* keyEvent = aVisitor.mEvent->AsKeyboardEvent();
     if (mType ==  NS_FORM_INPUT_NUMBER &&
-        keyEvent && keyEvent->message == NS_KEY_PRESS &&
+        keyEvent && keyEvent->mMessage == NS_KEY_PRESS &&
         aVisitor.mEvent->mFlags.mIsTrusted &&
         (keyEvent->keyCode == NS_VK_UP || keyEvent->keyCode == NS_VK_DOWN) &&
         !(keyEvent->IsShift() || keyEvent->IsControl() ||
           keyEvent->IsAlt() || keyEvent->IsMeta() ||
           keyEvent->IsAltGraph() || keyEvent->IsFn() ||
           keyEvent->IsOS())) {
       // We handle the up/down arrow keys specially for <input type=number>.
       // On some platforms the editor for the nested text control will
@@ -3739,17 +3739,17 @@ HTMLInputElement::PostHandleEvent(EventC
       // the editor's handling of up/down keypress events. For that reason we
       // just ignore aVisitor.mEventStatus here and go ahead and handle the
       // event to increase/decrease the value of the number control.
       if (!aVisitor.mEvent->mFlags.mDefaultPreventedByContent && IsMutable()) {
         StepNumberControlForUserEvent(keyEvent->keyCode == NS_VK_UP ? 1 : -1);
         aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
       }
     } else if (nsEventStatus_eIgnore == aVisitor.mEventStatus) {
-      switch (aVisitor.mEvent->message) {
+      switch (aVisitor.mEvent->mMessage) {
 
         case NS_FOCUS_CONTENT:
         {
           // see if we should select the contents of the textbox. This happens
           // for text and password fields when the field was focused by the
           // keyboard or a navigation, the platform allows it, and it wasn't
           // just because we raised a window.
           nsIFocusManager* fm = nsFocusManager::GetFocusManager();
@@ -3774,19 +3774,19 @@ HTMLInputElement::PostHandleEvent(EventC
         }
 
         case NS_KEY_PRESS:
         case NS_KEY_UP:
         {
           // For backwards compat, trigger checks/radios/buttons with
           // space or enter (bug 25300)
           WidgetKeyboardEvent* keyEvent = aVisitor.mEvent->AsKeyboardEvent();
-          if ((aVisitor.mEvent->message == NS_KEY_PRESS &&
+          if ((aVisitor.mEvent->mMessage == NS_KEY_PRESS &&
                keyEvent->keyCode == NS_VK_RETURN) ||
-              (aVisitor.mEvent->message == NS_KEY_UP &&
+              (aVisitor.mEvent->mMessage == NS_KEY_UP &&
                keyEvent->keyCode == NS_VK_SPACE)) {
             switch(mType) {
               case NS_FORM_INPUT_CHECKBOX:
               case NS_FORM_INPUT_RADIO:
               {
                 // Checkbox and Radio try to submit on Enter press
                 if (keyEvent->keyCode != NS_VK_SPACE) {
                   MaybeSubmitForm(aVisitor.mPresContext);
@@ -3809,17 +3809,17 @@ HTMLInputElement::PostHandleEvent(EventC
 
                 EventDispatcher::Dispatch(static_cast<nsIContent*>(this),
                                           aVisitor.mPresContext, &event,
                                           nullptr, &status);
                 aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
               } // case
             } // switch
           }
-          if (aVisitor.mEvent->message == NS_KEY_PRESS &&
+          if (aVisitor.mEvent->mMessage == NS_KEY_PRESS &&
               mType == NS_FORM_INPUT_RADIO && !keyEvent->IsAlt() &&
               !keyEvent->IsControl() && !keyEvent->IsMeta()) {
             bool isMovingBack = false;
             switch (keyEvent->keyCode) {
               case NS_VK_UP:
               case NS_VK_LEFT:
                 isMovingBack = true;
                 // FALLTHROUGH
@@ -3861,27 +3861,27 @@ HTMLInputElement::PostHandleEvent(EventC
            * (a) if there is a submit control in the form, click the first
            *     submit control in the form.
            * (b) if there is just one text control in the form, submit by
            *     sending a submit event directly to the form
            * (c) if there is more than one text input and no submit buttons, do
            *     not submit, period.
            */
 
-          if (aVisitor.mEvent->message == NS_KEY_PRESS &&
+          if (aVisitor.mEvent->mMessage == NS_KEY_PRESS &&
               keyEvent->keyCode == NS_VK_RETURN &&
                (IsSingleLineTextControl(false, mType) ||
                 mType == NS_FORM_INPUT_NUMBER ||
                 IsExperimentalMobileType(mType))) {
             FireChangeEventIfNeeded();
             rv = MaybeSubmitForm(aVisitor.mPresContext);
             NS_ENSURE_SUCCESS(rv, rv);
           }
 
-          if (aVisitor.mEvent->message == NS_KEY_PRESS &&
+          if (aVisitor.mEvent->mMessage == NS_KEY_PRESS &&
               mType == NS_FORM_INPUT_RANGE && !keyEvent->IsAlt() &&
               !keyEvent->IsControl() && !keyEvent->IsMeta() &&
               (keyEvent->keyCode == NS_VK_LEFT ||
                keyEvent->keyCode == NS_VK_RIGHT ||
                keyEvent->keyCode == NS_VK_UP ||
                keyEvent->keyCode == NS_VK_DOWN ||
                keyEvent->keyCode == NS_VK_PAGE_UP ||
                keyEvent->keyCode == NS_VK_PAGE_DOWN ||
@@ -3961,17 +3961,17 @@ HTMLInputElement::PostHandleEvent(EventC
             if (mouseEvent->button == WidgetMouseEvent::eLeftButton &&
                 !(mouseEvent->IsShift() || mouseEvent->IsControl() ||
                   mouseEvent->IsAlt() || mouseEvent->IsMeta() ||
                   mouseEvent->IsAltGraph() || mouseEvent->IsFn() ||
                   mouseEvent->IsOS())) {
               nsNumberControlFrame* numberControlFrame =
                 do_QueryFrame(GetPrimaryFrame());
               if (numberControlFrame) {
-                if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_DOWN && 
+                if (aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_DOWN && 
                     IsMutable()) {
                   switch (numberControlFrame->GetSpinButtonForPointerEvent(
                             aVisitor.mEvent->AsMouseEvent())) {
                   case nsNumberControlFrame::eSpinButtonUp:
                     StepNumberControlForUserEvent(1);
                     mNumberControlSpinnerSpinsUp = true;
                     StartNumberControlSpinnerSpin();
                     aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
@@ -4023,17 +4023,17 @@ HTMLInputElement::PostHandleEvent(EventC
             nsCOMPtr<nsIPresShell> presShell =
               aVisitor.mPresContext->GetPresShell();
 
             // If |nsIPresShell::Destroy| has been called due to
             // handling the event the pres context will return a null
             // pres shell.  See bug 125624.
             // TODO: removing this code and have the submit event sent by the
             // form, see bug 592124.
-            if (presShell && (event.message != NS_FORM_SUBMIT ||
+            if (presShell && (event.mMessage != NS_FORM_SUBMIT ||
                               mForm->HasAttr(kNameSpaceID_None, nsGkAtoms::novalidate) ||
                               // We know the element is a submit control, if this check is moved,
                               // make sure formnovalidate is used only if it's a submit control.
                               HasAttr(kNameSpaceID_None, nsGkAtoms::formnovalidate) ||
                               mForm->CheckValidFormSubmission())) {
               // Hold a strong ref while dispatching
               nsRefPtr<mozilla::dom::HTMLFormElement> form(mForm);
               presShell->HandleDOMEventWithTarget(mForm, &event, &status);
@@ -4078,34 +4078,34 @@ HTMLInputElement::PostHandleEventForRang
   }
 
   nsRangeFrame* rangeFrame = do_QueryFrame(GetPrimaryFrame());
   if (!rangeFrame && mIsDraggingRange) {
     CancelRangeThumbDrag();
     return;
   }
 
-  switch (aVisitor.mEvent->message)
+  switch (aVisitor.mEvent->mMessage)
   {
     case NS_MOUSE_BUTTON_DOWN:
     case NS_TOUCH_START: {
       if (mIsDraggingRange) {
         break;
       }
       if (nsIPresShell::GetCapturingContent()) {
         break; // don't start drag if someone else is already capturing
       }
       WidgetInputEvent* inputEvent = aVisitor.mEvent->AsInputEvent();
       if (inputEvent->IsShift() || inputEvent->IsControl() ||
           inputEvent->IsAlt() || inputEvent->IsMeta() ||
           inputEvent->IsAltGraph() || inputEvent->IsFn() ||
           inputEvent->IsOS()) {
         break; // ignore
       }
-      if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_DOWN) {
+      if (aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
         if (aVisitor.mEvent->AsMouseEvent()->buttons ==
               WidgetMouseEvent::eLeftButtonFlag) {
           StartRangeThumbDrag(inputEvent);
         } else if (mIsDraggingRange) {
           CancelRangeThumbDrag();
         }
       } else {
         if (aVisitor.mEvent->AsTouchEvent()->touches.Length() == 1) {
--- a/dom/html/HTMLLabelElement.cpp
+++ b/dom/html/HTMLLabelElement.cpp
@@ -99,17 +99,17 @@ InInteractiveHTMLContent(nsIContent* aCo
 }
 
 nsresult
 HTMLLabelElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
 {
   WidgetMouseEvent* mouseEvent = aVisitor.mEvent->AsMouseEvent();
   if (mHandlingEvent ||
       (!(mouseEvent && mouseEvent->IsLeftClickEvent()) &&
-       aVisitor.mEvent->message != NS_MOUSE_BUTTON_DOWN) ||
+       aVisitor.mEvent->mMessage != NS_MOUSE_BUTTON_DOWN) ||
       aVisitor.mEventStatus == nsEventStatus_eConsumeNoDefault ||
       !aVisitor.mPresContext ||
       // Don't handle the event if it's already been handled by another label
       aVisitor.mEvent->mFlags.mMultipleActionsPrevented) {
     return NS_OK;
   }
 
   nsCOMPtr<nsIContent> target = do_QueryInterface(aVisitor.mEvent->target);
@@ -117,17 +117,17 @@ HTMLLabelElement::PostHandleEvent(EventC
     return NS_OK;
   }
 
   // Strong ref because event dispatch is going to happen.
   nsRefPtr<Element> content = GetLabeledElement();
 
   if (content) {
     mHandlingEvent = true;
-    switch (aVisitor.mEvent->message) {
+    switch (aVisitor.mEvent->mMessage) {
       case NS_MOUSE_BUTTON_DOWN:
         if (mouseEvent->button == WidgetMouseEvent::eLeftButton) {
           // We reset the mouse-down point on every event because there is
           // no guarantee we will reach the NS_MOUSE_CLICK code below.
           LayoutDeviceIntPoint* curPoint =
             new LayoutDeviceIntPoint(mouseEvent->refPoint);
           SetProperty(nsGkAtoms::labelMouseDownPtProperty,
                       static_cast<void*>(curPoint),
--- a/dom/html/HTMLMenuItemElement.cpp
+++ b/dom/html/HTMLMenuItemElement.cpp
@@ -249,17 +249,17 @@ HTMLMenuItemElement::SetChecked(bool aCh
   }
 
   return NS_OK;
 }
 
 nsresult
 HTMLMenuItemElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
-  if (aVisitor.mEvent->message == NS_MOUSE_CLICK) {
+  if (aVisitor.mEvent->mMessage == NS_MOUSE_CLICK) {
 
     bool originalCheckedValue = false;
     switch (mType) {
       case CMD_TYPE_CHECKBOX:
         originalCheckedValue = mChecked;
         SetChecked(!originalCheckedValue);
         aVisitor.mItemFlags |= NS_CHECKED_IS_TOGGLED;
         break;
@@ -285,17 +285,17 @@ HTMLMenuItemElement::PreHandleEvent(Even
 
   return nsGenericHTMLElement::PreHandleEvent(aVisitor);
 }
 
 nsresult
 HTMLMenuItemElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
 {
   // Check to see if the event was cancelled.
-  if (aVisitor.mEvent->message == NS_MOUSE_CLICK &&
+  if (aVisitor.mEvent->mMessage == NS_MOUSE_CLICK &&
       aVisitor.mItemFlags & NS_CHECKED_IS_TOGGLED &&
       aVisitor.mEventStatus == nsEventStatus_eConsumeNoDefault) {
     bool originalCheckedValue =
       !!(aVisitor.mItemFlags & NS_ORIGINAL_CHECKED_VALUE);
     uint8_t oldType = NS_MENUITEM_TYPE(aVisitor.mItemFlags);
 
     nsCOMPtr<nsIDOMHTMLMenuItemElement> selectedRadio =
       do_QueryInterface(aVisitor.mItemData);
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -210,17 +210,17 @@ HTMLObjectElement::HandlePluginInstantia
 
 void
 HTMLObjectElement::HandleFocusBlurPlugin(Element* aElement,
                                          WidgetEvent* aEvent)
 {
   if (!aEvent->mFlags.mIsTrusted) {
     return;
   }
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_FOCUS_CONTENT: {
       OnFocusBlurPlugin(aElement, true);
       break;
     }
     case NS_BLUR_CONTENT: {
       OnFocusBlurPlugin(aElement, false);
       break;
     }
--- a/dom/html/HTMLSelectElement.cpp
+++ b/dom/html/HTMLSelectElement.cpp
@@ -1496,38 +1496,38 @@ HTMLSelectElement::IsDisabledForEvents(u
   }
   return IsElementDisabledForEvents(aMessage, formFrame);
 }
 
 nsresult
 HTMLSelectElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
   aVisitor.mCanHandle = false;
-  if (IsDisabledForEvents(aVisitor.mEvent->message)) {
+  if (IsDisabledForEvents(aVisitor.mEvent->mMessage)) {
     return NS_OK;
   }
 
   return nsGenericHTMLFormElementWithState::PreHandleEvent(aVisitor);
 }
 
 nsresult
 HTMLSelectElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
 {
-  if (aVisitor.mEvent->message == NS_FOCUS_CONTENT) {
+  if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT) {
     // If the invalid UI is shown, we should show it while focused and
     // update the invalid/valid UI.
     mCanShowInvalidUI = !IsValid() && ShouldShowValidityUI();
 
     // If neither invalid UI nor valid UI is shown, we shouldn't show the valid
     // UI while focused.
     mCanShowValidUI = ShouldShowValidityUI();
 
     // We don't have to update NS_EVENT_STATE_MOZ_UI_INVALID nor
     // NS_EVENT_STATE_MOZ_UI_VALID given that the states should not change.
-  } else if (aVisitor.mEvent->message == NS_BLUR_CONTENT) {
+  } else if (aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
     mCanShowInvalidUI = true;
     mCanShowValidUI = true;
 
     UpdateState(true);
   }
 
   return nsGenericHTMLFormElementWithState::PostHandleEvent(aVisitor);
 }
--- a/dom/html/HTMLTextAreaElement.cpp
+++ b/dom/html/HTMLTextAreaElement.cpp
@@ -475,43 +475,43 @@ HTMLTextAreaElement::IsDisabledForEvents
   nsIFrame* formFrame = do_QueryFrame(formControlFrame);
   return IsElementDisabledForEvents(aMessage, formFrame);
 }
 
 nsresult
 HTMLTextAreaElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
   aVisitor.mCanHandle = false;
-  if (IsDisabledForEvents(aVisitor.mEvent->message)) {
+  if (IsDisabledForEvents(aVisitor.mEvent->mMessage)) {
     return NS_OK;
   }
 
   // Don't dispatch a second select event if we are already handling
   // one.
-  if (aVisitor.mEvent->message == NS_FORM_SELECTED) {
+  if (aVisitor.mEvent->mMessage == NS_FORM_SELECTED) {
     if (mHandlingSelect) {
       return NS_OK;
     }
     mHandlingSelect = true;
   }
 
   // If noContentDispatch is true we will not allow content to handle
   // this event.  But to allow middle mouse button paste to work we must allow 
   // middle clicks to go to text fields anyway.
   if (aVisitor.mEvent->mFlags.mNoContentDispatch) {
     aVisitor.mItemFlags |= NS_NO_CONTENT_DISPATCH;
   }
-  if (aVisitor.mEvent->message == NS_MOUSE_CLICK &&
+  if (aVisitor.mEvent->mMessage == NS_MOUSE_CLICK &&
       aVisitor.mEvent->AsMouseEvent()->button ==
         WidgetMouseEvent::eMiddleButton) {
     aVisitor.mEvent->mFlags.mNoContentDispatch = false;
   }
 
   // Fire onchange (if necessary), before we do the blur, bug 370521.
-  if (aVisitor.mEvent->message == NS_BLUR_CONTENT) {
+  if (aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
     FireChangeEventIfNeeded();
   }
 
   return nsGenericHTMLFormElementWithState::PreHandleEvent(aVisitor);
 }
 
 void
 HTMLTextAreaElement::FireChangeEventIfNeeded()
@@ -529,23 +529,23 @@ HTMLTextAreaElement::FireChangeEventIfNe
                                        static_cast<nsIContent*>(this),
                                        NS_LITERAL_STRING("change"), true,
                                        false);
 }
 
 nsresult
 HTMLTextAreaElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
 {
-  if (aVisitor.mEvent->message == NS_FORM_SELECTED) {
+  if (aVisitor.mEvent->mMessage == NS_FORM_SELECTED) {
     mHandlingSelect = false;
   }
 
-  if (aVisitor.mEvent->message == NS_FOCUS_CONTENT ||
-      aVisitor.mEvent->message == NS_BLUR_CONTENT) {
-    if (aVisitor.mEvent->message == NS_FOCUS_CONTENT) {
+  if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT ||
+      aVisitor.mEvent->mMessage == NS_BLUR_CONTENT) {
+    if (aVisitor.mEvent->mMessage == NS_FOCUS_CONTENT) {
       // If the invalid UI is shown, we should show it while focusing (and
       // update). Otherwise, we should not.
       GetValueInternal(mFocusedValue, true);
       mCanShowInvalidUI = !IsValid() && ShouldShowValidityUI();
 
       // If neither invalid UI nor valid UI is shown, we shouldn't show the valid
       // UI while typing.
       mCanShowValidUI = ShouldShowValidityUI();
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -2245,17 +2245,17 @@ nsGenericHTMLFormElement::AfterSetAttr(i
   return nsGenericHTMLElement::AfterSetAttr(aNameSpaceID, aName,
                                             aValue, aNotify);
 }
 
 nsresult
 nsGenericHTMLFormElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
   if (aVisitor.mEvent->mFlags.mIsTrusted) {
-    switch (aVisitor.mEvent->message) {
+    switch (aVisitor.mEvent->mMessage) {
       case NS_FOCUS_CONTENT:
       {
         // Check to see if focus has bubbled up from a form control's
         // child textfield or button.  If that's the case, don't focus
         // this parent file control -- leave focus on the child.
         nsIFormControlFrame* formControlFrame = GetFormControlFrame(true);
         if (formControlFrame &&
             aVisitor.mEvent->originalTarget == static_cast<nsINode*>(this))
--- a/dom/html/nsTextEditorState.cpp
+++ b/dom/html/nsTextEditorState.cpp
@@ -899,17 +899,17 @@ nsTextInputListener::HandleEvent(nsIDOME
   }
 
   WidgetKeyboardEvent* keyEvent =
     aEvent->GetInternalNSEvent()->AsKeyboardEvent();
   if (!keyEvent) {
     return NS_ERROR_UNEXPECTED;
   }
 
-  if (keyEvent->message != NS_KEY_PRESS) {
+  if (keyEvent->mMessage != NS_KEY_PRESS) {
     return NS_OK;
   }
 
   nsIWidget::NativeKeyBindingsType nativeKeyBindingsType =
     mTxtCtrlElement->IsTextArea() ?
       nsIWidget::NativeKeyBindingsForMultiLineEditor :
       nsIWidget::NativeKeyBindingsForSingleLineEditor;
   nsIWidget* widget = keyEvent->widget;
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -1924,17 +1924,17 @@ TabChild::UpdateTapState(const WidgetTou
                                 "ui.click_hold_context_menus.delay", 500);
   }
 
   if (aEvent.touches.Length() == 0) {
     return;
   }
 
   bool currentlyTrackingTouch = (mActivePointerId >= 0);
-  if (aEvent.message == NS_TOUCH_START) {
+  if (aEvent.mMessage == NS_TOUCH_START) {
     if (currentlyTrackingTouch || aEvent.touches.Length() > 1) {
       // We're tracking a possible tap for another point, or we saw a
       // touchstart for a later pointer after we canceled tracking of
       // the first point.  Ignore this one.
       return;
     }
     if (aStatus == nsEventStatus_eConsumeNoDefault ||
         TouchManager::gPreventMouseEvents ||
@@ -1964,17 +1964,17 @@ TabChild::UpdateTapState(const WidgetTou
   }
   Touch* trackedTouch = GetTouchForIdentifier(aEvent, mActivePointerId);
   if (!trackedTouch) {
     return;
   }
 
   LayoutDevicePoint currentPoint = LayoutDevicePoint(trackedTouch->mRefPoint.x, trackedTouch->mRefPoint.y);
   int64_t time = aEvent.time;
-  switch (aEvent.message) {
+  switch (aEvent.mMessage) {
   case NS_TOUCH_MOVE:
     if (std::abs(currentPoint.x - mGestureDownPoint.x) > sDragThreshold.width ||
         std::abs(currentPoint.y - mGestureDownPoint.y) > sDragThreshold.height) {
       CancelTapTracking();
     }
     return;
 
   case NS_TOUCH_END:
@@ -2041,25 +2041,25 @@ TabChild::CancelTapTracking()
 }
 
 bool
 TabChild::RecvRealTouchEvent(const WidgetTouchEvent& aEvent,
                              const ScrollableLayerGuid& aGuid,
                              const uint64_t& aInputBlockId,
                              const nsEventStatus& aApzResponse)
 {
-  TABC_LOG("Receiving touch event of type %d\n", aEvent.message);
+  TABC_LOG("Receiving touch event of type %d\n", aEvent.mMessage);
 
   WidgetTouchEvent localEvent(aEvent);
   localEvent.widget = mPuppetWidget;
 
   APZCCallbackHelper::ApplyCallbackTransform(localEvent, aGuid,
       mPuppetWidget->GetDefaultScale());
 
-  if (localEvent.message == NS_TOUCH_START && AsyncPanZoomEnabled()) {
+  if (localEvent.mMessage == NS_TOUCH_START && AsyncPanZoomEnabled()) {
     if (gfxPrefs::TouchActionEnabled()) {
       APZCCallbackHelper::SendSetAllowedTouchBehaviorNotification(mPuppetWidget,
           localEvent, aInputBlockId, mSetAllowedTouchBehaviorCallback);
     }
     nsCOMPtr<nsIDocument> document = GetDocument();
     APZCCallbackHelper::SendSetTargetAPZCNotification(mPuppetWidget, document,
         localEvent, aGuid, aInputBlockId);
   }
@@ -2098,23 +2098,23 @@ TabChild::RecvRealDragEvent(const Widget
     dragSession->SetDragAction(aDragAction);
     nsCOMPtr<nsIDOMDataTransfer> initialDataTransfer;
     dragSession->GetDataTransfer(getter_AddRefs(initialDataTransfer));
     if (initialDataTransfer) {
       initialDataTransfer->SetDropEffectInt(aDropEffect);
     }
   }
 
-  if (aEvent.message == NS_DRAGDROP_DROP) {
+  if (aEvent.mMessage == NS_DRAGDROP_DROP) {
     bool canDrop = true;
     if (!dragSession || NS_FAILED(dragSession->GetCanDrop(&canDrop)) ||
         !canDrop) {
-      localEvent.message = NS_DRAGDROP_EXIT;
+      localEvent.mMessage = NS_DRAGDROP_EXIT;
     }
-  } else if (aEvent.message == NS_DRAGDROP_OVER) {
+  } else if (aEvent.mMessage == NS_DRAGDROP_OVER) {
     nsCOMPtr<nsIDragService> dragService =
       do_GetService("@mozilla.org/widget/dragservice;1");
     if (dragService) {
       // This will dispatch 'drag' event at the source if the
       // drag transaction started in this process.
       dragService->FireDragEventAtSource(NS_DRAGDROP_DRAG);
     }
   }
@@ -2151,17 +2151,17 @@ TabChild::RecvNativeSynthesisResponse(co
 }
 
 bool
 TabChild::RecvRealKeyEvent(const WidgetKeyboardEvent& event,
                            const MaybeNativeKeyBinding& aBindings)
 {
   AutoCacheNativeKeyCommands autoCache(mPuppetWidget);
 
-  if (event.message == NS_KEY_PRESS) {
+  if (event.mMessage == NS_KEY_PRESS) {
     // If content code called preventDefault() on a keydown event, then we don't
     // want to process any following keypress events.
     if (mIgnoreKeyPressEvent) {
       return true;
     }
     if (aBindings.type() == MaybeNativeKeyBinding::TNativeKeyBinding) {
       const NativeKeyBinding& bindings = aBindings;
       autoCache.Cache(bindings.singleLineCommands(),
@@ -2171,17 +2171,17 @@ TabChild::RecvRealKeyEvent(const WidgetK
       autoCache.CacheNoCommands();
     }
   }
 
   WidgetKeyboardEvent localEvent(event);
   localEvent.widget = mPuppetWidget;
   nsEventStatus status = APZCCallbackHelper::DispatchWidgetEvent(localEvent);
 
-  if (event.message == NS_KEY_DOWN) {
+  if (event.mMessage == NS_KEY_DOWN) {
     mIgnoreKeyPressEvent = status == nsEventStatus_eConsumeNoDefault;
   }
 
   if (localEvent.mFlags.mWantReplyFromContentProcess) {
     SendReplyKeyEvent(localEvent);
   }
 
   if (PresShell::BeforeAfterKeyboardEventEnabled()) {
@@ -2205,27 +2205,27 @@ TabChild::RecvKeyEvent(const nsString& a
 }
 
 bool
 TabChild::RecvCompositionEvent(const WidgetCompositionEvent& event)
 {
   WidgetCompositionEvent localEvent(event);
   localEvent.widget = mPuppetWidget;
   APZCCallbackHelper::DispatchWidgetEvent(localEvent);
-  unused << SendOnEventNeedingAckHandled(event.message);
+  unused << SendOnEventNeedingAckHandled(event.mMessage);
   return true;
 }
 
 bool
 TabChild::RecvSelectionEvent(const WidgetSelectionEvent& event)
 {
   WidgetSelectionEvent localEvent(event);
   localEvent.widget = mPuppetWidget;
   APZCCallbackHelper::DispatchWidgetEvent(localEvent);
-  unused << SendOnEventNeedingAckHandled(event.message);
+  unused << SendOnEventNeedingAckHandled(event.mMessage);
   return true;
 }
 
 a11y::PDocAccessibleChild*
 TabChild::AllocPDocAccessibleChild(PDocAccessibleChild*, const uint64_t&)
 {
   MOZ_ASSERT(false, "should never call this!");
   return nullptr;
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -1363,29 +1363,29 @@ bool TabParent::SendRealMouseEvent(Widge
     return false;
   }
   event.refPoint += GetChildProcessOffset();
 
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (widget) {
     // When we mouseenter the tab, the tab's cursor should
     // become the current cursor.  When we mouseexit, we stop.
-    if (NS_MOUSE_ENTER_WIDGET == event.message) {
+    if (NS_MOUSE_ENTER_WIDGET == event.mMessage) {
       mTabSetsCursor = true;
       if (mCustomCursor) {
         widget->SetCursor(mCustomCursor, mCustomCursorHotspotX, mCustomCursorHotspotY);
       } else if (mCursor != nsCursor(-1)) {
         widget->SetCursor(mCursor);
       }
-    } else if (NS_MOUSE_EXIT_WIDGET == event.message) {
+    } else if (NS_MOUSE_EXIT_WIDGET == event.mMessage) {
       mTabSetsCursor = false;
     }
   }
 
-  if (NS_MOUSE_MOVE == event.message) {
+  if (NS_MOUSE_MOVE == event.mMessage) {
     return SendRealMouseMoveEvent(event);
   }
   return SendRealMouseButtonEvent(event);
 }
 
 LayoutDeviceToCSSScale
 TabParent::GetLayoutDeviceToCSSScale()
 {
@@ -1717,17 +1717,17 @@ bool TabParent::SendRealKeyEvent(WidgetK
 {
   if (mIsDestroyed) {
     return false;
   }
   event.refPoint += GetChildProcessOffset();
 
   MaybeNativeKeyBinding bindings;
   bindings = void_t();
-  if (event.message == NS_KEY_PRESS) {
+  if (event.mMessage == NS_KEY_PRESS) {
     nsCOMPtr<nsIWidget> widget = GetWidget();
 
     AutoInfallibleTArray<mozilla::CommandInt, 4> singleLine;
     AutoInfallibleTArray<mozilla::CommandInt, 4> multiLine;
     AutoInfallibleTArray<mozilla::CommandInt, 4> richText;
 
     widget->ExecuteNativeKeyBinding(nsIWidget::NativeKeyBindingsForSingleLineEditor,
                                     event, DoCommandCallback, &singleLine);
@@ -1749,17 +1749,17 @@ bool TabParent::SendRealTouchEvent(Widge
   if (mIsDestroyed) {
     return false;
   }
 
   // PresShell::HandleEventInternal adds touches on touch end/cancel.  This
   // confuses remote content and the panning and zooming logic into thinking
   // that the added touches are part of the touchend/cancel, when actually
   // they're not.
-  if (event.message == NS_TOUCH_END || event.message == NS_TOUCH_CANCEL) {
+  if (event.mMessage == NS_TOUCH_END || event.mMessage == NS_TOUCH_CANCEL) {
     for (int i = event.touches.Length() - 1; i >= 0; i--) {
       if (!event.touches[i]->mChanged) {
         event.touches.RemoveElementAt(i);
       }
     }
   }
 
   ScrollableLayerGuid guid;
@@ -1771,17 +1771,17 @@ bool TabParent::SendRealTouchEvent(Widge
     return false;
   }
 
   LayoutDeviceIntPoint offset = GetChildProcessOffset();
   for (uint32_t i = 0; i < event.touches.Length(); i++) {
     event.touches[i]->mRefPoint += offset;
   }
 
-  return (event.message == NS_TOUCH_MOVE) ?
+  return (event.mMessage == NS_TOUCH_MOVE) ?
     PBrowserParent::SendRealTouchMoveEvent(event, guid, blockId, apzResponse) :
     PBrowserParent::SendRealTouchEvent(event, guid, blockId, apzResponse);
 }
 
 bool
 TabParent::RecvSyncMessage(const nsString& aMessage,
                            const ClonedMessageData& aData,
                            InfallibleTArray<CpowEntry>&& aCpows,
@@ -2258,17 +2258,17 @@ TabParent::RecvDispatchAfterKeyboardEven
   localEvent.widget = GetWidget();
 
   nsIDocument* doc = mFrameElement->OwnerDoc();
   nsCOMPtr<nsIPresShell> presShell = doc->GetShell();
   NS_ENSURE_TRUE(presShell, true);
 
   if (mFrameElement &&
       PresShell::BeforeAfterKeyboardEventEnabled() &&
-      localEvent.message != NS_KEY_PRESS) {
+      localEvent.mMessage != NS_KEY_PRESS) {
     presShell->DispatchAfterKeyboardEvent(mFrameElement, localEvent,
                                           aEvent.mFlags.mDefaultPrevented);
   }
 
   return true;
 }
 
 bool
@@ -2277,17 +2277,17 @@ TabParent::HandleQueryContentEvent(Widge
   nsCOMPtr<nsIWidget> widget = GetWidget();
   if (!widget) {
     return true;
   }
   if (NS_WARN_IF(!mContentCache.HandleQueryContentEvent(aEvent, widget)) ||
       NS_WARN_IF(!aEvent.mSucceeded)) {
     return true;
   }
-  switch (aEvent.message) {
+  switch (aEvent.mMessage) {
     case NS_QUERY_TEXT_RECT:
     case NS_QUERY_CARET_RECT:
     case NS_QUERY_EDITOR_RECT:
       aEvent.mReply.mRect -= GetChildProcessOffset();
       break;
     default:
       break;
   }
--- a/dom/plugins/base/nsPluginInstanceOwner.cpp
+++ b/dom/plugins/base/nsPluginInstanceOwner.cpp
@@ -1569,17 +1569,17 @@ nsresult nsPluginInstanceOwner::Dispatch
   if (!mPluginWindow || (mPluginWindow->type == NPWindowTypeWindow)) {
     // continue only for cases without child window
     return aFocusEvent->PreventDefault(); // consume event
   }
 #endif
 
   WidgetEvent* theEvent = aFocusEvent->GetInternalNSEvent();
   if (theEvent) {
-    WidgetGUIEvent focusEvent(theEvent->mFlags.mIsTrusted, theEvent->message,
+    WidgetGUIEvent focusEvent(theEvent->mFlags.mIsTrusted, theEvent->mMessage,
                               nullptr);
     nsEventStatus rv = ProcessEvent(focusEvent);
     if (nsEventStatus_eConsumeNoDefault == rv) {
       aFocusEvent->PreventDefault();
       aFocusEvent->StopPropagation();
     }
   }
 
@@ -1678,17 +1678,17 @@ nsresult nsPluginInstanceOwner::Dispatch
   if (mouseEvent && mouseEvent->mClass == eMouseEventClass) {
     nsEventStatus rv = ProcessEvent(*mouseEvent);
     if (nsEventStatus_eConsumeNoDefault == rv) {
       aMouseEvent->PreventDefault();
       if (!aAllowPropagate) {
         aMouseEvent->StopPropagation();
       }
     }
-    if (mouseEvent->message == NS_MOUSE_BUTTON_UP) {
+    if (mouseEvent->mMessage == NS_MOUSE_BUTTON_UP) {
       mLastMouseDownButtonType = -1;
     }
   }
   return NS_OK;
 }
 
 nsresult
 nsPluginInstanceOwner::HandleEvent(nsIDOMEvent* aEvent)
@@ -1743,18 +1743,19 @@ nsPluginInstanceOwner::HandleEvent(nsIDO
   }
   if (eventType.EqualsLiteral("keypress")) {
     return ProcessKeyPress(aEvent);
   }
 
   nsCOMPtr<nsIDOMDragEvent> dragEvent(do_QueryInterface(aEvent));
   if (dragEvent && mInstance) {
     WidgetEvent* ievent = aEvent->GetInternalNSEvent();
-    if ((ievent && ievent->mFlags.mIsTrusted) &&
-         ievent->message != NS_DRAGDROP_ENTER && ievent->message != NS_DRAGDROP_OVER) {
+    if (ievent && ievent->mFlags.mIsTrusted &&
+        ievent->mMessage != NS_DRAGDROP_ENTER &&
+        ievent->mMessage != NS_DRAGDROP_OVER) {
       aEvent->PreventDefault();
     }
 
     // Let the plugin handle drag events.
     aEvent->StopPropagation();
   }
   return NS_OK;
 }
@@ -1801,17 +1802,17 @@ ContentIsFocusedWithinWindow(nsIContent*
 static NPCocoaEventType
 CocoaEventTypeForEvent(const WidgetGUIEvent& anEvent, nsIFrame* aObjectFrame)
 {
   const NPCocoaEvent* event = static_cast<const NPCocoaEvent*>(anEvent.mPluginEvent);
   if (event) {
     return event->type;
   }
 
-  switch (anEvent.message) {
+  switch (anEvent.mMessage) {
     case NS_MOUSE_OVER:
       return NPCocoaEventMouseEntered;
     case NS_MOUSE_OUT:
       return NPCocoaEventMouseExited;
     case NS_MOUSE_MOVE:
     {
       // We don't know via information on events from the widget code whether or not
       // we're dragging. The widget code just generates mouse move events from native
@@ -1842,38 +1843,38 @@ CocoaEventTypeForEvent(const WidgetGUIEv
 
 static NPCocoaEvent
 TranslateToNPCocoaEvent(WidgetGUIEvent* anEvent, nsIFrame* aObjectFrame)
 {
   NPCocoaEvent cocoaEvent;
   InitializeNPCocoaEvent(&cocoaEvent);
   cocoaEvent.type = CocoaEventTypeForEvent(*anEvent, aObjectFrame);
 
-  if (anEvent->message == NS_MOUSE_MOVE ||
-      anEvent->message == NS_MOUSE_BUTTON_DOWN ||
-      anEvent->message == NS_MOUSE_BUTTON_UP ||
-      anEvent->message == NS_MOUSE_SCROLL ||
-      anEvent->message == NS_MOUSE_OVER ||
-      anEvent->message == NS_MOUSE_OUT)
+  if (anEvent->mMessage == NS_MOUSE_MOVE ||
+      anEvent->mMessage == NS_MOUSE_BUTTON_DOWN ||
+      anEvent->mMessage == NS_MOUSE_BUTTON_UP ||
+      anEvent->mMessage == NS_MOUSE_SCROLL ||
+      anEvent->mMessage == NS_MOUSE_OVER ||
+      anEvent->mMessage == NS_MOUSE_OUT)
   {
     nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(anEvent, aObjectFrame) -
                  aObjectFrame->GetContentRectRelativeToSelf().TopLeft();
     nsPresContext* presContext = aObjectFrame->PresContext();
     // Plugin event coordinates need to be translated from device pixels
     // into "display pixels" in HiDPI modes.
     double scaleFactor = double(nsPresContext::AppUnitsPerCSSPixel())/
       aObjectFrame->PresContext()->DeviceContext()->AppUnitsPerDevPixelAtUnitFullZoom();
     size_t intScaleFactor = ceil(scaleFactor);
     nsIntPoint ptPx(presContext->AppUnitsToDevPixels(pt.x) / intScaleFactor,
                     presContext->AppUnitsToDevPixels(pt.y) / intScaleFactor);
     cocoaEvent.data.mouse.pluginX = double(ptPx.x);
     cocoaEvent.data.mouse.pluginY = double(ptPx.y);
   }
 
-  switch (anEvent->message) {
+  switch (anEvent->mMessage) {
     case NS_MOUSE_BUTTON_DOWN:
     case NS_MOUSE_BUTTON_UP:
     {
       WidgetMouseEvent* mouseEvent = anEvent->AsMouseEvent();
       if (mouseEvent) {
         switch (mouseEvent->button) {
           case WidgetMouseEvent::eLeftButton:
             cocoaEvent.data.mouse.buttonNumber = 0;
@@ -1906,17 +1907,18 @@ TranslateToNPCocoaEvent(WidgetGUIEvent* 
     }
     case NS_KEY_DOWN:
     case NS_KEY_UP:
     {
       WidgetKeyboardEvent* keyEvent = anEvent->AsKeyboardEvent();
 
       // That keyEvent->mPluginTextEventString is non-empty is a signal that we should
       // create a text event for the plugin, instead of a key event.
-      if ((anEvent->message == NS_KEY_DOWN) && !keyEvent->mPluginTextEventString.IsEmpty()) {
+      if (anEvent->mMessage == NS_KEY_DOWN &&
+          !keyEvent->mPluginTextEventString.IsEmpty()) {
         cocoaEvent.type = NPCocoaEventTextInput;
         const char16_t* pluginTextEventString = keyEvent->mPluginTextEventString.get();
         cocoaEvent.data.text.text = (NPNSString*)
           ::CFStringCreateWithCharacters(NULL,
                                          reinterpret_cast<const UniChar*>(pluginTextEventString),
                                          keyEvent->mPluginTextEventString.Length());
       } else {
         cocoaEvent.data.key.keyCode = keyEvent->mNativeKeyCode;
@@ -1932,17 +1934,17 @@ TranslateToNPCocoaEvent(WidgetGUIEvent* 
           ::CFStringCreateWithCharacters(NULL,
                                          reinterpret_cast<const UniChar*>(nativeCharsIgnoringModifiers),
                                          keyEvent->mNativeCharactersIgnoringModifiers.Length());
       }
       break;
     }
     case NS_FOCUS_CONTENT:
     case NS_BLUR_CONTENT:
-      cocoaEvent.data.focus.hasFocus = (anEvent->message == NS_FOCUS_CONTENT);
+      cocoaEvent.data.focus.hasFocus = (anEvent->mMessage == NS_FOCUS_CONTENT);
       break;
     default:
       break;
   }
   return cocoaEvent;
 }
 
 void nsPluginInstanceOwner::PerformDelayedBlurs()
@@ -1970,38 +1972,38 @@ nsEventStatus nsPluginInstanceOwner::Pro
   if (eventModel != NPEventModelCocoa) {
     return nsEventStatus_eIgnore;
   }
 
   // In the Cocoa event model, focus is per-window. Don't tell a plugin it lost
   // focus unless it lost focus within the window. For example, ignore a blur
   // event if it's coming due to the plugin's window deactivating.
   nsCOMPtr<nsIContent> content = do_QueryReferent(mContent);
-  if (anEvent.message == NS_BLUR_CONTENT &&
+  if (anEvent.mMessage == NS_BLUR_CONTENT &&
       ContentIsFocusedWithinWindow(content)) {
     mShouldBlurOnActivate = true;
     return nsEventStatus_eIgnore;
   }
 
   // Also, don't tell the plugin it gained focus again after we've already given
   // it focus. This might happen if it has focus, its window is blurred, then the
   // window is made active again. The plugin never lost in-window focus, so it
   // shouldn't get a focus event again.
-  if (anEvent.message == NS_FOCUS_CONTENT &&
+  if (anEvent.mMessage == NS_FOCUS_CONTENT &&
       mLastContentFocused == true) {
     mShouldBlurOnActivate = false;
     return nsEventStatus_eIgnore;
   }
 
   // Now, if we're going to send a focus event, update mLastContentFocused and
   // tell any plugins in our window that we have taken focus, so they should
   // perform any delayed blurs.
-  if (anEvent.message == NS_FOCUS_CONTENT ||
-      anEvent.message == NS_BLUR_CONTENT) {
-    mLastContentFocused = (anEvent.message == NS_FOCUS_CONTENT);
+  if (anEvent.mMessage == NS_FOCUS_CONTENT ||
+      anEvent.mMessage == NS_BLUR_CONTENT) {
+    mLastContentFocused = (anEvent.mMessage == NS_FOCUS_CONTENT);
     mShouldBlurOnActivate = false;
     PerformDelayedBlurs();
   }
 
   NPCocoaEvent cocoaEvent = TranslateToNPCocoaEvent(const_cast<WidgetGUIEvent*>(&anEvent), mPluginFrame);
   if (cocoaEvent.type == (NPCocoaEventType)0) {
     return nsEventStatus_eIgnore;
   }
@@ -2035,17 +2037,17 @@ nsEventStatus nsPluginInstanceOwner::Pro
         textEvent.type = NPCocoaEventTextInput;
         textEvent.data.text.text = (NPNSString*)cfString;
         mInstance->HandleEvent(&textEvent, nullptr);
       }
     }
   }
 
   bool handled = (response == kNPEventHandled || response == kNPEventStartIME);
-  bool leftMouseButtonDown = (anEvent.message == NS_MOUSE_BUTTON_DOWN) &&
+  bool leftMouseButtonDown = (anEvent.mMessage == NS_MOUSE_BUTTON_DOWN) &&
                              (anEvent.AsMouseEvent()->button == WidgetMouseEvent::eLeftButton);
   if (handled && !(leftMouseButtonDown && !mContentFocused)) {
     rv = nsEventStatus_eConsumeNoDefault;
   }
 #endif
 
 #ifdef XP_WIN
   // this code supports windowless plugins
@@ -2054,17 +2056,17 @@ nsEventStatus nsPluginInstanceOwner::Pro
   // have no pluginEvent
   NPEvent pluginEvent;
   if (anEvent.mClass == eMouseEventClass) {
     if (!pPluginEvent) {
       // XXX Should extend this list to synthesize events for more event
       // types
       pluginEvent.event = 0;
       const WidgetMouseEvent* mouseEvent = anEvent.AsMouseEvent();
-      switch (anEvent.message) {
+      switch (anEvent.mMessage) {
       case NS_MOUSE_MOVE:
         pluginEvent.event = WM_MOUSEMOVE;
         break;
       case NS_MOUSE_BUTTON_DOWN: {
         static const int downMsgs[] =
           { WM_LBUTTONDOWN, WM_MBUTTONDOWN, WM_RBUTTONDOWN };
         static const int dblClickMsgs[] =
           { WM_LBUTTONDBLCLK, WM_MBUTTONDBLCLK, WM_RBUTTONDBLCLK };
@@ -2099,35 +2101,35 @@ nsEventStatus nsPluginInstanceOwner::Pro
           (::GetKeyState(VK_XBUTTON2) ? MK_XBUTTON2 : 0);
       }
     }
     if (pPluginEvent) {
       // Make event coordinates relative to our enclosing widget,
       // not the widget they were received on.
       // See use of NPEvent in widget/windows/nsWindow.cpp
       // for why this assert should be safe
-      NS_ASSERTION(anEvent.message == NS_MOUSE_BUTTON_DOWN ||
-                   anEvent.message == NS_MOUSE_BUTTON_UP ||
-                   anEvent.message == NS_MOUSE_DOUBLECLICK ||
-                   anEvent.message == NS_MOUSE_OVER ||
-                   anEvent.message == NS_MOUSE_OUT ||
-                   anEvent.message == NS_MOUSE_MOVE,
+      NS_ASSERTION(anEvent.mMessage == NS_MOUSE_BUTTON_DOWN ||
+                   anEvent.mMessage == NS_MOUSE_BUTTON_UP ||
+                   anEvent.mMessage == NS_MOUSE_DOUBLECLICK ||
+                   anEvent.mMessage == NS_MOUSE_OVER ||
+                   anEvent.mMessage == NS_MOUSE_OUT ||
+                   anEvent.mMessage == NS_MOUSE_MOVE,
                    "Incorrect event type for coordinate translation");
       nsPoint pt =
         nsLayoutUtils::GetEventCoordinatesRelativeTo(&anEvent, mPluginFrame) -
         mPluginFrame->GetContentRectRelativeToSelf().TopLeft();
       nsPresContext* presContext = mPluginFrame->PresContext();
       nsIntPoint ptPx(presContext->AppUnitsToDevPixels(pt.x),
                       presContext->AppUnitsToDevPixels(pt.y));
       nsIntPoint widgetPtPx = ptPx + mPluginFrame->GetWindowOriginInPixels(true);
       const_cast<NPEvent*>(pPluginEvent)->lParam = MAKELPARAM(widgetPtPx.x, widgetPtPx.y);
     }
   }
   else if (!pPluginEvent) {
-    switch (anEvent.message) {
+    switch (anEvent.mMessage) {
       case NS_FOCUS_CONTENT:
         pluginEvent.event = WM_SETFOCUS;
         pluginEvent.wParam = 0;
         pluginEvent.lParam = 0;
         pPluginEvent = &pluginEvent;
         break;
       case NS_BLUR_CONTENT:
         pluginEvent.event = WM_KILLFOCUS;
@@ -2158,17 +2160,17 @@ nsEventStatus nsPluginInstanceOwner::Pro
   // this code supports windowless plugins
   nsIWidget* widget = anEvent.widget;
   XEvent pluginEvent = XEvent();
   pluginEvent.type = 0;
 
   switch(anEvent.mClass) {
     case eMouseEventClass:
       {
-        switch (anEvent.message)
+        switch (anEvent.mMessage)
           {
           case NS_MOUSE_CLICK:
           case NS_MOUSE_DOUBLECLICK:
             // Button up/down events sent instead.
             return rv;
           }
 
         // Get reference point relative to plugin origin.
@@ -2186,23 +2188,23 @@ nsEventStatus nsPluginInstanceOwner::Pro
 #ifdef MOZ_WIDGET_GTK
         Window root = GDK_ROOT_WINDOW();
 #elif defined(MOZ_WIDGET_QT)
         Window root = RootWindowOfScreen(DefaultScreenOfDisplay(mozilla::DefaultXDisplay()));
 #else
         Window root = None; // Could XQueryTree, but this is not important.
 #endif
 
-        switch (anEvent.message)
+        switch (anEvent.mMessage)
           {
           case NS_MOUSE_OVER:
           case NS_MOUSE_OUT:
             {
               XCrossingEvent& event = pluginEvent.xcrossing;
-              event.type = anEvent.message == NS_MOUSE_OVER ?
+              event.type = anEvent.mMessage == NS_MOUSE_OVER ?
                 EnterNotify : LeaveNotify;
               event.root = root;
               event.time = anEvent.time;
               event.x = pluginPoint.x;
               event.y = pluginPoint.y;
               event.x_root = rootPoint.x;
               event.y_root = rootPoint.y;
               event.state = XInputEventState(mouseEvent);
@@ -2230,17 +2232,17 @@ nsEventStatus nsPluginInstanceOwner::Pro
               event.is_hint = NotifyNormal;
               event.same_screen = True;
             }
             break;
           case NS_MOUSE_BUTTON_DOWN:
           case NS_MOUSE_BUTTON_UP:
             {
               XButtonEvent& event = pluginEvent.xbutton;
-              event.type = anEvent.message == NS_MOUSE_BUTTON_DOWN ?
+              event.type = anEvent.mMessage == NS_MOUSE_BUTTON_DOWN ?
                 ButtonPress : ButtonRelease;
               event.root = root;
               event.time = anEvent.time;
               event.x = pluginPoint.x;
               event.y = pluginPoint.y;
               event.x_root = rootPoint.x;
               event.y_root = rootPoint.y;
               event.state = XInputEventState(mouseEvent);
@@ -2273,17 +2275,17 @@ nsEventStatus nsPluginInstanceOwner::Pro
           XKeyEvent &event = pluginEvent.xkey;
 #ifdef MOZ_WIDGET_GTK
           event.root = GDK_ROOT_WINDOW();
           event.time = anEvent.time;
           const GdkEventKey* gdkEvent =
             static_cast<const GdkEventKey*>(anEvent.mPluginEvent);
           event.keycode = gdkEvent->hardware_keycode;
           event.state = gdkEvent->state;
-          switch (anEvent.message)
+          switch (anEvent.mMessage)
             {
             case NS_KEY_DOWN:
               // Handle NS_KEY_DOWN for modifier key presses
               // For non-modifiers we get NS_KEY_PRESS
               if (gdkEvent->is_modifier)
                 event.type = XKeyPress;
               break;
             case NS_KEY_PRESS:
@@ -2310,24 +2312,24 @@ nsEventStatus nsPluginInstanceOwner::Pro
           // DOMKeyCodeToGdkKeyCode(keyEvent.keyCode) and
           // gdk_keymap_get_entries_for_keyval will be useful, but the
           // mappings will not be unique.
           NS_WARNING("Synthesized key event not sent to plugin");
         }
       break;
 
     default:
-      switch (anEvent.message)
+      switch (anEvent.mMessage)
         {
         case NS_FOCUS_CONTENT:
         case NS_BLUR_CONTENT:
           {
             XFocusChangeEvent &event = pluginEvent.xfocus;
             event.type =
-              anEvent.message == NS_FOCUS_CONTENT ? FocusIn : FocusOut;
+              anEvent.mMessage == NS_FOCUS_CONTENT ? FocusIn : FocusOut;
             // information lost:
             event.mode = -1;
             event.detail = NotifyDetailNone;
           }
           break;
         }
     }
 
@@ -2358,33 +2360,33 @@ nsEventStatus nsPluginInstanceOwner::Pro
     if (fm) {
       nsCOMPtr<nsIDOMElement> elem = do_QueryReferent(mContent);
       fm->SetFocus(elem, 0);
     }
   }
   switch(anEvent.mClass) {
     case eMouseEventClass:
       {
-        switch (anEvent.message)
+        switch (anEvent.mMessage)
           {
           case NS_MOUSE_CLICK:
           case NS_MOUSE_DOUBLECLICK:
             // Button up/down events sent instead.
             return rv;
           }
 
         // Get reference point relative to plugin origin.
         const nsPresContext* presContext = mPluginFrame->PresContext();
         nsPoint appPoint =
           nsLayoutUtils::GetEventCoordinatesRelativeTo(&anEvent, mPluginFrame) -
           mPluginFrame->GetContentRectRelativeToSelf().TopLeft();
         nsIntPoint pluginPoint(presContext->AppUnitsToDevPixels(appPoint.x),
                                presContext->AppUnitsToDevPixels(appPoint.y));
 
-        switch (anEvent.message)
+        switch (anEvent.mMessage)
           {
           case NS_MOUSE_MOVE:
             {
               // are these going to be touch events?
               // pluginPoint.x;
               // pluginPoint.y;
             }
             break;
--- a/dom/svg/SVGSVGElement.cpp
+++ b/dom/svg/SVGSVGElement.cpp
@@ -585,17 +585,17 @@ SVGSVGElement::IsAttributeMapped(const n
 }
 
 //----------------------------------------------------------------------
 // nsIContent methods:
 
 nsresult
 SVGSVGElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
-  if (aVisitor.mEvent->message == NS_SVG_LOAD) {
+  if (aVisitor.mEvent->mMessage == NS_SVG_LOAD) {
     if (mTimedDocumentRoot) {
       mTimedDocumentRoot->Begin();
       // Set 'resample needed' flag, so that if any script calls a DOM method
       // that requires up-to-date animations before our first sample callback,
       // we'll force a synchronous sample.
       AnimationNeedsResample();
     }
   }
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -1260,28 +1260,28 @@ nsXULElement::List(FILE* out, int32_t aI
 #endif
 
 nsresult
 nsXULElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
 {
     aVisitor.mForceContentDispatch = true; //FIXME! Bug 329119
     if (IsRootOfNativeAnonymousSubtree() &&
         (IsAnyOfXULElements(nsGkAtoms::scrollbar, nsGkAtoms::scrollcorner)) &&
-        (aVisitor.mEvent->message == NS_MOUSE_CLICK ||
-         aVisitor.mEvent->message == NS_MOUSE_DOUBLECLICK ||
-         aVisitor.mEvent->message == NS_XUL_COMMAND ||
-         aVisitor.mEvent->message == NS_CONTEXTMENU ||
-         aVisitor.mEvent->message == NS_DRAGDROP_START ||
-         aVisitor.mEvent->message == NS_DRAGDROP_GESTURE)) {
+        (aVisitor.mEvent->mMessage == NS_MOUSE_CLICK ||
+         aVisitor.mEvent->mMessage == NS_MOUSE_DOUBLECLICK ||
+         aVisitor.mEvent->mMessage == NS_XUL_COMMAND ||
+         aVisitor.mEvent->mMessage == NS_CONTEXTMENU ||
+         aVisitor.mEvent->mMessage == NS_DRAGDROP_START ||
+         aVisitor.mEvent->mMessage == NS_DRAGDROP_GESTURE)) {
         // Don't propagate these events from native anonymous scrollbar.
         aVisitor.mCanHandle = true;
         aVisitor.mParentTarget = nullptr;
         return NS_OK;
     }
-    if (aVisitor.mEvent->message == NS_XUL_COMMAND &&
+    if (aVisitor.mEvent->mMessage == NS_XUL_COMMAND &&
         aVisitor.mEvent->mClass == eInputEventClass &&
         aVisitor.mEvent->originalTarget == static_cast<nsIContent*>(this) &&
         !IsXULElement(nsGkAtoms::command)) {
         // Check that we really have an xul command event. That will be handled
         // in a special way.
         nsCOMPtr<nsIDOMXULCommandEvent> xulEvent =
             do_QueryInterface(aVisitor.mDOMEvent);
         // See if we have a command elt.  If so, we execute on the command
--- a/editor/libeditor/nsEditor.cpp
+++ b/editor/libeditor/nsEditor.cpp
@@ -4690,17 +4690,17 @@ nsEditor::HandleKeyPressEvent(nsIDOMKeyE
   //   * editor/libeditor/tests/test_htmleditor_keyevent_handling.html
   //
   // And also when you add new key handling, you need to change the subclass's
   // HandleKeyPressEvent()'s switch statement.
 
   WidgetKeyboardEvent* nativeKeyEvent =
     aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent();
   NS_ENSURE_TRUE(nativeKeyEvent, NS_ERROR_UNEXPECTED);
-  NS_ASSERTION(nativeKeyEvent->message == NS_KEY_PRESS,
+  NS_ASSERTION(nativeKeyEvent->mMessage == NS_KEY_PRESS,
                "HandleKeyPressEvent gets non-keypress event");
 
   // if we are readonly or disabled, then do nothing.
   if (IsReadonly() || IsDisabled()) {
     // consume backspace for disabled and readonly textfields, to prevent
     // back in history, which could be confusing to users
     if (nativeKeyEvent->keyCode == nsIDOMKeyEvent::DOM_VK_BACK_SPACE) {
       aKeyEvent->PreventDefault();
@@ -5146,17 +5146,17 @@ nsEditor::IsAcceptableInputEvent(nsIDOME
 
   // If a composition event isn't dispatched via widget, we need to ignore them
   // since they cannot be managed by TextComposition. E.g., the event was
   // created by chrome JS.
   // Note that if we allow to handle such events, editor may be confused by
   // strange event order.
   bool needsWidget = false;
   WidgetGUIEvent* widgetGUIEvent = nullptr;
-  switch (widgetEvent->message) {
+  switch (widgetEvent->mMessage) {
     case NS_USER_DEFINED_EVENT:
       // If events are not created with proper event interface, their message
       // are initialized with NS_USER_DEFINED_EVENT.  Let's ignore such event.
       return false;
     case NS_COMPOSITION_START:
     case NS_COMPOSITION_END:
     case NS_COMPOSITION_UPDATE:
     case NS_COMPOSITION_CHANGE:
--- a/editor/libeditor/nsEditorEventListener.cpp
+++ b/editor/libeditor/nsEditorEventListener.cpp
@@ -364,17 +364,17 @@ nsEditorEventListener::HandleEvent(nsIDO
   // e.g., keydown event is created with |new MouseEvent("keydown", {});|,
   // its message is always 0.  Therefore, we can ban such strange event easy.
   // However, we need to handle strange "focus" and "blur" event.  See the
   // following code of this switch statement.
   // NOTE: Each event handler may require specific event interface.  Before
   //       calling it, this queries the specific interface.  If it would fail,
   //       each event handler would just ignore the event.  So, in this method,
   //       you don't need to check if the QI succeeded before each call.
-  switch (internalEvent->message) {
+  switch (internalEvent->mMessage) {
     // dragenter
     case NS_DRAGDROP_ENTER: {
       nsCOMPtr<nsIDOMDragEvent> dragEvent = do_QueryInterface(aEvent);
       return DragEnter(dragEvent);
     }
     // dragover
     case NS_DRAGDROP_OVER: {
       nsCOMPtr<nsIDOMDragEvent> dragEvent = do_QueryInterface(aEvent);
--- a/editor/libeditor/nsHTMLEditor.cpp
+++ b/editor/libeditor/nsHTMLEditor.cpp
@@ -589,17 +589,17 @@ nsHTMLEditor::HandleKeyPressEvent(nsIDOM
     // When we're not editable, the events are handled on nsEditor, so, we can
     // bypass nsPlaintextEditor.
     return nsEditor::HandleKeyPressEvent(aKeyEvent);
   }
 
   WidgetKeyboardEvent* nativeKeyEvent =
     aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent();
   NS_ENSURE_TRUE(nativeKeyEvent, NS_ERROR_UNEXPECTED);
-  NS_ASSERTION(nativeKeyEvent->message == NS_KEY_PRESS,
+  NS_ASSERTION(nativeKeyEvent->mMessage == NS_KEY_PRESS,
                "HandleKeyPressEvent gets non-keypress event");
 
   switch (nativeKeyEvent->keyCode) {
     case nsIDOMKeyEvent::DOM_VK_META:
     case nsIDOMKeyEvent::DOM_VK_WIN:
     case nsIDOMKeyEvent::DOM_VK_SHIFT:
     case nsIDOMKeyEvent::DOM_VK_CONTROL:
     case nsIDOMKeyEvent::DOM_VK_ALT:
--- a/editor/libeditor/nsPlaintextEditor.cpp
+++ b/editor/libeditor/nsPlaintextEditor.cpp
@@ -357,17 +357,17 @@ nsPlaintextEditor::HandleKeyPressEvent(n
   if (IsReadonly() || IsDisabled()) {
     // When we're not editable, the events handled on nsEditor.
     return nsEditor::HandleKeyPressEvent(aKeyEvent);
   }
 
   WidgetKeyboardEvent* nativeKeyEvent =
     aKeyEvent->GetInternalNSEvent()->AsKeyboardEvent();
   NS_ENSURE_TRUE(nativeKeyEvent, NS_ERROR_UNEXPECTED);
-  NS_ASSERTION(nativeKeyEvent->message == NS_KEY_PRESS,
+  NS_ASSERTION(nativeKeyEvent->mMessage == NS_KEY_PRESS,
                "HandleKeyPressEvent gets non-keypress event");
 
   switch (nativeKeyEvent->keyCode) {
     case nsIDOMKeyEvent::DOM_VK_META:
     case nsIDOMKeyEvent::DOM_VK_WIN:
     case nsIDOMKeyEvent::DOM_VK_SHIFT:
     case nsIDOMKeyEvent::DOM_VK_CONTROL:
     case nsIDOMKeyEvent::DOM_VK_ALT:
@@ -840,17 +840,17 @@ nsPlaintextEditor::BeginIMEComposition(W
 nsresult
 nsPlaintextEditor::UpdateIMEComposition(nsIDOMEvent* aDOMTextEvent)
 {
   MOZ_ASSERT(aDOMTextEvent, "aDOMTextEvent must not be nullptr");
 
   WidgetCompositionEvent* compositionChangeEvent =
     aDOMTextEvent->GetInternalNSEvent()->AsCompositionEvent();
   NS_ENSURE_TRUE(compositionChangeEvent, NS_ERROR_INVALID_ARG);
-  MOZ_ASSERT(compositionChangeEvent->message == NS_COMPOSITION_CHANGE,
+  MOZ_ASSERT(compositionChangeEvent->mMessage == NS_COMPOSITION_CHANGE,
              "The internal event should be NS_COMPOSITION_CHANGE");
 
   EnsureComposition(compositionChangeEvent);
 
   nsCOMPtr<nsIPresShell> ps = GetPresShell();
   NS_ENSURE_TRUE(ps, NS_ERROR_NOT_INITIALIZED);
 
   nsRefPtr<Selection> selection = GetSelection();
--- a/gfx/layers/apz/src/APZCTreeManager.cpp
+++ b/gfx/layers/apz/src/APZCTreeManager.cpp
@@ -849,17 +849,17 @@ APZCTreeManager::UpdateWheelTransaction(
   }
 
   // If the transaction has simply timed out, we don't need to do anything
   // else.
   if (txn->MaybeTimeout(TimeStamp::Now())) {
     return;
   }
 
-  switch (aEvent.message) {
+  switch (aEvent.mMessage) {
    case NS_MOUSE_MOVE:
    case NS_DRAGDROP_OVER: {
      WidgetMouseEvent* mouseEvent = aEvent.AsMouseEvent();
      if (!mouseEvent->IsReal()) {
        return;
      }
 
      ScreenIntPoint point =
--- a/gfx/layers/apz/util/APZEventState.cpp
+++ b/gfx/layers/apz/util/APZEventState.cpp
@@ -246,24 +246,24 @@ APZEventState::ProcessLongTap(const nsCO
 }
 
 void
 APZEventState::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
                                  const ScrollableLayerGuid& aGuid,
                                  uint64_t aInputBlockId,
                                  nsEventStatus aApzResponse)
 {
-  if (aEvent.message == NS_TOUCH_START && aEvent.touches.Length() > 0) {
+  if (aEvent.mMessage == NS_TOUCH_START && aEvent.touches.Length() > 0) {
     mActiveElementManager->SetTargetElement(aEvent.touches[0]->GetTarget());
   }
 
   bool isTouchPrevented = TouchManager::gPreventMouseEvents ||
       aEvent.mFlags.mMultipleActionsPrevented;
   bool sentContentResponse = false;
-  switch (aEvent.message) {
+  switch (aEvent.mMessage) {
   case NS_TOUCH_START: {
     mTouchEndCancelled = false;
     if (mPendingTouchPreventedResponse) {
       // We can enter here if we get two TOUCH_STARTs in a row and didn't
       // respond to the first one. Respond to it now.
       mContentReceivedInputBlockCallback->Run(mPendingTouchPreventedGuid,
           mPendingTouchPreventedBlockId, false);
       sentContentResponse = true;
@@ -300,18 +300,18 @@ APZEventState::ProcessTouchEvent(const W
   default:
     NS_WARNING("Unknown touch event type");
   }
 
   if (sentContentResponse &&
         aApzResponse == nsEventStatus_eConsumeDoDefault &&
         gfxPrefs::PointerEventsEnabled()) {
     WidgetTouchEvent cancelEvent(aEvent);
-    cancelEvent.message = NS_TOUCH_CANCEL;
-    cancelEvent.mFlags.mCancelable = false; // message != NS_TOUCH_CANCEL;
+    cancelEvent.mMessage = NS_TOUCH_CANCEL;
+    cancelEvent.mFlags.mCancelable = false; // mMessage != NS_TOUCH_CANCEL;
     for (uint32_t i = 0; i < cancelEvent.touches.Length(); ++i) {
       if (mozilla::dom::Touch* touch = cancelEvent.touches[i]) {
         touch->convertToPointer = true;
       }
     }
     nsEventStatus status;
     cancelEvent.widget->DispatchEvent(&cancelEvent, status);
   }
--- a/layout/base/AccessibleCaretEventHub.cpp
+++ b/layout/base/AccessibleCaretEventHub.cpp
@@ -495,17 +495,17 @@ AccessibleCaretEventHub::HandleMouseEven
   if (aEvent->button != WidgetMouseEvent::eLeftButton) {
     return rv;
   }
 
   int32_t id = (mActiveTouchId == kInvalidTouchId ?
                 kDefaultTouchId : mActiveTouchId);
   nsPoint point = GetMouseEventPosition(aEvent);
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
   case NS_MOUSE_BUTTON_DOWN:
     AC_LOGV("Before NS_MOUSE_BUTTON_DOWN, state: %s", mState->Name());
     rv = mState->OnPress(this, point, id);
     AC_LOGV("After NS_MOUSE_BUTTON_DOWN, state: %s, consume: %d",
             mState->Name(), rv);
     break;
 
   case NS_MOUSE_MOVE:
@@ -533,17 +533,17 @@ AccessibleCaretEventHub::HandleMouseEven
   }
 
   return rv;
 }
 
 nsEventStatus
 AccessibleCaretEventHub::HandleWheelEvent(WidgetWheelEvent* aEvent)
 {
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
   case NS_WHEEL_WHEEL:
     AC_LOGV("NS_WHEEL_WHEEL, isMomentum %d, state: %s", aEvent->isMomentum,
             mState->Name());
     mState->OnScrolling(this);
     break;
 
   case NS_WHEEL_START:
     AC_LOGV("NS_WHEEL_START, state: %s", mState->Name());
@@ -568,17 +568,17 @@ nsEventStatus
 AccessibleCaretEventHub::HandleTouchEvent(WidgetTouchEvent* aEvent)
 {
   nsEventStatus rv = nsEventStatus_eIgnore;
 
   int32_t id = (mActiveTouchId == kInvalidTouchId ?
                 aEvent->touches[0]->Identifier() : mActiveTouchId);
   nsPoint point = GetTouchEventPosition(aEvent, id);
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
   case NS_TOUCH_START:
     AC_LOGV("Before NS_TOUCH_START, state: %s", mState->Name());
     rv = mState->OnPress(this, point, id);
     AC_LOGV("After NS_TOUCH_START, state: %s, consume: %d", mState->Name(), rv);
     break;
 
   case NS_TOUCH_MOVE:
     AC_LOGV("Before NS_TOUCH_MOVE, state: %s", mState->Name());
@@ -604,17 +604,17 @@ AccessibleCaretEventHub::HandleTouchEven
   }
 
   return rv;
 }
 
 nsEventStatus
 AccessibleCaretEventHub::HandleKeyboardEvent(WidgetKeyboardEvent* aEvent)
 {
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
   case NS_KEY_UP:
   case NS_KEY_DOWN:
   case NS_KEY_PRESS:
     mManager->OnKeyboardEvent();
     break;
 
   default:
     break;
--- a/layout/base/SelectionCarets.cpp
+++ b/layout/base/SelectionCarets.cpp
@@ -199,21 +199,21 @@ SelectionCarets::HandleEvent(WidgetEvent
   // Get event coordinate relative to root frame
   nsIFrame* rootFrame = mPresShell->GetRootFrame();
   if (!rootFrame) {
     return nsEventStatus_eIgnore;
   }
   nsPoint ptInRoot =
     nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, movePoint, rootFrame);
 
-  if (aEvent->message == NS_TOUCH_START ||
-      (aEvent->message == NS_MOUSE_BUTTON_DOWN &&
+  if (aEvent->mMessage == NS_TOUCH_START ||
+      (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN &&
        mouseEvent->button == WidgetMouseEvent::eLeftButton)) {
     // If having a active touch, ignore other touch down event
-    if (aEvent->message == NS_TOUCH_START && mActiveTouchId >= 0) {
+    if (aEvent->mMessage == NS_TOUCH_START && mActiveTouchId >= 0) {
       return nsEventStatus_eConsumeNoDefault;
     }
 
     mActiveTouchId = nowTouchId;
     mDownPoint = ptInRoot;
     if (IsOnStartFrameInner(ptInRoot)) {
       mDragMode = START_FRAME;
       mCaretCenterToDownPointOffsetY = GetCaretYCenterPosition() - ptInRoot.y;
@@ -226,31 +226,31 @@ SelectionCarets::HandleEvent(WidgetEvent
       SetSelectionDirection(eDirNext);
       SetSelectionDragState(true);
       return nsEventStatus_eConsumeNoDefault;
     } else {
       mDragMode = NONE;
       mActiveTouchId = -1;
       LaunchLongTapDetector();
     }
-  } else if (aEvent->message == NS_TOUCH_END ||
-             aEvent->message == NS_TOUCH_CANCEL ||
-             aEvent->message == NS_MOUSE_BUTTON_UP) {
+  } else if (aEvent->mMessage == NS_TOUCH_END ||
+             aEvent->mMessage == NS_TOUCH_CANCEL ||
+             aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
     CancelLongTapDetector();
     if (mDragMode != NONE) {
       // Only care about same id
       if (mActiveTouchId == nowTouchId) {
         SetSelectionDragState(false);
         mDragMode = NONE;
         mActiveTouchId = -1;
       }
       return nsEventStatus_eConsumeNoDefault;
     }
-  } else if (aEvent->message == NS_TOUCH_MOVE ||
-             aEvent->message == NS_MOUSE_MOVE) {
+  } else if (aEvent->mMessage == NS_TOUCH_MOVE ||
+             aEvent->mMessage == NS_MOUSE_MOVE) {
     if (mDragMode == START_FRAME || mDragMode == END_FRAME) {
       if (mActiveTouchId == nowTouchId) {
         ptInRoot.y += mCaretCenterToDownPointOffsetY;
 
         if (mDragMode == START_FRAME) {
           if (ptInRoot.y > mDragDownYBoundary) {
             ptInRoot.y = mDragDownYBoundary;
           }
@@ -266,17 +266,17 @@ SelectionCarets::HandleEvent(WidgetEvent
     }
 
     nsPoint delta = mDownPoint - ptInRoot;
     if (NS_hypot(delta.x, delta.y) >
           nsPresContext::AppUnitsPerCSSPixel() * kMoveStartTolerancePx) {
       CancelLongTapDetector();
     }
 
-  } else if (aEvent->message == NS_MOUSE_MOZLONGTAP) {
+  } else if (aEvent->mMessage == NS_MOUSE_MOZLONGTAP) {
     if (!mVisible || !sSelectionCaretDetectsLongTap) {
       SELECTIONCARETS_LOG("SelectWord from NS_MOUSE_MOZLONGTAP");
 
       mDownPoint = ptInRoot;
       nsresult wordSelected = SelectWord();
 
       if (NS_FAILED(wordSelected)) {
         SELECTIONCARETS_LOG("SelectWord from NS_MOUSE_MOZLONGTAP failed!");
--- a/layout/base/TouchCaret.cpp
+++ b/layout/base/TouchCaret.cpp
@@ -754,17 +754,17 @@ TouchCaret::HandleEvent(WidgetEvent* aEv
 {
   MOZ_ASSERT(NS_IsMainThread());
   if (!IsDisplayable()) {
     return nsEventStatus_eIgnore;
   }
 
   nsEventStatus status = nsEventStatus_eIgnore;
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_TOUCH_START:
       status = HandleTouchDownEvent(aEvent->AsTouchEvent());
       break;
     case NS_MOUSE_BUTTON_DOWN:
       status = HandleMouseDownEvent(aEvent->AsMouseEvent());
       break;
     case NS_TOUCH_END:
       status = HandleTouchUpEvent(aEvent->AsTouchEvent());
@@ -785,17 +785,17 @@ TouchCaret::HandleEvent(WidgetEvent* aEv
       break;
     case NS_KEY_UP:
     case NS_KEY_DOWN:
     case NS_KEY_PRESS:
     case NS_WHEEL_WHEEL:
     case NS_WHEEL_START:
     case NS_WHEEL_STOP:
       // Disable touch caret while key/wheel event is received.
-      TOUCHCARET_LOG("Receive key/wheel event %d", aEvent->message);
+      TOUCHCARET_LOG("Receive key/wheel event %d", aEvent->mMessage);
       SetVisibility(false);
       break;
     case NS_MOUSE_MOZLONGTAP:
       if (mState == TOUCHCARET_TOUCHDRAG_ACTIVE) {
         // Disable long tap event from APZ while dragging the touch caret.
         status = nsEventStatus_eConsumeNoDefault;
       }
       break;
--- a/layout/base/TouchManager.cpp
+++ b/layout/base/TouchManager.cpp
@@ -96,17 +96,17 @@ TouchManager::EvictTouches()
 
 bool
 TouchManager::PreHandleEvent(WidgetEvent* aEvent,
                              nsEventStatus* aStatus,
                              bool& aTouchIsNew,
                              bool& aIsHandlingUserInput,
                              nsCOMPtr<nsIContent>& aCurrentEventContent)
 {
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_TOUCH_START: {
       aIsHandlingUserInput = true;
       WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
       // if there is only one touch in this touchstart event, assume that it is
       // the start of a new touch session and evict any old touches in the
       // queue
       if (touchEvent->touches.Length() == 1) {
         WidgetTouchEvent::AutoTouchArray touches;
@@ -118,34 +118,34 @@ TouchManager::PreHandleEvent(WidgetEvent
       // Add any new touches to the queue
       for (uint32_t i = 0; i < touchEvent->touches.Length(); ++i) {
         dom::Touch* touch = touchEvent->touches[i];
         int32_t id = touch->Identifier();
         if (!gCaptureTouchList->Get(id, nullptr)) {
           // If it is not already in the queue, it is a new touch
           touch->mChanged = true;
         }
-        touch->mMessage = aEvent->message;
+        touch->mMessage = aEvent->mMessage;
         gCaptureTouchList->Put(id, touch);
       }
       break;
     }
     case NS_TOUCH_MOVE: {
       // Check for touches that changed. Mark them add to queue
       WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
       WidgetTouchEvent::TouchArray& touches = touchEvent->touches;
       bool haveChanged = false;
       for (int32_t i = touches.Length(); i; ) {
         --i;
         dom::Touch* touch = touches[i];
         if (!touch) {
           continue;
         }
         int32_t id = touch->Identifier();
-        touch->mMessage = aEvent->message;
+        touch->mMessage = aEvent->mMessage;
 
         nsRefPtr<dom::Touch> oldTouch = gCaptureTouchList->GetWeak(id);
         if (!oldTouch) {
           touches.RemoveElementAt(i);
           continue;
         }
         if (!touch->Equals(oldTouch)) {
           touch->mChanged = true;
@@ -198,17 +198,17 @@ TouchManager::PreHandleEvent(WidgetEvent
       // need to make sure we only remove touches that are ending here
       WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
       WidgetTouchEvent::TouchArray& touches = touchEvent->touches;
       for (uint32_t i = 0; i < touches.Length(); ++i) {
         dom::Touch* touch = touches[i];
         if (!touch) {
           continue;
         }
-        touch->mMessage = aEvent->message;
+        touch->mMessage = aEvent->mMessage;
         touch->mChanged = true;
 
         int32_t id = touch->Identifier();
         nsRefPtr<dom::Touch> oldTouch = gCaptureTouchList->GetWeak(id);
         if (!oldTouch) {
           continue;
         }
         nsCOMPtr<EventTarget> targetPtr = oldTouch->mTarget;
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -462,43 +462,43 @@ public:
 class MOZ_STACK_CLASS nsPresShellEventCB : public EventDispatchingCallback
 {
 public:
   explicit nsPresShellEventCB(PresShell* aPresShell) : mPresShell(aPresShell) {}
 
   virtual void HandleEvent(EventChainPostVisitor& aVisitor) override
   {
     if (aVisitor.mPresContext && aVisitor.mEvent->mClass != eBasicEventClass) {
-      if (aVisitor.mEvent->message == NS_MOUSE_BUTTON_DOWN ||
-          aVisitor.mEvent->message == NS_MOUSE_BUTTON_UP) {
+      if (aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_DOWN ||
+          aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_UP) {
         // Mouse-up and mouse-down events call nsFrame::HandlePress/Release
         // which call GetContentOffsetsFromPoint which requires up-to-date layout.
         // Bring layout up-to-date now so that GetCurrentEventFrame() below
         // will return a real frame and we don't have to worry about
         // destroying it by flushing later.
         mPresShell->FlushPendingNotifications(Flush_Layout);
-      } else if (aVisitor.mEvent->message == NS_WHEEL_WHEEL &&
+      } else if (aVisitor.mEvent->mMessage == NS_WHEEL_WHEEL &&
                  aVisitor.mEventStatus != nsEventStatus_eConsumeNoDefault) {
         nsIFrame* frame = mPresShell->GetCurrentEventFrame();
         if (frame) {
           // chrome (including addons) should be able to know if content
           // handles both D3E "wheel" event and legacy mouse scroll events.
           // We should dispatch legacy mouse events before dispatching the
           // "wheel" event into system group.
           nsRefPtr<EventStateManager> esm =
             aVisitor.mPresContext->EventStateManager();
           esm->DispatchLegacyMouseScrollEvents(frame,
                                                aVisitor.mEvent->AsWheelEvent(),
                                                &aVisitor.mEventStatus);
         }
       }
       nsIFrame* frame = mPresShell->GetCurrentEventFrame();
       if (!frame &&
-          (aVisitor.mEvent->message == NS_MOUSE_BUTTON_UP ||
-           aVisitor.mEvent->message == NS_TOUCH_END)) {
+          (aVisitor.mEvent->mMessage == NS_MOUSE_BUTTON_UP ||
+           aVisitor.mEvent->mMessage == NS_TOUCH_END)) {
         // Redirect BUTTON_UP and TOUCH_END events to the root frame to ensure
         // that capturing is released.
         frame = mPresShell->GetRootFrame();
       }
       if (frame) {
         frame->HandleEvent(aVisitor.mPresContext,
                            aVisitor.mEvent->AsGUIEvent(),
                            &aVisitor.mEventStatus);
@@ -6337,17 +6337,17 @@ nsIPresShell::GetPointerInfo(uint32_t aP
     return true;
   }
   return false;
 }
 
 void
 PresShell::UpdateActivePointerState(WidgetGUIEvent* aEvent)
 {
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
   case NS_MOUSE_ENTER_WIDGET:
     // In this case we have to know information about available mouse pointers
     if (WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent()) {
       gActivePointersIds->Put(mouseEvent->pointerId,
                               new PointerInfo(false, mouseEvent->inputSource, true));
     }
     break;
   case NS_POINTER_DOWN:
@@ -6557,40 +6557,42 @@ PresShell::RecordMouseLocation(WidgetGUI
   if (!mPresContext->IsRoot()) {
     PresShell* rootPresShell = GetRootPresShell();
     if (rootPresShell) {
       rootPresShell->RecordMouseLocation(aEvent);
     }
     return;
   }
 
-  if ((aEvent->message == NS_MOUSE_MOVE &&
+  if ((aEvent->mMessage == NS_MOUSE_MOVE &&
        aEvent->AsMouseEvent()->reason == WidgetMouseEvent::eReal) ||
-      aEvent->message == NS_MOUSE_ENTER_WIDGET ||
-      aEvent->message == NS_MOUSE_BUTTON_DOWN ||
-      aEvent->message == NS_MOUSE_BUTTON_UP) {
+      aEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
+      aEvent->mMessage == NS_MOUSE_BUTTON_DOWN ||
+      aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
     nsIFrame* rootFrame = GetRootFrame();
     if (!rootFrame) {
       nsView* rootView = mViewManager->GetRootView();
       mMouseLocation = nsLayoutUtils::TranslateWidgetToView(mPresContext,
         aEvent->widget, aEvent->refPoint, rootView);
     } else {
       mMouseLocation =
         nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, rootFrame);
     }
 #ifdef DEBUG_MOUSE_LOCATION
-    if (aEvent->message == NS_MOUSE_ENTER_WIDGET)
+    if (aEvent->mMessage == NS_MOUSE_ENTER_WIDGET) {
       printf("[ps=%p]got mouse enter for %p\n",
              this, aEvent->widget);
+    }
     printf("[ps=%p]setting mouse location to (%d,%d)\n",
            this, mMouseLocation.x, mMouseLocation.y);
 #endif
-    if (aEvent->message == NS_MOUSE_ENTER_WIDGET)
+    if (aEvent->mMessage == NS_MOUSE_ENTER_WIDGET) {
       SynthesizeMouseMove(false);
-  } else if (aEvent->message == NS_MOUSE_EXIT_WIDGET) {
+    }
+  } else if (aEvent->mMessage == NS_MOUSE_EXIT_WIDGET) {
     // Although we only care about the mouse moving into an area for which this
     // pres shell doesn't receive mouse move events, we don't check which widget
     // the mouse exit was for since this seems to vary by platform.  Hopefully
     // this won't matter at all since we'll get the mouse move or enter after
     // the mouse exit when the mouse moves from one of our widgets into another.
     mMouseLocation = nsPoint(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE);
 #ifdef DEBUG_MOUSE_LOCATION
     printf("[ps=%p]got mouse exit for %p\n",
@@ -6657,17 +6659,17 @@ DispatchPointerFromMouseOrTouch(PresShel
   uint32_t pointerMessage = 0;
   if (aEvent->mClass == eMouseEventClass) {
     WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
     // if it is not mouse then it is likely will come as touch event
     if (!mouseEvent->convertToPointer) {
       return NS_OK;
     }
     int16_t button = mouseEvent->button;
-    switch (mouseEvent->message) {
+    switch (mouseEvent->mMessage) {
     case NS_MOUSE_MOVE:
       if (mouseEvent->buttons == 0) {
         button = -1;
       }
       pointerMessage = NS_POINTER_MOVE;
       break;
     case NS_MOUSE_BUTTON_UP:
       pointerMessage = NS_POINTER_UP;
@@ -6675,28 +6677,28 @@ DispatchPointerFromMouseOrTouch(PresShel
     case NS_MOUSE_BUTTON_DOWN:
       pointerMessage = NS_POINTER_DOWN;
       break;
     default:
       return NS_OK;
     }
 
     WidgetPointerEvent event(*mouseEvent);
-    event.message = pointerMessage;
+    event.mMessage = pointerMessage;
     event.button = button;
     event.pressure = event.buttons ?
                      mouseEvent->pressure ? mouseEvent->pressure : 0.5f :
                      0.0f;
     event.convertToPointer = mouseEvent->convertToPointer = false;
     aShell->HandleEvent(aFrame, &event, aDontRetargetEvents, aStatus, aTargetContent);
   } else if (aEvent->mClass == eTouchEventClass) {
     WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
     // loop over all touches and dispatch pointer events on each touch
     // copy the event
-    switch (touchEvent->message) {
+    switch (touchEvent->mMessage) {
     case NS_TOUCH_MOVE:
       pointerMessage = NS_POINTER_MOVE;
       break;
     case NS_TOUCH_END:
       pointerMessage = NS_POINTER_UP;
       break;
     case NS_TOUCH_START:
       pointerMessage = NS_POINTER_DOWN;
@@ -6835,17 +6837,17 @@ PresShell::DispatchBeforeKeyboardEventIn
                                                bool& aDefaultPrevented)
 {
   size_t length = aChain.Length();
   if (!CanDispatchEvent(&aEvent) || !length) {
     return;
   }
 
   uint32_t message =
-    (aEvent.message == NS_KEY_DOWN) ? NS_KEY_BEFORE_DOWN : NS_KEY_BEFORE_UP;
+    (aEvent.mMessage == NS_KEY_DOWN) ? NS_KEY_BEFORE_DOWN : NS_KEY_BEFORE_UP;
   nsCOMPtr<EventTarget> eventTarget;
   // Dispatch before events from the outermost element.
   for (int32_t i = length - 1; i >= 0; i--) {
     eventTarget = do_QueryInterface(aChain[i]->OwnerDoc()->GetWindow());
     if (!eventTarget || !CanDispatchEvent(&aEvent)) {
       return;
     }
 
@@ -6869,17 +6871,17 @@ PresShell::DispatchAfterKeyboardEventInt
                                               size_t aStartOffset)
 {
   size_t length = aChain.Length();
   if (!CanDispatchEvent(&aEvent) || !length) {
     return;
   }
 
   uint32_t message =
-    (aEvent.message == NS_KEY_DOWN) ? NS_KEY_AFTER_DOWN : NS_KEY_AFTER_UP;
+    (aEvent.mMessage == NS_KEY_DOWN) ? NS_KEY_AFTER_DOWN : NS_KEY_AFTER_UP;
   bool embeddedCancelled = aEmbeddedCancelled;
   nsCOMPtr<EventTarget> eventTarget;
   // Dispatch after events from the innermost element.
   for (uint32_t i = aStartOffset; i < length; i++) {
     eventTarget = do_QueryInterface(aChain[i]->OwnerDoc()->GetWindow());
     if (!eventTarget || !CanDispatchEvent(&aEvent)) {
       return;
     }
@@ -6896,18 +6898,18 @@ PresShell::DispatchAfterKeyboardEventInt
 void
 PresShell::DispatchAfterKeyboardEvent(nsINode* aTarget,
                                       const WidgetKeyboardEvent& aEvent,
                                       bool aEmbeddedCancelled)
 {
   MOZ_ASSERT(aTarget);
   MOZ_ASSERT(BeforeAfterKeyboardEventEnabled());
 
-  if (NS_WARN_IF(aEvent.message != NS_KEY_DOWN &&
-                 aEvent.message != NS_KEY_UP)) {
+  if (NS_WARN_IF(aEvent.mMessage != NS_KEY_DOWN &&
+                 aEvent.mMessage != NS_KEY_UP)) {
     return;
   }
 
   // Build up a target chain. Each item in the chain will receive an after event.
   nsAutoTArray<nsCOMPtr<Element>, 5> chain;
   bool targetIsIframe = false;
   BuildTargetChainForBeforeAfterKeyboardEvent(aTarget, chain, targetIsIframe);
   DispatchAfterKeyboardEventInternal(chain, aEvent, aEmbeddedCancelled);
@@ -6926,25 +6928,25 @@ PresShell::CanDispatchEvent(const Widget
 
 void
 PresShell::HandleKeyboardEvent(nsINode* aTarget,
                                WidgetKeyboardEvent& aEvent,
                                bool aEmbeddedCancelled,
                                nsEventStatus* aStatus,
                                EventDispatchingCallback* aEventCB)
 {
-  if (aEvent.message == NS_KEY_PRESS ||
+  if (aEvent.mMessage == NS_KEY_PRESS ||
       !BeforeAfterKeyboardEventEnabled()) {
     EventDispatcher::Dispatch(aTarget, mPresContext,
                               &aEvent, nullptr, aStatus, aEventCB);
     return;
   }
 
   MOZ_ASSERT(aTarget);
-  MOZ_ASSERT(aEvent.message == NS_KEY_DOWN || aEvent.message == NS_KEY_UP);
+  MOZ_ASSERT(aEvent.mMessage == NS_KEY_DOWN || aEvent.mMessage == NS_KEY_UP);
 
   // Build up a target chain. Each item in the chain will receive a before event.
   nsAutoTArray<nsCOMPtr<Element>, 5> chain;
   bool targetIsIframe = false;
   BuildTargetChainForBeforeAfterKeyboardEvent(aTarget, chain, targetIsIframe);
 
   // Dispatch before events. If each item in the chain consumes the before
   // event and doesn't prevent the default action, we will go further to
@@ -7115,17 +7117,17 @@ PresShell::HandleEvent(nsIFrame* aFrame,
   if (!nsContentUtils::IsSafeToRunScript() &&
       aEvent->IsAllowedToDispatchDOMEvent()) {
     if (aEvent->mClass == eCompositionEventClass) {
       IMEStateManager::OnCompositionEventDiscarded(
         aEvent->AsCompositionEvent());
     }
 #ifdef DEBUG
     if (aEvent->IsIMERelatedEvent()) {
-      nsPrintfCString warning("%d event is discarded", aEvent->message);
+      nsPrintfCString warning("%d event is discarded", aEvent->mMessage);
       NS_WARNING(warning.get());
     }
 #endif
     nsContentUtils::WarnScriptWasIgnored(GetDocument());
     return NS_OK;
   }
 
   nsIContent* capturingContent = ((aEvent->mClass == ePointerEventClass ||
@@ -7170,17 +7172,17 @@ PresShell::HandleEvent(nsIFrame* aFrame,
     if (retargetEventDoc) {
       nsCOMPtr<nsIPresShell> presShell = retargetEventDoc->GetShell();
       if (!presShell)
         return NS_OK;
 
       if (presShell != this) {
         nsIFrame* frame = presShell->GetRootFrame();
         if (!frame) {
-          if (aEvent->message == NS_QUERY_TEXT_CONTENT ||
+          if (aEvent->mMessage == NS_QUERY_TEXT_CONTENT ||
               aEvent->IsContentCommandEvent()) {
             return NS_OK;
           }
 
           frame = GetNearestFrameContainingPresShell(presShell);
         }
 
         if (!frame)
@@ -7189,17 +7191,17 @@ PresShell::HandleEvent(nsIFrame* aFrame,
         nsCOMPtr<nsIPresShell> shell = frame->PresContext()->GetPresShell();
         return shell->HandleEvent(frame, aEvent, true, aEventStatus);
       }
     }
   }
 
   if (aEvent->mClass == eKeyboardEventClass &&
       mDocument && mDocument->EventHandlingSuppressed()) {
-    if (aEvent->message == NS_KEY_DOWN) {
+    if (aEvent->mMessage == NS_KEY_DOWN) {
       mNoDelayedKeyEvents = true;
     } else if (!mNoDelayedKeyEvents) {
       DelayedEvent* event = new DelayedKeyEvent(aEvent->AsKeyboardEvent());
       if (!mDelayedEvents.AppendElement(event)) {
         delete event;
       }
     }
     return NS_OK;
@@ -7297,33 +7299,33 @@ PresShell::HandleEvent(nsIFrame* aFrame,
       else {
         ClearMouseCapture(nullptr);
         capturingContent = nullptr;
       }
     }
 
     // all touch events except for touchstart use a captured target
     if (aEvent->mClass == eTouchEventClass &&
-        aEvent->message != NS_TOUCH_START) {
+        aEvent->mMessage != NS_TOUCH_START) {
       captureRetarget = true;
     }
 
     WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
-    bool isWindowLevelMouseExit = (aEvent->message == NS_MOUSE_EXIT_WIDGET) &&
+    bool isWindowLevelMouseExit = (aEvent->mMessage == NS_MOUSE_EXIT_WIDGET) &&
       (mouseEvent && mouseEvent->exit == WidgetMouseEvent::eTopLevel);
 
     // Get the frame at the event point. However, don't do this if we're
     // capturing and retargeting the event because the captured frame will
     // be used instead below. Also keep using the root frame if we're dealing
     // with a window-level mouse exit event since we want to start sending
     // mouse out events at the root EventStateManager.
     if (!captureRetarget && !isWindowLevelMouseExit) {
       nsPoint eventPoint;
       uint32_t flags = 0;
-      if (aEvent->message == NS_TOUCH_START) {
+      if (aEvent->mMessage == NS_TOUCH_START) {
         flags |= INPUT_IGNORE_ROOT_SCROLL_FRAME;
         WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
         // if this is a continuing session, ensure that all these events are
         // in the same document by taking the target of the events already in
         // the capture list
         nsCOMPtr<nsIContent> anyTarget;
         if (TouchManager::gCaptureTouchList->Count() > 0 && touchEvent->touches.Length() > 1) {
           TouchManager::gCaptureTouchList->Enumerate(&FindAnyTarget, &anyTarget);
@@ -7441,64 +7443,65 @@ PresShell::HandleEvent(nsIFrame* aFrame,
         // Prevent application crashes, in case damaged frame.
         if (!frameKeeper.IsAlive()) {
           frame = nullptr;
         }
       }
     }
 
     if (aEvent->mClass == ePointerEventClass &&
-        aEvent->message != NS_POINTER_DOWN) {
+        aEvent->mMessage != NS_POINTER_DOWN) {
       if (WidgetPointerEvent* pointerEvent = aEvent->AsPointerEvent()) {
         uint32_t pointerId = pointerEvent->pointerId;
         nsIContent* pointerCapturingContent = GetPointerCapturingContent(pointerId);
 
         if (pointerCapturingContent) {
           if (nsIFrame* capturingFrame = pointerCapturingContent->GetPrimaryFrame()) {
             // If pointer capture is set, we should suppress pointerover/pointerenter events
             // for all elements except element which have pointer capture. (Code in EventStateManager)
             pointerEvent->retargetedByPointerCapture =
               frame && frame->GetContent() &&
               !nsContentUtils::ContentIsDescendantOf(frame->GetContent(), pointerCapturingContent);
             frame = capturingFrame;
           }
 
-          if (pointerEvent->message == NS_POINTER_UP ||
-              pointerEvent->message == NS_POINTER_CANCEL) {
+          if (pointerEvent->mMessage == NS_POINTER_UP ||
+              pointerEvent->mMessage == NS_POINTER_CANCEL) {
             // Implicitly releasing capture for given pointer.
             // LOST_POINTER_CAPTURE should be send after NS_POINTER_UP or NS_POINTER_CANCEL.
             releasePointerCaptureCaller.SetTarget(pointerId, pointerCapturingContent);
           }
         }
       }
     }
 
     // Suppress mouse event if it's being targeted at an element inside
     // a document which needs events suppressed
     if (aEvent->mClass == eMouseEventClass &&
         frame->PresContext()->Document()->EventHandlingSuppressed()) {
-      if (aEvent->message == NS_MOUSE_BUTTON_DOWN) {
+      if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
         mNoDelayedMouseEvents = true;
-      } else if (!mNoDelayedMouseEvents && aEvent->message == NS_MOUSE_BUTTON_UP) {
+      } else if (!mNoDelayedMouseEvents &&
+                 aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
         DelayedEvent* event = new DelayedMouseEvent(aEvent->AsMouseEvent());
         if (!mDelayedEvents.AppendElement(event)) {
           delete event;
         }
       }
       return NS_OK;
     }
 
     if (!frame) {
       NS_WARNING("Nothing to handle this event!");
       return NS_OK;
     }
 
     PresShell* shell =
         static_cast<PresShell*>(frame->PresContext()->PresShell());
-    switch (aEvent->message) {
+    switch (aEvent->mMessage) {
       case NS_TOUCH_MOVE:
       case NS_TOUCH_CANCEL:
       case NS_TOUCH_END: {
         // get the correct shell to dispatch to
         WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
         for (dom::Touch* touch : touchEvent->touches) {
           if (!touch) {
             break;
@@ -7618,37 +7621,38 @@ PresShell::HandleEvent(nsIFrame* aFrame,
           if (!eventTarget) {
             eventTarget = mDocument->GetRootElement();
           }
         } else {
           eventTarget = mDocument->GetRootElement();
         }
       }
 
-      if (aEvent->message == NS_KEY_DOWN) {
+      if (aEvent->mMessage == NS_KEY_DOWN) {
         NS_IF_RELEASE(gKeyDownTarget);
         NS_IF_ADDREF(gKeyDownTarget = eventTarget);
       }
-      else if ((aEvent->message == NS_KEY_PRESS || aEvent->message == NS_KEY_UP) &&
+      else if ((aEvent->mMessage == NS_KEY_PRESS ||
+                aEvent->mMessage == NS_KEY_UP) &&
                gKeyDownTarget) {
         // If a different element is now focused for the keypress/keyup event
         // than what was focused during the keydown event, check if the new
         // focused element is not in a chrome document any more, and if so,
         // retarget the event back at the keydown target. This prevents a
         // content area from grabbing the focus from chrome in-between key
         // events.
         if (eventTarget) {
           bool keyDownIsChrome = nsContentUtils::IsChromeDoc(gKeyDownTarget->GetComposedDoc());
           if (keyDownIsChrome != nsContentUtils::IsChromeDoc(eventTarget->GetComposedDoc()) ||
               (keyDownIsChrome && TabParent::GetFrom(eventTarget))) {
             eventTarget = gKeyDownTarget;
           }
         }
 
-        if (aEvent->message == NS_KEY_UP) {
+        if (aEvent->mMessage == NS_KEY_UP) {
           NS_RELEASE(gKeyDownTarget);
         }
       }
 
       mCurrentEventFrame = nullptr;
       nsIDocument* targetDoc = eventTarget ? eventTarget->OwnerDoc() : nullptr;
       if (targetDoc && targetDoc != mDocument) {
         PopCurrentEventInfo();
@@ -7826,17 +7830,17 @@ PresShell::HandleEventInternal(WidgetEve
   nsresult rv = NS_OK;
 
   if (!NS_EVENT_NEEDS_FRAME(aEvent) || GetCurrentEventFrame() || GetCurrentEventContent()) {
     bool touchIsNew = false;
     bool isHandlingUserInput = false;
 
     // XXX How about IME events and input events for plugins?
     if (aEvent->mFlags.mIsTrusted) {
-      switch (aEvent->message) {
+      switch (aEvent->mMessage) {
       case NS_KEY_PRESS:
       case NS_KEY_DOWN:
       case NS_KEY_UP: {
         nsIDocument* doc = GetCurrentEventContent() ?
                            mCurrentEventContent->OwnerDoc() : nullptr;
         auto keyCode = aEvent->AsKeyboardEvent()->keyCode;
         if (keyCode == NS_VK_ESCAPE) {
           nsIDocument* root = nsContentUtils::GetRootDocument(doc);
@@ -7846,29 +7850,29 @@ PresShell::HandleEventInternal(WidgetEve
             // handler from stopping all loads in the document, which
             // would cause <video> loads to stop.
             aEvent->mFlags.mDefaultPrevented = true;
             aEvent->mFlags.mOnlyChromeDispatch = true;
 
             // The event listeners in chrome can prevent this ESC behavior by
             // calling prevent default on the preceding keydown/press events.
             if (!mIsLastChromeOnlyEscapeKeyConsumed &&
-                aEvent->message == NS_KEY_UP) {
+                aEvent->mMessage == NS_KEY_UP) {
               // ESC key released while in DOM fullscreen mode.
               // Fully exit all browser windows and documents from
               // fullscreen mode.
               nsIDocument::AsyncExitFullscreen(nullptr);
             }
           }
           nsCOMPtr<nsIDocument> pointerLockedDoc =
             do_QueryReferent(EventStateManager::sPointerLockedDoc);
           if (!mIsLastChromeOnlyEscapeKeyConsumed && pointerLockedDoc) {
             aEvent->mFlags.mDefaultPrevented = true;
             aEvent->mFlags.mOnlyChromeDispatch = true;
-            if (aEvent->message == NS_KEY_UP) {
+            if (aEvent->mMessage == NS_KEY_UP) {
               nsIDocument::UnlockPointer();
             }
           }
         }
         if (keyCode != NS_VK_ESCAPE && keyCode != NS_VK_SHIFT &&
             keyCode != NS_VK_CONTROL && keyCode != NS_VK_ALT &&
             keyCode != NS_VK_WIN && keyCode != NS_VK_META) {
           // Allow keys other than ESC and modifiers be marked as a
@@ -7897,32 +7901,32 @@ PresShell::HandleEventInternal(WidgetEve
 
       if (!mTouchManager.PreHandleEvent(aEvent, aStatus,
                                         touchIsNew, isHandlingUserInput,
                                         mCurrentEventContent)) {
         return NS_OK;
       }
     }
 
-    if (aEvent->message == NS_CONTEXTMENU) {
+    if (aEvent->mMessage == NS_CONTEXTMENU) {
       WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
       if (mouseEvent->context == WidgetMouseEvent::eContextMenuKey &&
           !AdjustContextMenuKeyEvent(mouseEvent)) {
         return NS_OK;
       }
       if (mouseEvent->IsShift()) {
         aEvent->mFlags.mOnlyChromeDispatch = true;
         aEvent->mFlags.mRetargetToNonNativeAnonymous = true;
       }
     }
 
     AutoHandlingUserInputStatePusher userInpStatePusher(isHandlingUserInput,
                                                         aEvent, mDocument);
 
-    if (aEvent->mFlags.mIsTrusted && aEvent->message == NS_MOUSE_MOVE) {
+    if (aEvent->mFlags.mIsTrusted && aEvent->mMessage == NS_MOUSE_MOVE) {
       nsIPresShell::AllowMouseCapture(
         EventStateManager::GetActiveEventStateManager() == manager);
     }
 
     nsAutoPopupStatePusher popupStatePusher(
                              Event::GetEventPopupControlState(aEvent));
 
     // FIXME. If the event was reused, we need to clear the old target,
@@ -7957,22 +7961,22 @@ PresShell::HandleEventInternal(WidgetEve
       // 3. Give event to event manager for post event state changes and
       //    generation of synthetic events.
       if (!mIsDestroying && NS_SUCCEEDED(rv)) {
         rv = manager->PostHandleEvent(mPresContext, aEvent,
                                       GetCurrentEventFrame(), aStatus);
       }
     }
 
-    switch (aEvent->message) {
+    switch (aEvent->mMessage) {
     case NS_KEY_PRESS:
     case NS_KEY_DOWN:
     case NS_KEY_UP: {
       if (aEvent->AsKeyboardEvent()->keyCode == NS_VK_ESCAPE) {
-        if (aEvent->message == NS_KEY_UP) {
+        if (aEvent->mMessage == NS_KEY_UP) {
           // Reset this flag after key up is handled.
           mIsLastChromeOnlyEscapeKeyConsumed = false;
         } else {
           if (aEvent->mFlags.mOnlyChromeDispatch &&
               aEvent->mFlags.mDefaultPreventedByChrome) {
             mIsLastChromeOnlyEscapeKeyConsumed = true;
           }
         }
@@ -8064,19 +8068,19 @@ void
 PresShell::DispatchTouchEventToDOM(WidgetEvent* aEvent,
                                    nsEventStatus* aStatus,
                                    nsPresShellEventCB* aEventCB,
                                    bool aTouchIsNew)
 {
   // calling preventDefault on touchstart or the first touchmove for a
   // point prevents mouse events. calling it on the touchend should
   // prevent click dispatching.
-  bool canPrevent = (aEvent->message == NS_TOUCH_START) ||
-              (aEvent->message == NS_TOUCH_MOVE && aTouchIsNew) ||
-              (aEvent->message == NS_TOUCH_END);
+  bool canPrevent = (aEvent->mMessage == NS_TOUCH_START) ||
+                    (aEvent->mMessage == NS_TOUCH_MOVE && aTouchIsNew) ||
+                    (aEvent->mMessage == NS_TOUCH_END);
   bool preventDefault = false;
   nsEventStatus tmpStatus = nsEventStatus_eIgnore;
   WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
 
   // loop over all touches and dispatch events on any that have changed
   for (dom::Touch* touch : touchEvent->touches) {
     if (!touch || !touch->mChanged) {
       continue;
@@ -8094,17 +8098,17 @@ PresShell::DispatchTouchEventToDOM(Widge
       if (capturingContent->OwnerDoc() != doc) {
         // Wrong document, don't dispatch anything.
         continue;
       }
       content = capturingContent;
     }
     // copy the event
     WidgetTouchEvent newEvent(touchEvent->mFlags.mIsTrusted,
-                              touchEvent->message, touchEvent->widget);
+                              touchEvent->mMessage, touchEvent->widget);
     newEvent.AssignTouchEventData(*touchEvent, false);
     newEvent.target = targetPtr;
 
     nsRefPtr<PresShell> contentPresShell;
     if (doc == mDocument) {
       contentPresShell = static_cast<PresShell*>(doc->GetShell());
       if (contentPresShell) {
         //XXXsmaug huge hack. Pushing possibly capturing content,
@@ -9531,30 +9535,30 @@ PresShell::DelayedInputEvent::Dispatch()
   widget->DispatchEvent(mEvent, status);
 }
 
 PresShell::DelayedMouseEvent::DelayedMouseEvent(WidgetMouseEvent* aEvent) :
   DelayedInputEvent()
 {
   WidgetMouseEvent* mouseEvent =
     new WidgetMouseEvent(aEvent->mFlags.mIsTrusted,
-                         aEvent->message,
+                         aEvent->mMessage,
                          aEvent->widget,
                          aEvent->reason,
                          aEvent->context);
   mouseEvent->AssignMouseEventData(*aEvent, false);
   mEvent = mouseEvent;
 }
 
 PresShell::DelayedKeyEvent::DelayedKeyEvent(WidgetKeyboardEvent* aEvent) :
   DelayedInputEvent()
 {
   WidgetKeyboardEvent* keyEvent =
     new WidgetKeyboardEvent(aEvent->mFlags.mIsTrusted,
-                            aEvent->message,
+                            aEvent->mMessage,
                             aEvent->widget);
   keyEvent->AssignKeyEventData(*aEvent, false);
   keyEvent->mFlags.mIsSynthesizedForTests = aEvent->mFlags.mIsSynthesizedForTests;
   mEvent = keyEvent;
 }
 
 // Start of DEBUG only code
 
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -1128,17 +1128,17 @@ nsComboboxControlFrame::HandleEvent(nsPr
   }
 
   EventStates eventStates = mContent->AsElement()->State();
   if (eventStates.HasState(NS_EVENT_STATE_DISABLED)) {
     return NS_OK;
   }
 
 #if COMBOBOX_ROLLUP_CONSUME_EVENT == 0
-  if (aEvent->message == NS_MOUSE_BUTTON_DOWN) {
+  if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
     nsIWidget* widget = GetNearestWidget();
     if (widget && GetContent() == widget->GetLastRollup()) {
       // This event did a Rollup on this control - prevent it from opening
       // the dropdown again!
       *aEventStatus = nsEventStatus_eConsumeNoDefault;
       return NS_OK;
     }
   }
--- a/layout/forms/nsImageControlFrame.cpp
+++ b/layout/forms/nsImageControlFrame.cpp
@@ -157,17 +157,17 @@ nsImageControlFrame::HandleEvent(nsPresC
     return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
 
   if (mContent->HasAttr(kNameSpaceID_None, nsGkAtoms::disabled)) { // XXX cache disabled
     return NS_OK;
   }
 
   *aEventStatus = nsEventStatus_eIgnore;
 
-  if (aEvent->message == NS_MOUSE_BUTTON_UP &&
+  if (aEvent->mMessage == NS_MOUSE_BUTTON_UP &&
       aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) {
     // Store click point for HTMLInputElement::SubmitNamesValues
     // Do this on MouseUp because the specs don't say and that's what IE does
     nsIntPoint* lastClickPoint =
       static_cast<nsIntPoint*>
                  (mContent->GetProperty(nsGkAtoms::imageClickedPoint));
     if (lastClickPoint) {
       // normally lastClickedPoint is not null, as it's allocated in Init()
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -893,21 +893,21 @@ nsListControlFrame::HandleEvent(nsPresCo
                           "NS_MOUSE_OVER",
                           "NS_MOUSE_OUT",
                           "NS_MOUSE_LEFT_DOUBLECLICK",
                           "NS_MOUSE_MIDDLE_DOUBLECLICK",
                           "NS_MOUSE_RIGHT_DOUBLECLICK",
                           "NS_MOUSE_LEFT_CLICK",
                           "NS_MOUSE_MIDDLE_CLICK",
                           "NS_MOUSE_RIGHT_CLICK"};
-  int inx = aEvent->message-NS_MOUSE_MESSAGE_START;
+  int inx = aEvent->mMessage-NS_MOUSE_MESSAGE_START;
   if (inx >= 0 && inx <= (NS_MOUSE_RIGHT_CLICK-NS_MOUSE_MESSAGE_START)) {
-    printf("Mouse in ListFrame %s [%d]\n", desc[inx], aEvent->message);
+    printf("Mouse in ListFrame %s [%d]\n", desc[inx], aEvent->mMessage);
   } else {
-    printf("Mouse in ListFrame <UNKNOWN> [%d]\n", aEvent->message);
+    printf("Mouse in ListFrame <UNKNOWN> [%d]\n", aEvent->mMessage);
   }*/
 
   if (nsEventStatus_eConsumeNoDefault == *aEventStatus)
     return NS_OK;
 
   // do we have style that affects how we are selected?
   // do we have user-input style?
   const nsStyleUserInterface* uiStyle = StyleUserInterface();
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2553,28 +2553,30 @@ nsFrame::FireDOMEvent(const nsAString& a
 }
 
 nsresult
 nsFrame::HandleEvent(nsPresContext* aPresContext, 
                      WidgetGUIEvent* aEvent,
                      nsEventStatus* aEventStatus)
 {
 
-  if (aEvent->message == NS_MOUSE_MOVE) {
+  if (aEvent->mMessage == NS_MOUSE_MOVE) {
     // XXX If the second argument of HandleDrag() is WidgetMouseEvent,
     //     the implementation becomes simpler.
     return HandleDrag(aPresContext, aEvent, aEventStatus);
   }
 
   if ((aEvent->mClass == eMouseEventClass &&
        aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) ||
       aEvent->mClass == eTouchEventClass) {
-    if (aEvent->message == NS_MOUSE_BUTTON_DOWN || aEvent->message == NS_TOUCH_START) {
+    if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN ||
+        aEvent->mMessage == NS_TOUCH_START) {
       HandlePress(aPresContext, aEvent, aEventStatus);
-    } else if (aEvent->message == NS_MOUSE_BUTTON_UP || aEvent->message == NS_TOUCH_END) {
+    } else if (aEvent->mMessage == NS_MOUSE_BUTTON_UP ||
+               aEvent->mMessage == NS_TOUCH_END) {
       HandleRelease(aPresContext, aEvent, aEventStatus);
     }
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsFrame::GetDataForTableSelection(const nsFrameSelection* aFrameSelection,
@@ -2597,18 +2599,18 @@ nsFrame::GetDataForTableSelection(const 
 
   // DISPLAY_ALL means we're in an editor.
   // If already in cell selection mode, 
   //  continue selecting with mouse drag or end on mouse up,
   //  or when using shift key to extend block of cells
   //  (Mouse down does normal selection unless Ctrl/Cmd is pressed)
   bool doTableSelection =
      displaySelection == nsISelectionDisplay::DISPLAY_ALL && selectingTableCells &&
-     (aMouseEvent->message == NS_MOUSE_MOVE ||
-      (aMouseEvent->message == NS_MOUSE_BUTTON_UP &&
+     (aMouseEvent->mMessage == NS_MOUSE_MOVE ||
+      (aMouseEvent->mMessage == NS_MOUSE_BUTTON_UP &&
        aMouseEvent->button == WidgetMouseEvent::eLeftButton) ||
       aMouseEvent->IsShift());
 
   if (!doTableSelection)
   {  
     // In Browser, special 'table selection' key must be pressed for table selection
     // or when just Shift is pressed and we're already in table/cell selection mode
 #ifdef XP_MACOSX
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -646,17 +646,17 @@ void nsHTMLFramesetFrame::GetSizeOfChild
 
 nsresult nsHTMLFramesetFrame::HandleEvent(nsPresContext* aPresContext,
                                            WidgetGUIEvent* aEvent,
                                            nsEventStatus* aEventStatus)
 {
   NS_ENSURE_ARG_POINTER(aEventStatus);
   if (mDragger) {
     // the nsFramesetBorderFrame has captured NS_MOUSE_DOWN
-    switch (aEvent->message) {
+    switch (aEvent->mMessage) {
       case NS_MOUSE_MOVE:
         MouseDrag(aPresContext, aEvent);
 	      break;
       case NS_MOUSE_BUTTON_UP:
         if (aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) {
           EndMouseDrag(aPresContext);
         }
 	      break;
@@ -1532,17 +1532,17 @@ nsHTMLFramesetBorderFrame::HandleEvent(n
   NS_ENSURE_ARG_POINTER(aEventStatus);
   *aEventStatus = nsEventStatus_eIgnore;
 
   //XXX Mouse setting logic removed.  The remaining logic should also move.
   if (!mCanResize) {
     return NS_OK;
   }
 
-  if (aEvent->message == NS_MOUSE_BUTTON_DOWN &&
+  if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN &&
       aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) {
     nsHTMLFramesetFrame* parentFrame = do_QueryFrame(GetParent());
     if (parentFrame) {
       parentFrame->StartMouseDrag(aPresContext, this, aEvent);
       *aEventStatus = nsEventStatus_eConsumeNoDefault;
     }
   }
   return NS_OK;
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -2005,19 +2005,19 @@ nsImageFrame::GetContentForEvent(WidgetE
 // XXX what should clicks on transparent pixels do?
 nsresult
 nsImageFrame::HandleEvent(nsPresContext* aPresContext,
                           WidgetGUIEvent* aEvent,
                           nsEventStatus* aEventStatus)
 {
   NS_ENSURE_ARG_POINTER(aEventStatus);
 
-  if ((aEvent->message == NS_MOUSE_BUTTON_UP && 
+  if ((aEvent->mMessage == NS_MOUSE_BUTTON_UP && 
        aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) ||
-      aEvent->message == NS_MOUSE_MOVE) {
+      aEvent->mMessage == NS_MOUSE_MOVE) {
     nsImageMap* map = GetImageMap();
     bool isServerMap = IsServerImageMap();
     if ((nullptr != map) || isServerMap) {
       nsIntPoint p;
       TranslateEventCoords(
         nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, this), p);
       bool inside = false;
       // Even though client-side image map triggering happens
@@ -2045,17 +2045,17 @@ nsImageFrame::HandleEvent(nsPresContext*
           if (p.x < 0) p.x = 0;
           if (p.y < 0) p.y = 0;
           nsAutoCString spec;
           uri->GetSpec(spec);
           spec += nsPrintfCString("?%d,%d", p.x, p.y);
           uri->SetSpec(spec);                
           
           bool clicked = false;
-          if (aEvent->message == NS_MOUSE_BUTTON_UP) {
+          if (aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
             *aEventStatus = nsEventStatus_eConsumeDoDefault; 
             clicked = true;
           }
           nsContentUtils::TriggerLink(anchorNode, aPresContext, uri, target,
                                       clicked, true, true);
         }
       }
     }
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1756,23 +1756,23 @@ nsPluginFrame::HandleEvent(nsPresContext
   NS_ENSURE_ARG_POINTER(anEventStatus);
   nsresult rv = NS_OK;
 
   if (!mInstanceOwner)
     return NS_ERROR_NULL_POINTER;
 
   mInstanceOwner->ConsiderNewEventloopNestingLevel();
 
-  if (anEvent->message == NS_PLUGIN_ACTIVATE) {
+  if (anEvent->mMessage == NS_PLUGIN_ACTIVATE) {
     nsIFocusManager* fm = nsFocusManager::GetFocusManager();
     nsCOMPtr<nsIDOMElement> elem = do_QueryInterface(GetContent());
     if (fm && elem)
       return fm->SetFocus(elem, 0);
   }
-  else if (anEvent->message == NS_PLUGIN_FOCUS) {
+  else if (anEvent->mMessage == NS_PLUGIN_FOCUS) {
     nsIFocusManager* fm = nsFocusManager::GetFocusManager();
     if (fm)
       return fm->FocusPlugin(GetContent());
   }
 
   if (mInstanceOwner->SendNativeEvents() &&
       anEvent->IsNativeEventDelivererForPlugin()) {
     *anEventStatus = mInstanceOwner->ProcessEvent(*anEvent);
@@ -1783,41 +1783,41 @@ nsPluginFrame::HandleEvent(nsPresContext
 
 #ifdef XP_WIN
   rv = nsPluginFrameSuper::HandleEvent(aPresContext, anEvent, anEventStatus);
   return rv;
 #endif
 
 #ifdef XP_MACOSX
   // we want to process some native mouse events in the cocoa event model
-  if ((anEvent->message == NS_MOUSE_ENTER_WIDGET ||
-       anEvent->message == NS_WHEEL_WHEEL) &&
+  if ((anEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
+       anEvent->mMessage == NS_WHEEL_WHEEL) &&
       mInstanceOwner->GetEventModel() == NPEventModelCocoa) {
     *anEventStatus = mInstanceOwner->ProcessEvent(*anEvent);
     // Due to plugin code reentering Gecko, this frame may be dead at this
     // point.
     return rv;
   }
 
   // These two calls to nsIPresShell::SetCapturingContext() (on mouse-down
   // and mouse-up) are needed to make the routing of mouse events while
   // dragging conform to standard OS X practice, and to the Cocoa NPAPI spec.
   // See bug 525078 and bug 909678.
-  if (anEvent->message == NS_MOUSE_BUTTON_DOWN) {
+  if (anEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
     nsIPresShell::SetCapturingContent(GetContent(), CAPTURE_IGNOREALLOWED);
   }
 #endif
 
   rv = nsPluginFrameSuper::HandleEvent(aPresContext, anEvent, anEventStatus);
 
   // We need to be careful from this point because the call to
   // nsPluginFrameSuper::HandleEvent() might have killed us.
 
 #ifdef XP_MACOSX
-  if (anEvent->message == NS_MOUSE_BUTTON_UP) {
+  if (anEvent->mMessage == NS_MOUSE_BUTTON_UP) {
     nsIPresShell::SetCapturingContent(nullptr, 0);
   }
 #endif
 
   return rv;
 }
 
 nsresult
--- a/layout/printing/nsPrintPreviewListener.cpp
+++ b/layout/printing/nsPrintPreviewListener.cpp
@@ -113,26 +113,26 @@ GetActionForEvent(nsIDOMEvent* aEvent)
 {
   WidgetKeyboardEvent* keyEvent =
     aEvent->GetInternalNSEvent()->AsKeyboardEvent();
   if (!keyEvent) {
     return eEventAction_Suppress;
   }
 
   if (keyEvent->mFlags.mInSystemGroup) {
-    NS_ASSERTION(keyEvent->message == NS_KEY_DOWN,
+    NS_ASSERTION(keyEvent->mMessage == NS_KEY_DOWN,
       "Assuming we're listening only keydown event in system group");
     return eEventAction_StopPropagation;
   }
 
   if (keyEvent->IsAlt() || keyEvent->IsControl() || keyEvent->IsMeta()) {
     // Don't consume keydown event because following keypress event may be
     // handled as access key or shortcut key.
-    return (keyEvent->message == NS_KEY_DOWN) ? eEventAction_StopPropagation :
-                                                eEventAction_Suppress;
+    return (keyEvent->mMessage == NS_KEY_DOWN) ? eEventAction_StopPropagation :
+                                                 eEventAction_Suppress;
   }
 
   static const uint32_t kOKKeyCodes[] = {
     nsIDOMKeyEvent::DOM_VK_PAGE_UP, nsIDOMKeyEvent::DOM_VK_PAGE_DOWN,
     nsIDOMKeyEvent::DOM_VK_UP,      nsIDOMKeyEvent::DOM_VK_DOWN, 
     nsIDOMKeyEvent::DOM_VK_HOME,    nsIDOMKeyEvent::DOM_VK_END 
   };
 
--- a/layout/style/nsAnimationManager.h
+++ b/layout/style/nsAnimationManager.h
@@ -39,17 +39,18 @@ struct AnimationEventInfo {
     mEvent.animationName = aAnimationName;
     mEvent.elapsedTime = aElapsedTime.ToSeconds();
     mEvent.pseudoElement = AnimationCollection::PseudoTypeAsString(aPseudoType);
   }
 
   // InternalAnimationEvent doesn't support copy-construction, so we need
   // to ourselves in order to work with nsTArray
   AnimationEventInfo(const AnimationEventInfo &aOther)
-    : mElement(aOther.mElement), mEvent(true, aOther.mEvent.message)
+    : mElement(aOther.mElement)
+    , mEvent(true, aOther.mEvent.mMessage)
   {
     mEvent.AssignAnimationEventData(aOther.mEvent, false);
   }
 };
 
 namespace dom {
 
 class CSSAnimation final : public Animation
--- a/layout/xul/nsButtonBoxFrame.cpp
+++ b/layout/xul/nsButtonBoxFrame.cpp
@@ -105,17 +105,17 @@ nsButtonBoxFrame::HandleEvent(nsPresCont
                               WidgetGUIEvent* aEvent,
                               nsEventStatus* aEventStatus)
 {
   NS_ENSURE_ARG_POINTER(aEventStatus);
   if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
     return NS_OK;
   }
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_KEY_DOWN: {
       WidgetKeyboardEvent* keyEvent = aEvent->AsKeyboardEvent();
       if (!keyEvent) {
         break;
       }
       if (NS_VK_SPACE == keyEvent->keyCode) {
         EventStateManager* esm = aPresContext->EventStateManager();
         // :hover:active state
--- a/layout/xul/nsMenuFrame.cpp
+++ b/layout/xul/nsMenuFrame.cpp
@@ -389,17 +389,17 @@ nsMenuFrame::HandleEvent(nsPresContext* 
   }
 
   nsWeakFrame weakFrame(this);
   if (*aEventStatus == nsEventStatus_eIgnore)
     *aEventStatus = nsEventStatus_eConsumeDoDefault;
 
   bool onmenu = IsOnMenu();
 
-  if (aEvent->message == NS_KEY_PRESS && !IsDisabled()) {
+  if (aEvent->mMessage == NS_KEY_PRESS && !IsDisabled()) {
     WidgetKeyboardEvent* keyEvent = aEvent->AsKeyboardEvent();
     uint32_t keyCode = keyEvent->keyCode;
 #ifdef XP_MACOSX
     // On mac, open menulist on either up/down arrow or space (w/o Cmd pressed)
     if (!IsOpen() && ((keyEvent->charCode == NS_VK_SPACE && !keyEvent->IsMeta()) ||
         (keyCode == NS_VK_UP || keyCode == NS_VK_DOWN))) {
       *aEventStatus = nsEventStatus_eConsumeNoDefault;
       OpenMenu(false);
@@ -408,17 +408,17 @@ nsMenuFrame::HandleEvent(nsPresContext* 
     // On other platforms, toggle menulist on unmodified F4 or Alt arrow
     if ((keyCode == NS_VK_F4 && !keyEvent->IsAlt()) ||
         ((keyCode == NS_VK_UP || keyCode == NS_VK_DOWN) && keyEvent->IsAlt())) {
       *aEventStatus = nsEventStatus_eConsumeNoDefault;
       ToggleMenuState();
     }
 #endif
   }
-  else if (aEvent->message == NS_MOUSE_BUTTON_DOWN &&
+  else if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN &&
            aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton &&
            !IsDisabled() && IsMenu()) {
     // The menu item was selected. Bring up the menu.
     // We have children.
     // Don't prevent the default action here, since that will also cancel
     // potential drag starts.
     if (!menuParent || menuParent->IsMenuBar()) {
       ToggleMenuState();
@@ -426,20 +426,20 @@ nsMenuFrame::HandleEvent(nsPresContext* 
     else {
       if (!IsOpen()) {
         OpenMenu(false);
       }
     }
   }
   else if (
 #ifndef NSCONTEXTMENUISMOUSEUP
-           (aEvent->message == NS_MOUSE_BUTTON_UP &&
+           (aEvent->mMessage == NS_MOUSE_BUTTON_UP &&
             aEvent->AsMouseEvent()->button == WidgetMouseEvent::eRightButton) &&
 #else
-           aEvent->message == NS_CONTEXTMENU &&
+           aEvent->mMessage == NS_CONTEXTMENU &&
 #endif
            onmenu && !IsMenu() && !IsDisabled()) {
     // if this menu is a context menu it accepts right-clicks...fire away!
     // Make sure we cancel default processing of the context menu event so
     // that it doesn't bubble and get seen again by the popuplistener and show
     // another context menu.
     //
     // Furthermore (there's always more, isn't there?), on some platforms (win32
@@ -447,24 +447,24 @@ nsMenuFrame::HandleEvent(nsPresContext* 
     // on others we get it on a mouse down. For the ones where we get it on a
     // mouse down, we must continue listening for the right button up event to
     // dismiss the menu.
     if (menuParent->IsContextMenu()) {
       *aEventStatus = nsEventStatus_eConsumeNoDefault;
       Execute(aEvent);
     }
   }
-  else if (aEvent->message == NS_MOUSE_BUTTON_UP &&
+  else if (aEvent->mMessage == NS_MOUSE_BUTTON_UP &&
            aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton &&
            !IsMenu() && !IsDisabled()) {
     // Execute the execute event handler.
     *aEventStatus = nsEventStatus_eConsumeNoDefault;
     Execute(aEvent);
   }
-  else if (aEvent->message == NS_MOUSE_OUT) {
+  else if (aEvent->mMessage == NS_MOUSE_OUT) {
     // Kill our timer if one is active.
     if (mOpenTimer) {
       mOpenTimer->Cancel();
       mOpenTimer = nullptr;
     }
 
     // Deactivate the menu.
     if (menuParent) {
@@ -474,17 +474,17 @@ nsMenuFrame::HandleEvent(nsPresContext* 
           // Submenus don't get closed up immediately.
         }
         else if (this == menuParent->GetCurrentMenuItem()) {
           menuParent->ChangeMenuItem(nullptr, false, false);
         }
       }
     }
   }
-  else if (aEvent->message == NS_MOUSE_MOVE &&
+  else if (aEvent->mMessage == NS_MOUSE_MOVE &&
            (onmenu || (menuParent && menuParent->IsMenuBar()))) {
     if (gEatMouseMove) {
       gEatMouseMove = false;
       return NS_OK;
     }
 
     // Let the menu parent know we're the new item.
     menuParent->ChangeMenuItem(this, false, false);
--- a/layout/xul/nsResizerFrame.cpp
+++ b/layout/xul/nsResizerFrame.cpp
@@ -56,17 +56,17 @@ nsResizerFrame::HandleEvent(nsPresContex
   NS_ENSURE_ARG_POINTER(aEventStatus);
   if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
     return NS_OK;
   }
 
   nsWeakFrame weakFrame(this);
   bool doDefault = true;
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_TOUCH_START:
     case NS_MOUSE_BUTTON_DOWN: {
       if (aEvent->mClass == eTouchEventClass ||
           (aEvent->mClass == eMouseEventClass &&
            aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton)) {
         nsCOMPtr<nsIBaseWindow> window;
         nsIPresShell* presShell = aPresContext->GetPresShell();
         nsIContent* contentToResize =
--- a/layout/xul/nsRootBoxFrame.cpp
+++ b/layout/xul/nsRootBoxFrame.cpp
@@ -200,17 +200,17 @@ nsRootBoxFrame::HandleEvent(nsPresContex
                             WidgetGUIEvent* aEvent,
                             nsEventStatus* aEventStatus)
 {
   NS_ENSURE_ARG_POINTER(aEventStatus);
   if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
     return NS_OK;
   }
 
-  if (aEvent->message == NS_MOUSE_BUTTON_UP) {
+  if (aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
     nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
   }
 
   return NS_OK;
 }
 
 // REVIEW: The override here was doing nothing since nsBoxFrame is our
 // parent class
--- a/layout/xul/nsScrollBoxFrame.cpp
+++ b/layout/xul/nsScrollBoxFrame.cpp
@@ -78,18 +78,17 @@ nsAutoRepeatBoxFrame::HandleEvent(nsPres
                                   WidgetGUIEvent* aEvent,
                                   nsEventStatus* aEventStatus)
 {  
   NS_ENSURE_ARG_POINTER(aEventStatus);
   if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
     return NS_OK;
   }
 
-  switch(aEvent->message)
-  {
+  switch(aEvent->mMessage) {
     // repeat mode may be "hover" for repeating while the mouse is hovering
     // over the element, otherwise repetition is done while the element is
     // active (pressed).
     case NS_MOUSE_ENTER_WIDGET:
     case NS_MOUSE_OVER:
       if (IsActivatedOnHover()) {
         StartRepeat();
         mTrustedEvent = aEvent->mFlags.mIsTrusted;
--- a/layout/xul/nsScrollbarButtonFrame.cpp
+++ b/layout/xul/nsScrollbarButtonFrame.cpp
@@ -47,17 +47,17 @@ nsScrollbarButtonFrame::HandleEvent(nsPr
 
   // If a web page calls event.preventDefault() we still want to
   // scroll when scroll arrow is clicked. See bug 511075.
   if (!mContent->IsInNativeAnonymousSubtree() &&
       nsEventStatus_eConsumeNoDefault == *aEventStatus) {
     return NS_OK;
   }
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_MOUSE_BUTTON_DOWN:
       mCursorOnThis = true;
       // if we didn't handle the press ourselves, pass it on to the superclass
       if (HandleButtonPress(aPresContext, aEvent, aEventStatus)) {
         return NS_OK;
       }
       break;
     case NS_MOUSE_BUTTON_UP:
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -472,17 +472,17 @@ nsSliderFrame::HandleEvent(nsPresContext
 
   nsIFrame* scrollbarBox = GetScrollbar();
   nsCOMPtr<nsIContent> scrollbar;
   scrollbar = GetContentOfBox(scrollbarBox);
   bool isHorizontal = IsHorizontal();
 
   if (isDraggingThumb())
   {
-    switch (aEvent->message) {
+    switch (aEvent->mMessage) {
     case NS_TOUCH_MOVE:
     case NS_MOUSE_MOVE: {
       nsPoint eventPoint;
       if (!GetEventPoint(aEvent, eventPoint)) {
         break;
       }
       if (mChange) {
         // On Linux the destination point is determined by the initial click
@@ -591,31 +591,34 @@ nsSliderFrame::HandleEvent(nsPresContext
     mDragStart = pos - mThumbStart;
   }
 #ifdef MOZ_WIDGET_GTK
   else if (ShouldScrollForEvent(aEvent) &&
            aEvent->mClass == eMouseEventClass &&
            aEvent->AsMouseEvent()->button == WidgetMouseEvent::eRightButton) {
     // HandlePress and HandleRelease are usually called via
     // nsFrame::HandleEvent, but only for the left mouse button.
-    if (aEvent->message == NS_MOUSE_BUTTON_DOWN) {
+    if (aEvent->mMessage == NS_MOUSE_BUTTON_DOWN) {
       HandlePress(aPresContext, aEvent, aEventStatus);
-    } else if (aEvent->message == NS_MOUSE_BUTTON_UP) {
+    } else if (aEvent->mMessage == NS_MOUSE_BUTTON_UP) {
       HandleRelease(aPresContext, aEvent, aEventStatus);
     }
 
     return NS_OK;
   }
 #endif
 
   // XXX hack until handle release is actually called in nsframe.
-//  if (aEvent->message == NS_MOUSE_OUT || aEvent->message == NS_MOUSE_RIGHT_BUTTON_UP || aEvent->message == NS_MOUSE_LEFT_BUTTON_UP)
-  //   HandleRelease(aPresContext, aEvent, aEventStatus);
+  //  if (aEvent->mMessage == NS_MOUSE_OUT ||
+  //      aEvent->mMessage == NS_MOUSE_RIGHT_BUTTON_UP ||
+  //      aEvent->mMessage == NS_MOUSE_LEFT_BUTTON_UP) {
+  //    HandleRelease(aPresContext, aEvent, aEventStatus);
+  //  }
 
-  if (aEvent->message == NS_MOUSE_OUT && mChange)
+  if (aEvent->mMessage == NS_MOUSE_OUT && mChange)
      HandleRelease(aPresContext, aEvent, aEventStatus);
 
   return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
 }
 
 // Helper function to collect the "scroll to click" metric. Beware of
 // caching this, users expect to be able to change the system preference
 // and see the browser change its behavior immediately.
@@ -1037,17 +1040,17 @@ nsSliderFrame::RemoveListener()
 
   thumbFrame->GetContent()->
     RemoveSystemEventListener(NS_LITERAL_STRING("mousedown"), mMediator, false);
 }
 
 bool
 nsSliderFrame::ShouldScrollForEvent(WidgetGUIEvent* aEvent)
 {
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_TOUCH_START:
     case NS_TOUCH_END:
       return true;
     case NS_MOUSE_BUTTON_DOWN:
     case NS_MOUSE_BUTTON_UP: {
       uint16_t button = aEvent->AsMouseEvent()->button;
 #ifdef MOZ_WIDGET_GTK
       return (button == WidgetMouseEvent::eLeftButton) ||
@@ -1065,21 +1068,21 @@ nsSliderFrame::ShouldScrollForEvent(Widg
 
 bool
 nsSliderFrame::ShouldScrollToClickForEvent(WidgetGUIEvent* aEvent)
 {
   if (!ShouldScrollForEvent(aEvent)) {
     return false;
   }
 
-  if (aEvent->message == NS_TOUCH_START) {
+  if (aEvent->mMessage == NS_TOUCH_START) {
     return GetScrollToClick();
   }
 
-  if (aEvent->message != NS_MOUSE_BUTTON_DOWN) {
+  if (aEvent->mMessage != NS_MOUSE_BUTTON_DOWN) {
     return false;
   }
 
 #if defined(XP_MACOSX) || defined(MOZ_WIDGET_GTK)
   // On Mac and Linux, clicking the scrollbar thumb should never scroll to click.
   if (IsEventOverThumb(aEvent)) {
     return false;
   }
--- a/layout/xul/nsSplitterFrame.cpp
+++ b/layout/xul/nsSplitterFrame.cpp
@@ -383,17 +383,17 @@ nsSplitterFrame::HandleEvent(nsPresConte
 {
   NS_ENSURE_ARG_POINTER(aEventStatus);
   if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
     return NS_OK;
   }
 
   nsWeakFrame weakFrame(this);
   nsRefPtr<nsSplitterFrameInner> kungFuDeathGrip(mInner);
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
     case NS_MOUSE_MOVE: 
       mInner->MouseDrag(aPresContext, aEvent);
     break;
   
     case NS_MOUSE_BUTTON_UP:
       if (aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) {
         mInner->MouseUp(aPresContext, aEvent);
       }
--- a/layout/xul/nsTitleBarFrame.cpp
+++ b/layout/xul/nsTitleBarFrame.cpp
@@ -61,17 +61,17 @@ nsTitleBarFrame::HandleEvent(nsPresConte
 {
   NS_ENSURE_ARG_POINTER(aEventStatus);
   if (nsEventStatus_eConsumeNoDefault == *aEventStatus) {
     return NS_OK;
   }
 
   bool doDefault = true;
 
-  switch (aEvent->message) {
+  switch (aEvent->mMessage) {
 
    case NS_MOUSE_BUTTON_DOWN:  {
        if (aEvent->AsMouseEvent()->button == WidgetMouseEvent::eLeftButton) {
          // titlebar has no effect in non-chrome shells
          nsCOMPtr<nsIDocShellTreeItem> dsti = aPresContext->GetDocShell();
          if (dsti) {
            if (dsti->ItemType() == nsIDocShellTreeItem::typeChrome) {
              // we're tracking.
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2558,55 +2558,52 @@ static uint32_t GetDropEffect(WidgetGUIE
   return action;
 }
 
 nsresult
 nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
                              WidgetGUIEvent* aEvent,
                              nsEventStatus* aEventStatus)
 {
-  if (aEvent->message == NS_MOUSE_OVER || aEvent->message == NS_MOUSE_MOVE) {
+  if (aEvent->mMessage == NS_MOUSE_OVER || aEvent->mMessage == NS_MOUSE_MOVE) {
     nsPoint pt = nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, this);
     int32_t xTwips = pt.x - mInnerBox.x;
     int32_t yTwips = pt.y - mInnerBox.y;
     int32_t newrow = GetRowAt(xTwips, yTwips);
     if (mMouseOverRow != newrow) {
       // redraw the old and the new row
       if (mMouseOverRow != -1)
         InvalidateRow(mMouseOverRow);
       mMouseOverRow = newrow;
       if (mMouseOverRow != -1)
         InvalidateRow(mMouseOverRow);
     }
-  }
-  else if (aEvent->message == NS_MOUSE_OUT) {
+  } else if (aEvent->mMessage == NS_MOUSE_OUT) {
     if (mMouseOverRow != -1) {
       InvalidateRow(mMouseOverRow);
       mMouseOverRow = -1;
     }
-  }
-  else if (aEvent->message == NS_DRAGDROP_ENTER) {
+  } else if (aEvent->mMessage == NS_DRAGDROP_ENTER) {
     if (!mSlots)
       mSlots = new Slots();
 
     // Cache several things we'll need throughout the course of our work. These
     // will all get released on a drag exit.
 
     if (mSlots->mTimer) {
       mSlots->mTimer->Cancel();
       mSlots->mTimer = nullptr;
     }
 
     // Cache the drag session.
     mSlots->mIsDragging = true;
     mSlots->mDropRow = -1;
     mSlots->mDropOrient = -1;
     mSlots->mDragAction = GetDropEffect(aEvent);
-  }
-  else if (aEvent->message == NS_DRAGDROP_OVER) {
+  } else if (aEvent->mMessage == NS_DRAGDROP_OVER) {
     // The mouse is hovering over this tree. If we determine things are
     // different from the last time, invalidate the drop feedback at the old
     // position, query the view to see if the current location is droppable,
     // and then invalidate the drop feedback at the new location if it is.
     // The mouse may or may not have changed position from the last time
     // we were called, so optimize out a lot of the extra notifications by
     // checking if anything changed first. For drop feedback we use drop,
     // dropBefore and dropAfter property.
@@ -2705,18 +2702,17 @@ nsTreeBodyFrame::HandleEvent(nsPresConte
           InvalidateDropFeedback(mSlots->mDropRow, mSlots->mDropOrient);
         }
       }
     }
 
     // Indicate that the drop is allowed by preventing the default behaviour.
     if (mSlots->mDropAllowed)
       *aEventStatus = nsEventStatus_eConsumeNoDefault;
-  }
-  else if (aEvent->message == NS_DRAGDROP_DROP) {
+  } else if (aEvent->mMessage == NS_DRAGDROP_DROP) {
      // this event was meant for another frame, so ignore it
      if (!mSlots)
        return NS_OK;
 
     // Tell the view where the drop happened.
 
     // Remove the drop folder and all its parents from the array.
     int32_t parentIndex;
@@ -2730,18 +2726,17 @@ nsTreeBodyFrame::HandleEvent(nsPresConte
     WidgetDragEvent* dragEvent = aEvent->AsDragEvent();
     nsContentUtils::SetDataTransferInEvent(dragEvent);
 
     mView->Drop(mSlots->mDropRow, mSlots->mDropOrient, dragEvent->dataTransfer);
     mSlots->mDropRow = -1;
     mSlots->mDropOrient = -1;
     mSlots->mIsDragging = false;
     *aEventStatus = nsEventStatus_eConsumeNoDefault; // already handled the drop
-  }
-  else if (aEvent->message == NS_DRAGDROP_EXIT) {
+  } else if (aEvent->mMessage == NS_DRAGDROP_EXIT) {
     // this event was meant for another frame, so ignore it
     if (!mSlots)
       return NS_OK;
 
     // Clear out all our tracking vars.
 
     if (mSlots->mDropAllowed) {
       mSlots->mDropAllowed = false;
--- a/view/nsViewManager.cpp
+++ b/view/nsViewManager.cpp
@@ -748,21 +748,21 @@ nsViewManager::DispatchEvent(WidgetGUIEv
 
   WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
   if ((mouseEvent &&
        // Ignore mouse events that we synthesize.
        mouseEvent->reason == WidgetMouseEvent::eReal &&
        // Ignore mouse exit and enter (we'll get moves if the user
        // is really moving the mouse) since we get them when we
        // create and destroy widgets.
-       mouseEvent->message != NS_MOUSE_EXIT_WIDGET &&
-       mouseEvent->message != NS_MOUSE_ENTER_WIDGET) ||
+       mouseEvent->mMessage != NS_MOUSE_EXIT_WIDGET &&
+       mouseEvent->mMessage != NS_MOUSE_ENTER_WIDGET) ||
       aEvent->HasKeyEventMessage() ||
       aEvent->HasIMEEventMessage() ||
-      aEvent->message == NS_PLUGIN_INPUT_EVENT) {
+      aEvent->mMessage == NS_PLUGIN_INPUT_EVENT) {
     gLastUserEventTime = PR_IntervalToMicroseconds(PR_IntervalNow());
   }
 
   // Find the view whose coordinates system we're in.
   nsView* view = aView;
   bool dispatchUsingCoordinates = aEvent->IsUsingCoordinates();
   if (dispatchUsingCoordinates) {
     // Will dispatch using coordinates. Pretty bogus but it's consistent
--- a/widget/BasicEvents.h
+++ b/widget/BasicEvents.h
@@ -594,17 +594,17 @@ struct EventFlags : public BaseEventFlag
  * mozilla::WidgetEvent
  ******************************************************************************/
 
 class WidgetEvent
 {
 protected:
   WidgetEvent(bool aIsTrusted, uint32_t aMessage, EventClassID aEventClassID)
     : mClass(aEventClassID)
-    , message(aMessage)
+    , mMessage(aMessage)
     , refPoint(0, 0)
     , lastRefPoint(0, 0)
     , time(0)
     , timeStamp(TimeStamp::Now())
     , userType(nullptr)
   {
     MOZ_COUNT_CTOR(WidgetEvent);
     mFlags.Clear();
@@ -616,17 +616,17 @@ protected:
   WidgetEvent()
   {
     MOZ_COUNT_CTOR(WidgetEvent);
   }
 
 public:
   WidgetEvent(bool aIsTrusted, uint32_t aMessage)
     : mClass(eBasicEventClass)
-    , message(aMessage)
+    , mMessage(aMessage)
     , refPoint(0, 0)
     , lastRefPoint(0, 0)
     , time(0)
     , timeStamp(TimeStamp::Now())
     , userType(nullptr)
   {
     MOZ_COUNT_CTOR(WidgetEvent);
     mFlags.Clear();
@@ -645,25 +645,25 @@ public:
     MOZ_COUNT_CTOR(WidgetEvent);
     *this = aOther;
   }
 
   virtual WidgetEvent* Duplicate() const
   {
     MOZ_ASSERT(mClass == eBasicEventClass,
                "Duplicate() must be overridden by sub class");
-    WidgetEvent* result = new WidgetEvent(false, message);
+    WidgetEvent* result = new WidgetEvent(false, mMessage);
     result->AssignEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   EventClassID mClass;
   // See GUI MESSAGES,
-  uint32_t message;
+  uint32_t mMessage;
   // Relative to the widget of the event, or if there is no widget then it is
   // in screen coordinates. Not modified by layout code.
   LayoutDeviceIntPoint refPoint;
   // The previous refPoint, if known, used to calculate mouse movement deltas.
   LayoutDeviceIntPoint lastRefPoint;
   // Elapsed time, in milliseconds, from a platform-specific zero time
   // to the time the message was created
   uint64_t time;
@@ -681,17 +681,17 @@ public:
   // Event targets, needed by DOM Events
   nsCOMPtr<dom::EventTarget> target;
   nsCOMPtr<dom::EventTarget> currentTarget;
   nsCOMPtr<dom::EventTarget> originalTarget;
 
   void AssignEventData(const WidgetEvent& aEvent, bool aCopyTargets)
   {
     // mClass should be initialized with the constructor.
-    // message should be initialized with the constructor.
+    // mMessage should be initialized with the constructor.
     refPoint = aEvent.refPoint;
     // lastRefPoint doesn't need to be copied.
     time = aEvent.time;
     timeStamp = aEvent.timeStamp;
     // mFlags should be copied manually if it's necessary.
     userType = aEvent.userType;
     // typeString should be copied manually if it's necessary.
     target = aCopyTargets ? aEvent.target : nullptr;
@@ -730,34 +730,34 @@ public:
    */
   bool IsContentCommandEvent() const;
   /**
    * Returns true if the event is a native event deliverer event for plugin.
    */
   bool IsNativeEventDelivererForPlugin() const;
 
   /**
-   * Returns true if the event message is one of mouse events.
+   * Returns true if the event mMessage is one of mouse events.
    */
   bool HasMouseEventMessage() const;
   /**
-   * Returns true if the event message is one of drag events.
+   * Returns true if the event mMessage is one of drag events.
    */
   bool HasDragEventMessage() const;
   /**
-   * Returns true if the event message is one of key events.
+   * Returns true if the event mMessage is one of key events.
    */
   bool HasKeyEventMessage() const;
   /**
-   * Returns true if the event message is one of composition events or text
+   * Returns true if the event mMessage is one of composition events or text
    * event.
    */
   bool HasIMEEventMessage() const;
   /**
-   * Returns true if the event message is one of plugin activation events.
+   * Returns true if the event mMessage is one of plugin activation events.
    */
   bool HasPluginActivationEventMessage() const;
 
   /**
    * Returns true if the event is native event deliverer event for plugin and
    * it should be retarted to focused document.
    */
   bool IsRetargetedNativeEventDelivererForPlugin() const;
@@ -837,17 +837,17 @@ public:
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eGUIEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
-    WidgetGUIEvent* result = new WidgetGUIEvent(false, message, nullptr);
+    WidgetGUIEvent* result = new WidgetGUIEvent(false, mMessage, nullptr);
     result->AssignGUIEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   /// Originator of the event
   nsCOMPtr<nsIWidget> widget;
 
@@ -1001,17 +1001,17 @@ public:
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eInputEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
-    WidgetInputEvent* result = new WidgetInputEvent(false, message, nullptr);
+    WidgetInputEvent* result = new WidgetInputEvent(false, mMessage, nullptr);
     result->AssignInputEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
 
   /**
    * Returns a modifier of "Accel" virtual modifier which is used for shortcut
@@ -1170,17 +1170,17 @@ public:
     , detail(0)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eUIEventClass,
                "Duplicate() must be overridden by sub class");
-    InternalUIEvent* result = new InternalUIEvent(false, message);
+    InternalUIEvent* result = new InternalUIEvent(false, mMessage);
     result->AssignUIEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   int32_t detail;
 
   void AssignUIEventData(const InternalUIEvent& aEvent, bool aCopyTargets)
--- a/widget/ContentCache.cpp
+++ b/widget/ContentCache.cpp
@@ -510,21 +510,21 @@ bool
 ContentCacheInParent::HandleQueryContentEvent(WidgetQueryContentEvent& aEvent,
                                               nsIWidget* aWidget) const
 {
   MOZ_ASSERT(aWidget);
 
   aEvent.mSucceeded = false;
   aEvent.mReply.mFocusedWidget = aWidget;
 
-  switch (aEvent.message) {
+  switch (aEvent.mMessage) {
     case NS_QUERY_SELECTED_TEXT:
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent("
-         "aEvent={ message=NS_QUERY_SELECTED_TEXT }, aWidget=0x%p)",
+         "aEvent={ mMessage=NS_QUERY_SELECTED_TEXT }, aWidget=0x%p)",
          this, aWidget));
       if (NS_WARN_IF(!IsSelectionValid())) {
         // If content cache hasn't been initialized properly, make the query
         // failed.
         MOZ_LOG(sContentCacheLog, LogLevel::Error,
           ("ContentCacheInParent: 0x%p HandleQueryContentEvent(), "
            "FAILED because mSelection is not valid", this));
         return true;
@@ -555,17 +555,17 @@ ContentCacheInParent::HandleQueryContent
          NS_ConvertUTF16toUTF8(aEvent.mReply.mString).get(),
          GetBoolName(aEvent.mReply.mReversed),
          GetBoolName(aEvent.mReply.mHasSelection),
          GetWritingModeName(aEvent.mReply.mWritingMode).get()));
       break;
     case NS_QUERY_TEXT_CONTENT: {
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent("
-         "aEvent={ message=NS_QUERY_TEXT_CONTENT, mInput={ mOffset=%u, "
+         "aEvent={ mMessage=NS_QUERY_TEXT_CONTENT, mInput={ mOffset=%u, "
          "mLength=%u } }, aWidget=0x%p), mText.Length()=%u",
          this, aEvent.mInput.mOffset,
          aEvent.mInput.mLength, aWidget, mText.Length()));
       uint32_t inputOffset = aEvent.mInput.mOffset;
       uint32_t inputEndOffset =
         std::min(aEvent.mInput.EndOffset(), mText.Length());
       if (NS_WARN_IF(inputEndOffset < inputOffset)) {
         MOZ_LOG(sContentCacheLog, LogLevel::Error,
@@ -581,17 +581,17 @@ ContentCacheInParent::HandleQueryContent
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent(), "
          "Succeeded, aEvent={ mReply={ mOffset=%u, mString.Length()=%u } }",
          this, aEvent.mReply.mOffset, aEvent.mReply.mString.Length()));
       break;
     }
     case NS_QUERY_TEXT_RECT:
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent("
-         "aEvent={ message=NS_QUERY_TEXT_RECT, mInput={ mOffset=%u, "
+         "aEvent={ mMessage=NS_QUERY_TEXT_RECT, mInput={ mOffset=%u, "
          "mLength=%u } }, aWidget=0x%p), mText.Length()=%u",
          this, aEvent.mInput.mOffset, aEvent.mInput.mLength, aWidget,
          mText.Length()));
       if (NS_WARN_IF(!IsSelectionValid())) {
         // If content cache hasn't been initialized properly, make the query
         // failed.
         MOZ_LOG(sContentCacheLog, LogLevel::Error,
           ("ContentCacheInParent: 0x%p HandleQueryContentEvent(), "
@@ -636,17 +636,17 @@ ContentCacheInParent::HandleQueryContent
          this, aEvent.mReply.mOffset,
          NS_ConvertUTF16toUTF8(aEvent.mReply.mString).get(),
          GetWritingModeName(aEvent.mReply.mWritingMode).get(),
          GetRectText(aEvent.mReply.mRect).get()));
       break;
     case NS_QUERY_CARET_RECT:
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent("
-         "aEvent={ message=NS_QUERY_CARET_RECT, mInput={ mOffset=%u } }, "
+         "aEvent={ mMessage=NS_QUERY_CARET_RECT, mInput={ mOffset=%u } }, "
          "aWidget=0x%p), mText.Length()=%u",
          this, aEvent.mInput.mOffset, aWidget, mText.Length()));
       if (NS_WARN_IF(!IsSelectionValid())) {
         // If content cache hasn't been initialized properly, make the query
         // failed.
         MOZ_LOG(sContentCacheLog, LogLevel::Error,
           ("ContentCacheInParent: 0x%p HandleQueryContentEvent(), "
            "FAILED because mSelection is not valid", this));
@@ -663,17 +663,17 @@ ContentCacheInParent::HandleQueryContent
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent(), "
          "Succeeded, aEvent={ mReply={ mOffset=%u, mRect=%s } }",
          this, aEvent.mReply.mOffset, GetRectText(aEvent.mReply.mRect).get()));
       break;
     case NS_QUERY_EDITOR_RECT:
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent("
-         "aEvent={ message=NS_QUERY_EDITOR_RECT }, aWidget=0x%p)",
+         "aEvent={ mMessage=NS_QUERY_EDITOR_RECT }, aWidget=0x%p)",
          this, aWidget));
       aEvent.mReply.mRect = mEditorRect;
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent(), "
          "Succeeded, aEvent={ mReply={ mRect=%s } }",
          this, GetRectText(aEvent.mReply.mRect).get()));
       break;
   }
@@ -841,27 +841,27 @@ ContentCacheInParent::GetCaretRect(uint3
   return true;
 }
 
 bool
 ContentCacheInParent::OnCompositionEvent(const WidgetCompositionEvent& aEvent)
 {
   MOZ_LOG(sContentCacheLog, LogLevel::Info,
     ("ContentCacheInParent: 0x%p OnCompositionEvent(aEvent={ "
-     "message=%s, mData=\"%s\" (Length()=%u), mRanges->Length()=%u }), "
+     "mMessage=%s, mData=\"%s\" (Length()=%u), mRanges->Length()=%u }), "
      "mPendingEventsNeedingAck=%u, mIsComposing=%s, "
      "mRequestedToCommitOrCancelComposition=%s",
-     this, GetEventMessageName(aEvent.message),
+     this, GetEventMessageName(aEvent.mMessage),
      NS_ConvertUTF16toUTF8(aEvent.mData).get(), aEvent.mData.Length(),
      aEvent.mRanges ? aEvent.mRanges->Length() : 0, mPendingEventsNeedingAck,
      GetBoolName(mIsComposing),
      GetBoolName(mRequestedToCommitOrCancelComposition)));
 
   if (!aEvent.CausesDOMTextEvent()) {
-    MOZ_ASSERT(aEvent.message == NS_COMPOSITION_START);
+    MOZ_ASSERT(aEvent.mMessage == NS_COMPOSITION_START);
     mIsComposing = !aEvent.CausesDOMCompositionEndEvent();
     mCompositionStart = mSelection.StartOffset();
     // XXX What's this case??
     if (mRequestedToCommitOrCancelComposition) {
       mCommitStringByRequest = aEvent.mData;
       mCompositionEventsDuringRequest++;
       return false;
     }
@@ -895,20 +895,20 @@ ContentCacheInParent::OnCompositionEvent
 }
 
 void
 ContentCacheInParent::OnSelectionEvent(
                         const WidgetSelectionEvent& aSelectionEvent)
 {
   MOZ_LOG(sContentCacheLog, LogLevel::Info,
     ("ContentCacheInParent: 0x%p OnSelectionEvent(aEvent={ "
-     "message=%s, mOffset=%u, mLength=%u, mReversed=%s, "
+     "mMessage=%s, mOffset=%u, mLength=%u, mReversed=%s, "
      "mExpandToClusterBoundary=%s, mUseNativeLineBreak=%s }), "
      "mPendingEventsNeedingAck=%u, mIsComposing=%s",
-     this, GetEventMessageName(aSelectionEvent.message),
+     this, GetEventMessageName(aSelectionEvent.mMessage),
      aSelectionEvent.mOffset, aSelectionEvent.mLength,
      GetBoolName(aSelectionEvent.mReversed),
      GetBoolName(aSelectionEvent.mExpandToClusterBoundary),
      GetBoolName(aSelectionEvent.mUseNativeLineBreak), mPendingEventsNeedingAck,
      GetBoolName(mIsComposing)));
 
   mPendingEventsNeedingAck++;
 }
--- a/widget/ContentEvents.h
+++ b/widget/ContentEvents.h
@@ -46,17 +46,17 @@ public:
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eScrollPortEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     InternalScrollPortEvent* result =
-      new InternalScrollPortEvent(false, message, nullptr);
+      new InternalScrollPortEvent(false, mMessage, nullptr);
     result->AssignScrollPortEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   orientType orient;
 
   void AssignScrollPortEventData(const InternalScrollPortEvent& aEvent,
@@ -87,17 +87,17 @@ public:
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eScrollAreaEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     InternalScrollAreaEvent* result =
-      new InternalScrollAreaEvent(false, message, nullptr);
+      new InternalScrollAreaEvent(false, mMessage, nullptr);
     result->AssignScrollAreaEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   nsRect mArea;
 
   void AssignScrollAreaEventData(const InternalScrollAreaEvent& aEvent,
@@ -126,17 +126,17 @@ public:
     , originator(nullptr)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eFormEventClass,
                "Duplicate() must be overridden by sub class");
-    InternalFormEvent* result = new InternalFormEvent(false, message);
+    InternalFormEvent* result = new InternalFormEvent(false, mMessage);
     result->AssignFormEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   nsIContent *originator;
 
   void AssignFormEventData(const InternalFormEvent& aEvent, bool aCopyTargets)
@@ -163,17 +163,18 @@ public:
     : WidgetEvent(aIsTrusted, aMessage, eClipboardEventClass)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eClipboardEventClass,
                "Duplicate() must be overridden by sub class");
-    InternalClipboardEvent* result = new InternalClipboardEvent(false, message);
+    InternalClipboardEvent* result =
+      new InternalClipboardEvent(false, mMessage);
     result->AssignClipboardEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   nsCOMPtr<dom::DataTransfer> clipboardData;
 
   void AssignClipboardEventData(const InternalClipboardEvent& aEvent,
@@ -200,17 +201,17 @@ public:
     , isRefocus(false)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eFocusEventClass,
                "Duplicate() must be overridden by sub class");
-    InternalFocusEvent* result = new InternalFocusEvent(false, message);
+    InternalFocusEvent* result = new InternalFocusEvent(false, mMessage);
     result->AssignFocusEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   /// The possible related target
   nsCOMPtr<dom::EventTarget> relatedTarget;
 
@@ -246,17 +247,17 @@ public:
     mFlags.mCancelable = false;
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eTransitionEventClass,
                "Duplicate() must be overridden by sub class");
     InternalTransitionEvent* result =
-      new InternalTransitionEvent(false, message);
+      new InternalTransitionEvent(false, mMessage);
     result->AssignTransitionEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   nsString propertyName;
   float elapsedTime;
   nsString pseudoElement;
@@ -290,17 +291,18 @@ public:
   {
     mFlags.mCancelable = false;
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eAnimationEventClass,
                "Duplicate() must be overridden by sub class");
-    InternalAnimationEvent* result = new InternalAnimationEvent(false, message);
+    InternalAnimationEvent* result =
+      new InternalAnimationEvent(false, mMessage);
     result->AssignAnimationEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   nsString animationName;
   float elapsedTime;
   nsString pseudoElement;
@@ -331,17 +333,17 @@ public:
     mFlags.mCancelable = false;
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eSVGZoomEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
-    InternalSVGZoomEvent* result = new InternalSVGZoomEvent(false, message);
+    InternalSVGZoomEvent* result = new InternalSVGZoomEvent(false, mMessage);
     result->AssignSVGZoomEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   void AssignSVGZoomEventData(const InternalSVGZoomEvent& aEvent,
                               bool aCopyTargets)
   {
@@ -367,17 +369,17 @@ public:
     mFlags.mBubbles = false;
     mFlags.mCancelable = false;
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eSMILTimeEventClass,
                "Duplicate() must be overridden by sub class");
-    InternalSMILTimeEvent* result = new InternalSMILTimeEvent(false, message);
+    InternalSMILTimeEvent* result = new InternalSMILTimeEvent(false, mMessage);
     result->AssignSMILTimeEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   void AssignSMILTimeEventData(const InternalSMILTimeEvent& aEvent,
                                bool aCopyTargets)
   {
--- a/widget/InputData.cpp
+++ b/widget/InputData.cpp
@@ -30,17 +30,17 @@ already_AddRefed<Touch> SingleTouchData:
 
 MultiTouchInput::MultiTouchInput(const WidgetTouchEvent& aTouchEvent)
   : InputData(MULTITOUCH_INPUT, aTouchEvent.time, aTouchEvent.timeStamp,
               aTouchEvent.modifiers)
 {
   MOZ_ASSERT(NS_IsMainThread(),
              "Can only copy from WidgetTouchEvent on main thread");
 
-  switch (aTouchEvent.message) {
+  switch (aTouchEvent.mMessage) {
     case NS_TOUCH_START:
       mType = MULTITOUCH_START;
       break;
     case NS_TOUCH_MOVE:
       mType = MULTITOUCH_MOVE;
       break;
     case NS_TOUCH_END:
       mType = MULTITOUCH_END;
@@ -176,17 +176,17 @@ MultiTouchInput::IndexOfTouch(int32_t aT
 // SingleTouchData. It also sends garbage for the identifier, radius, force
 // and rotation angle.
 MultiTouchInput::MultiTouchInput(const WidgetMouseEvent& aMouseEvent)
   : InputData(MULTITOUCH_INPUT, aMouseEvent.time, aMouseEvent.timeStamp,
               aMouseEvent.modifiers)
 {
   MOZ_ASSERT(NS_IsMainThread(),
              "Can only copy from WidgetMouseEvent on main thread");
-  switch (aMouseEvent.message) {
+  switch (aMouseEvent.mMessage) {
   case NS_MOUSE_BUTTON_DOWN:
     mType = MULTITOUCH_START;
     break;
   case NS_MOUSE_MOVE:
     mType = MULTITOUCH_MOVE;
     break;
   case NS_MOUSE_BUTTON_UP:
     mType = MULTITOUCH_END;
--- a/widget/MiscEvents.h
+++ b/widget/MiscEvents.h
@@ -153,17 +153,17 @@ public:
 
   virtual WidgetEvent* Duplicate() const override
   {
     // NOTE: PluginEvent has to be dispatched to nsIFrame::HandleEvent().
     //       So, this event needs to support Duplicate().
     MOZ_ASSERT(mClass == ePluginEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
-    WidgetPluginEvent* result = new WidgetPluginEvent(false, message, nullptr);
+    WidgetPluginEvent* result = new WidgetPluginEvent(false, mMessage, nullptr);
     result->AssignPluginEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   // If true, this event needs to be retargeted to focused document.
   // Otherwise, never retargeted. Defaults to false.
   bool retargetToFocusedDocument;
--- a/widget/MouseEvents.h
+++ b/widget/MouseEvents.h
@@ -150,17 +150,17 @@ public:
     inputSource = aEvent.inputSource;
   }
 
   /**
    * Returns true if left click event.
    */
   bool IsLeftClickEvent() const
   {
-    return message == NS_MOUSE_CLICK && button == eLeftButton;
+    return mMessage == NS_MOUSE_CLICK && button == eLeftButton;
   }
 };
 
 /******************************************************************************
  * mozilla::WidgetMouseEvent
  ******************************************************************************/
 
 class WidgetMouseEvent : public WidgetMouseEventBase, public WidgetPointerHelper
@@ -235,30 +235,30 @@ public:
       default:
         break;
     }
   }
 
 #ifdef DEBUG
   virtual ~WidgetMouseEvent()
   {
-    NS_WARN_IF_FALSE(message != NS_CONTEXTMENU ||
+    NS_WARN_IF_FALSE(mMessage != NS_CONTEXTMENU ||
                      button ==
                        ((context == eNormal) ? eRightButton : eLeftButton),
                      "Wrong button set to NS_CONTEXTMENU event?");
   }
 #endif
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eMouseEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetMouseEvent* result =
-      new WidgetMouseEvent(false, message, nullptr, reason, context);
+      new WidgetMouseEvent(false, mMessage, nullptr, reason, context);
     result->AssignMouseEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   // Special return code for MOUSE_ACTIVATE to signal.
   // If the target accepts activation (1), or denies it (0).
   bool acceptActivation;
@@ -282,17 +282,17 @@ public:
     clickCount = aEvent.clickCount;
   }
 
   /**
    * Returns true if the event is a context menu event caused by key.
    */
   bool IsContextMenuKeyEvent() const
   {
-    return message == NS_CONTEXTMENU && context == eContextMenuKey;
+    return mMessage == NS_CONTEXTMENU && context == eContextMenuKey;
   }
 
   /**
    * Returns true if the event is a real mouse event.  Otherwise, i.e., it's
    * a synthesized event by scroll or something, returns false.
    */
   bool IsReal() const
   {
@@ -327,17 +327,17 @@ public:
        aMessage != NS_DRAGDROP_END);
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eDragEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
-    WidgetDragEvent* result = new WidgetDragEvent(false, message, nullptr);
+    WidgetDragEvent* result = new WidgetDragEvent(false, mMessage, nullptr);
     result->AssignDragEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   // The dragging data.
   nsCOMPtr<dom::DataTransfer> dataTransfer;
 
@@ -389,17 +389,17 @@ public:
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eMouseScrollEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetMouseScrollEvent* result =
-      new WidgetMouseScrollEvent(false, message, nullptr);
+      new WidgetMouseScrollEvent(false, mMessage, nullptr);
     result->AssignMouseScrollEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   // The delta value of mouse scroll event.
   // If the event message is NS_MOUSE_SCROLL, the value indicates scroll amount
   // in lines.  However, if the value is nsIDOMUIEvent::SCROLL_PAGE_UP or
@@ -457,17 +457,17 @@ public:
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eWheelEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
-    WidgetWheelEvent* result = new WidgetWheelEvent(false, message, nullptr);
+    WidgetWheelEvent* result = new WidgetWheelEvent(false, mMessage, nullptr);
     result->AssignWheelEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   // NOTE: deltaX, deltaY and deltaZ may be customized by
   //       mousewheel.*.delta_multiplier_* prefs which are applied by
   //       EventStateManager.  So, after widget dispatches this event,
@@ -603,17 +603,17 @@ public:
     , isPrimary(true)
   {
     mClass = ePointerEventClass;
     UpdateFlags();
   }
 
   void UpdateFlags()
   {
-    switch (message) {
+    switch (mMessage) {
       case NS_POINTER_ENTER:
       case NS_POINTER_LEAVE:
         mFlags.mBubbles = false;
         mFlags.mCancelable = false;
         break;
       case NS_POINTER_CANCEL:
       case NS_POINTER_GOT_CAPTURE:
       case NS_POINTER_LOST_CAPTURE:
@@ -625,17 +625,17 @@ public:
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == ePointerEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetPointerEvent* result =
-      new WidgetPointerEvent(false, message, nullptr);
+      new WidgetPointerEvent(false, mMessage, nullptr);
     result->AssignPointerEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   uint32_t width;
   uint32_t height;
   bool isPrimary;
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -108,17 +108,17 @@ public:
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eKeyboardEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetKeyboardEvent* result =
-      new WidgetKeyboardEvent(false, message, nullptr);
+      new WidgetKeyboardEvent(false, mMessage, nullptr);
     result->AssignKeyEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   // A DOM keyCode value or 0.  If a keypress event whose charCode is 0, this
   // should be 0.
   uint32_t keyCode;
@@ -276,20 +276,20 @@ private:
 
 
 /******************************************************************************
  * mozilla::InternalBeforeAfterKeyboardEvent
  *
  * This is extended from WidgetKeyboardEvent and is mapped to DOM event
  * "BeforeAfterKeyboardEvent".
  *
- * Event message: NS_KEY_BEFORE_DOWN
- *                NS_KEY_BEFORE_UP
- *                NS_KEY_AFTER_DOWN
- *                NS_KEY_AFTER_UP
+ * Event mMessage: NS_KEY_BEFORE_DOWN
+ *                 NS_KEY_BEFORE_UP
+ *                 NS_KEY_AFTER_DOWN
+ *                 NS_KEY_AFTER_UP
  ******************************************************************************/
 class InternalBeforeAfterKeyboardEvent : public WidgetKeyboardEvent
 {
 private:
   friend class dom::PBrowserParent;
   friend class dom::PBrowserChild;
 
   InternalBeforeAfterKeyboardEvent()
@@ -313,17 +313,17 @@ public:
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eBeforeAfterKeyboardEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     InternalBeforeAfterKeyboardEvent* result =
-      new InternalBeforeAfterKeyboardEvent(false, message, nullptr);
+      new InternalBeforeAfterKeyboardEvent(false, mMessage, nullptr);
     result->AssignBeforeAfterKeyEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   void AssignBeforeAfterKeyEventData(
          const InternalBeforeAfterKeyboardEvent& aEvent,
          bool aCopyTargets)
@@ -371,17 +371,17 @@ public:
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eCompositionEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetCompositionEvent* result =
-      new WidgetCompositionEvent(false, message, nullptr);
+      new WidgetCompositionEvent(false, mMessage, nullptr);
     result->AssignCompositionEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   // The composition string or the commit string.  If the instance is a
   // compositionstart event, this is initialized with selected text by
   // TextComposition automatically.
@@ -421,26 +421,26 @@ public:
 
   uint32_t RangeCount() const
   {
     return mRanges ? mRanges->Length() : 0;
   }
 
   bool CausesDOMTextEvent() const
   {
-    return message == NS_COMPOSITION_CHANGE ||
-           message == NS_COMPOSITION_COMMIT ||
-           message == NS_COMPOSITION_COMMIT_AS_IS;
+    return mMessage == NS_COMPOSITION_CHANGE ||
+           mMessage == NS_COMPOSITION_COMMIT ||
+           mMessage == NS_COMPOSITION_COMMIT_AS_IS;
   }
 
   bool CausesDOMCompositionEndEvent() const
   {
-    return message == NS_COMPOSITION_END ||
-           message == NS_COMPOSITION_COMMIT ||
-           message == NS_COMPOSITION_COMMIT_AS_IS;
+    return mMessage == NS_COMPOSITION_END ||
+           mMessage == NS_COMPOSITION_COMMIT ||
+           mMessage == NS_COMPOSITION_COMMIT_AS_IS;
   }
 };
 
 /******************************************************************************
  * mozilla::WidgetQueryContentEvent
  ******************************************************************************/
 
 class WidgetQueryContentEvent : public WidgetGUIEvent
@@ -476,75 +476,75 @@ public:
       "WidgetQueryContentEvent needs to support Duplicate()");
     MOZ_CRASH("WidgetQueryContentEvent doesn't support Duplicate()");
     return nullptr;
   }
 
   void InitForQueryTextContent(uint32_t aOffset, uint32_t aLength,
                                bool aUseNativeLineBreak = true)
   {
-    NS_ASSERTION(message == NS_QUERY_TEXT_CONTENT,
+    NS_ASSERTION(mMessage == NS_QUERY_TEXT_CONTENT,
                  "wrong initializer is called");
     mInput.mOffset = aOffset;
     mInput.mLength = aLength;
     mUseNativeLineBreak = aUseNativeLineBreak;
   }
 
   void InitForQueryCaretRect(uint32_t aOffset,
                              bool aUseNativeLineBreak = true)
   {
-    NS_ASSERTION(message == NS_QUERY_CARET_RECT,
+    NS_ASSERTION(mMessage == NS_QUERY_CARET_RECT,
                  "wrong initializer is called");
     mInput.mOffset = aOffset;
     mUseNativeLineBreak = aUseNativeLineBreak;
   }
 
   void InitForQueryTextRect(uint32_t aOffset, uint32_t aLength,
                             bool aUseNativeLineBreak = true)
   {
-    NS_ASSERTION(message == NS_QUERY_TEXT_RECT,
+    NS_ASSERTION(mMessage == NS_QUERY_TEXT_RECT,
                  "wrong initializer is called");
     mInput.mOffset = aOffset;
     mInput.mLength = aLength;
     mUseNativeLineBreak = aUseNativeLineBreak;
   }
 
   void InitForQueryDOMWidgetHittest(const mozilla::LayoutDeviceIntPoint& aPoint)
   {
-    NS_ASSERTION(message == NS_QUERY_DOM_WIDGET_HITTEST,
+    NS_ASSERTION(mMessage == NS_QUERY_DOM_WIDGET_HITTEST,
                  "wrong initializer is called");
     refPoint = aPoint;
   }
 
   void RequestFontRanges()
   {
-    NS_ASSERTION(message == NS_QUERY_TEXT_CONTENT,
+    NS_ASSERTION(mMessage == NS_QUERY_TEXT_CONTENT,
                  "not querying text content");
     mWithFontRanges = true;
   }
 
   uint32_t GetSelectionStart(void) const
   {
-    NS_ASSERTION(message == NS_QUERY_SELECTED_TEXT,
+    NS_ASSERTION(mMessage == NS_QUERY_SELECTED_TEXT,
                  "not querying selection");
     return mReply.mOffset + (mReply.mReversed ? mReply.mString.Length() : 0);
   }
 
   uint32_t GetSelectionEnd(void) const
   {
-    NS_ASSERTION(message == NS_QUERY_SELECTED_TEXT,
+    NS_ASSERTION(mMessage == NS_QUERY_SELECTED_TEXT,
                  "not querying selection");
     return mReply.mOffset + (mReply.mReversed ? 0 : mReply.mString.Length());
   }
 
   mozilla::WritingMode GetWritingMode(void) const
   {
-    NS_ASSERTION(message == NS_QUERY_SELECTED_TEXT ||
-                 message == NS_QUERY_CARET_RECT ||
-                 message == NS_QUERY_TEXT_RECT,
+    NS_ASSERTION(mMessage == NS_QUERY_SELECTED_TEXT ||
+                 mMessage == NS_QUERY_CARET_RECT ||
+                 mMessage == NS_QUERY_TEXT_RECT,
                  "not querying selection or text rect");
     return mReply.mWritingMode;
   }
 
   bool mSucceeded;
   bool mUseNativeLineBreak;
   bool mWithFontRanges;
   struct
@@ -704,17 +704,17 @@ public:
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eEditorInputEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     InternalEditorInputEvent* result =
-      new InternalEditorInputEvent(false, message, nullptr);
+      new InternalEditorInputEvent(false, mMessage, nullptr);
     result->AssignEditorInputEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   bool mIsComposing;
 
   void AssignEditorInputEventData(const InternalEditorInputEvent& aEvent,
--- a/widget/TouchEvents.h
+++ b/widget/TouchEvents.h
@@ -50,17 +50,17 @@ public:
     //     EventStateManager.  Therefore, it might be possible to handle this
     //     in PreHandleEvent() and not to dispatch as a DOM event into the DOM
     //     tree like ContentQueryEvent.  Then, this event doesn't need to
     //     support Duplicate().
     MOZ_ASSERT(mClass == eGestureNotifyEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetGestureNotifyEvent* result =
-      new WidgetGestureNotifyEvent(false, message, nullptr);
+      new WidgetGestureNotifyEvent(false, mMessage, nullptr);
     result->AssignGestureNotifyEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   enum ePanDirection
   {
     ePanNone,
@@ -101,32 +101,32 @@ public:
     , allowedDirections(0)
     , direction(0)
     , delta(0.0)
     , clickCount(0)
   {
   }
 
   WidgetSimpleGestureEvent(const WidgetSimpleGestureEvent& aOther)
-    : WidgetMouseEventBase(aOther.mFlags.mIsTrusted, aOther.message,
+    : WidgetMouseEventBase(aOther.mFlags.mIsTrusted, aOther.mMessage,
                            aOther.widget, eSimpleGestureEventClass)
     , allowedDirections(aOther.allowedDirections)
     , direction(aOther.direction)
     , delta(aOther.delta)
     , clickCount(0)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eSimpleGestureEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
     WidgetSimpleGestureEvent* result =
-      new WidgetSimpleGestureEvent(false, message, nullptr);
+      new WidgetSimpleGestureEvent(false, mMessage, nullptr);
     result->AssignSimpleGestureEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   // See nsIDOMSimpleGestureEvent for values
   uint32_t allowedDirections;
   // See nsIDOMSimpleGestureEvent for values
@@ -161,45 +161,45 @@ public:
 
   virtual WidgetTouchEvent* AsTouchEvent() override { return this; }
 
   WidgetTouchEvent()
   {
   }
 
   WidgetTouchEvent(const WidgetTouchEvent& aOther)
-    : WidgetInputEvent(aOther.mFlags.mIsTrusted, aOther.message, aOther.widget,
+    : WidgetInputEvent(aOther.mFlags.mIsTrusted, aOther.mMessage, aOther.widget,
                        eTouchEventClass)
   {
     modifiers = aOther.modifiers;
     time = aOther.time;
     timeStamp = aOther.timeStamp;
     touches.AppendElements(aOther.touches);
-    mFlags.mCancelable = message != NS_TOUCH_CANCEL;
+    mFlags.mCancelable = mMessage != NS_TOUCH_CANCEL;
     MOZ_COUNT_CTOR(WidgetTouchEvent);
   }
 
   WidgetTouchEvent(bool aIsTrusted, uint32_t aMessage, nsIWidget* aWidget)
     : WidgetInputEvent(aIsTrusted, aMessage, aWidget, eTouchEventClass)
   {
     MOZ_COUNT_CTOR(WidgetTouchEvent);
-    mFlags.mCancelable = message != NS_TOUCH_CANCEL;
+    mFlags.mCancelable = mMessage != NS_TOUCH_CANCEL;
   }
 
   virtual ~WidgetTouchEvent()
   {
     MOZ_COUNT_DTOR(WidgetTouchEvent);
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eTouchEventClass,
                "Duplicate() must be overridden by sub class");
     // Not copying widget, it is a weak reference.
-    WidgetTouchEvent* result = new WidgetTouchEvent(false, message, nullptr);
+    WidgetTouchEvent* result = new WidgetTouchEvent(false, mMessage, nullptr);
     result->AssignTouchEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
   TouchArray touches;
 
   void AssignTouchEventData(const WidgetTouchEvent& aEvent, bool aCopyTargets)
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -72,17 +72,17 @@ WidgetEvent::IsNativeEventDelivererForPl
  * mozilla::WidgetEvent
  *
  * Event message checking methods.
  ******************************************************************************/
 
 bool
 WidgetEvent::HasMouseEventMessage() const
 {
-  switch (message) {
+  switch (mMessage) {
     case NS_MOUSE_BUTTON_DOWN:
     case NS_MOUSE_BUTTON_UP:
     case NS_MOUSE_CLICK:
     case NS_MOUSE_DOUBLECLICK:
     case NS_MOUSE_ENTER_WIDGET:
     case NS_MOUSE_EXIT_WIDGET:
     case NS_MOUSE_ACTIVATE:
     case NS_MOUSE_OVER:
@@ -93,17 +93,17 @@ WidgetEvent::HasMouseEventMessage() cons
     default:
       return false;
   }
 }
 
 bool
 WidgetEvent::HasDragEventMessage() const
 {
-  switch (message) {
+  switch (mMessage) {
     case NS_DRAGDROP_ENTER:
     case NS_DRAGDROP_OVER:
     case NS_DRAGDROP_EXIT:
     case NS_DRAGDROP_DRAGDROP:
     case NS_DRAGDROP_GESTURE:
     case NS_DRAGDROP_DRAG:
     case NS_DRAGDROP_END:
     case NS_DRAGDROP_START:
@@ -113,51 +113,51 @@ WidgetEvent::HasDragEventMessage() const
     default:
       return false;
   }
 }
 
 bool
 WidgetEvent::HasKeyEventMessage() const
 {
-  switch (message) {
+  switch (mMessage) {
     case NS_KEY_DOWN:
     case NS_KEY_PRESS:
     case NS_KEY_UP:
     case NS_KEY_BEFORE_DOWN:
     case NS_KEY_BEFORE_UP:
     case NS_KEY_AFTER_DOWN:
     case NS_KEY_AFTER_UP:
       return true;
     default:
       return false;
   }
 }
 
 bool
 WidgetEvent::HasIMEEventMessage() const
 {
-  switch (message) {
+  switch (mMessage) {
     case NS_COMPOSITION_START:
     case NS_COMPOSITION_END:
     case NS_COMPOSITION_UPDATE:
     case NS_COMPOSITION_CHANGE:
     case NS_COMPOSITION_COMMIT_AS_IS:
     case NS_COMPOSITION_COMMIT:
       return true;
     default:
       return false;
   }
 }
 
 bool
 WidgetEvent::HasPluginActivationEventMessage() const
 {
-  return message == NS_PLUGIN_ACTIVATE ||
-         message == NS_PLUGIN_FOCUS;
+  return mMessage == NS_PLUGIN_ACTIVATE ||
+         mMessage == NS_PLUGIN_FOCUS;
 }
 
 /******************************************************************************
  * mozilla::WidgetEvent
  *
  * Specific event checking methods.
  ******************************************************************************/
 
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -961,17 +961,17 @@ nsWindow::GetNativeData(uint32_t aDataTy
 }
 
 void
 nsWindow::OnMouseEvent(AndroidGeckoEvent *ae)
 {
     nsRefPtr<nsWindow> kungFuDeathGrip(this);
 
     WidgetMouseEvent event = ae->MakeMouseEvent(this);
-    if (event.message == NS_EVENT_NULL) {
+    if (event.mMessage == NS_EVENT_NULL) {
         // invalid event type, abort
         return;
     }
 
     DispatchEvent(&event);
 }
 
 bool
@@ -996,17 +996,17 @@ nsWindow::OnContextmenuEvent(AndroidGeck
     nsEventStatus contextMenuStatus;
     DispatchEvent(&contextMenuEvent, contextMenuStatus);
 
     // If the contextmenu event was consumed (preventDefault issued), we follow with a
     // touchcancel event. This avoids followup touchend events passsing through and
     // triggering further element behaviour such as link-clicks.
     if (contextMenuStatus == nsEventStatus_eConsumeNoDefault) {
         WidgetTouchEvent canceltouchEvent = ae->MakeTouchEvent(this);
-        canceltouchEvent.message = NS_TOUCH_CANCEL;
+        canceltouchEvent.mMessage = NS_TOUCH_CANCEL;
         DispatchEvent(&canceltouchEvent);
         return true;
     }
 
     return false;
 }
 
 void
@@ -1047,26 +1047,26 @@ bool nsWindow::OnMultitouchEvent(Android
     // of the next sequence.
     static bool sDefaultPreventedNotified = false;
     static bool sLastWasDownEvent = false;
 
     bool preventDefaultActions = false;
     bool isDownEvent = false;
 
     WidgetTouchEvent event = ae->MakeTouchEvent(this);
-    if (event.message != NS_EVENT_NULL) {
+    if (event.mMessage != NS_EVENT_NULL) {
         nsEventStatus status;
         DispatchEvent(&event, status);
         // We check mMultipleActionsPrevented because that's what <input type=range>
         // sets when someone starts dragging the thumb. It doesn't set the status
         // because it doesn't want to prevent the code that gives the input focus
         // from running.
         preventDefaultActions = (status == nsEventStatus_eConsumeNoDefault ||
                                 event.mFlags.mMultipleActionsPrevented);
-        isDownEvent = (event.message == NS_TOUCH_START);
+        isDownEvent = (event.mMessage == NS_TOUCH_START);
     }
 
     if (isDownEvent && event.touches.Length() == 1) {
         // Since touch events don't get retargeted by PositionedEventTargeting.cpp
         // code on Fennec, we dispatch a dummy mouse event that *does* get
         // retargeted. The Fennec browser.js code can use this to activate the
         // highlight element in case the this touchstart is the start of a tap.
         WidgetMouseEvent hittest(true, NS_MOUSE_MOZHITTEST, this, WidgetMouseEvent::eReal);
@@ -1456,35 +1456,35 @@ nsWindow::InitKeyEvent(WidgetKeyboardEve
         int keyValue = key.DOMPrintableKeyValue();
         if (keyValue) {
             event.mKeyValue = static_cast<char16_t>(keyValue);
         }
     }
     event.mCodeNameIndex = ConvertAndroidScanCodeToCodeNameIndex(key);
     uint32_t domKeyCode = ConvertAndroidKeyCodeToDOMKeyCode(key.KeyCode());
 
-    if (event.message == NS_KEY_PRESS) {
+    if (event.mMessage == NS_KEY_PRESS) {
         // Android gives us \n, so filter out some control characters.
         int charCode = key.UnicodeChar();
         if (!charCode) {
             charCode = key.BaseUnicodeChar();
         }
         event.isChar = (charCode >= ' ');
         event.charCode = event.isChar ? charCode : 0;
         event.keyCode = (event.charCode > 0) ? 0 : domKeyCode;
         event.mPluginEvent.Clear();
     } else {
 #ifdef DEBUG
-        if (event.message != NS_KEY_DOWN && event.message != NS_KEY_UP) {
-            ALOG("InitKeyEvent: unexpected event.message %d", event.message);
+        if (event.mMessage != NS_KEY_DOWN && event.mMessage != NS_KEY_UP) {
+            ALOG("InitKeyEvent: unexpected event.mMessage %d", event.mMessage);
         }
 #endif // DEBUG
 
         // Flash will want a pluginEvent for keydown and keyup events.
-        ANPKeyActions action = event.message == NS_KEY_DOWN
+        ANPKeyActions action = event.mMessage == NS_KEY_DOWN
                              ? kDown_ANPKeyAction
                              : kUp_ANPKeyAction;
         InitPluginEvent(pluginEvent, action, key);
 
         event.isChar = false;
         event.charCode = 0;
         event.keyCode = domKeyCode;
         event.mPluginEvent.Copy(*pluginEvent);
@@ -1495,23 +1495,23 @@ nsWindow::InitKeyEvent(WidgetKeyboardEve
         event.modifiers |= MODIFIER_CONTROL;
     }
     // For keypress, if the unicode char already has modifiers applied, we
     // don't specify extra modifiers. If UnicodeChar() != BaseUnicodeChar()
     // it means UnicodeChar() already has modifiers applied.
     // Note that on Android 4.x, Alt modifier isn't set when the key input
     // causes text input even while right Alt key is pressed.  However, this
     // is necessary for Android 2.3 compatibility.
-    if (event.message == NS_KEY_PRESS &&
+    if (event.mMessage == NS_KEY_PRESS &&
         key.UnicodeChar() && key.UnicodeChar() != key.BaseUnicodeChar()) {
         event.modifiers &= ~(MODIFIER_ALT | MODIFIER_CONTROL | MODIFIER_META);
     }
 
     event.mIsRepeat =
-        (event.message == NS_KEY_DOWN || event.message == NS_KEY_PRESS) &&
+        (event.mMessage == NS_KEY_DOWN || event.mMessage == NS_KEY_PRESS) &&
         (!!(key.Flags() & AKEY_EVENT_FLAG_LONG_PRESS) || !!key.RepeatCount());
     event.location =
         WidgetKeyboardEvent::ComputeLocationFromCodeValue(event.mCodeNameIndex);
     event.time = key.Time();
 
     if (gMenu)
         gMenuConsumed = true;
 }
--- a/widget/cocoa/TextInputHandler.mm
+++ b/widget/cocoa/TextInputHandler.mm
@@ -220,17 +220,17 @@ GetNativeKeyEventType(NSEvent* aNativeEv
     case NSFlagsChanged: return "NSFlagsChanged";
     default:             return "not key event";
   }
 }
 
 static const char*
 GetGeckoKeyEventType(const WidgetEvent& aEvent)
 {
-  switch (aEvent.message) {
+  switch (aEvent.mMessage) {
     case NS_KEY_DOWN:    return "NS_KEY_DOWN";
     case NS_KEY_UP:      return "NS_KEY_UP";
     case NS_KEY_PRESS:   return "NS_KEY_PRESS";
     default:             return "not key event";
   }
 }
 
 static const char*
@@ -756,17 +756,17 @@ void
 TISInputSourceWrapper::InitKeyEvent(NSEvent *aNativeKeyEvent,
                                     WidgetKeyboardEvent& aKeyEvent,
                                     const nsAString *aInsertString)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
   MOZ_LOG(gLog, LogLevel::Info,
     ("%p TISInputSourceWrapper::InitKeyEvent, aNativeKeyEvent=%p, "
-     "aKeyEvent.message=%s, aInsertString=%p, IsOpenedIMEMode()=%s",
+     "aKeyEvent.mMessage=%s, aInsertString=%p, IsOpenedIMEMode()=%s",
      this, aNativeKeyEvent, GetGeckoKeyEventType(aKeyEvent), aInsertString,
      TrueOrFalse(IsOpenedIMEMode())));
 
   NS_ENSURE_TRUE(aNativeKeyEvent, );
 
   nsCocoaUtils::InitInputEvent(aKeyEvent, aNativeKeyEvent);
 
   // This is used only while dispatching the event (which is a synchronous
@@ -943,17 +943,17 @@ TISInputSourceWrapper::InitKeyEvent(NSEv
     ([aNativeKeyEvent type] == NSKeyDown) ? [aNativeKeyEvent isARepeat] : false;
 
   MOZ_LOG(gLog, LogLevel::Info,
     ("%p TISInputSourceWrapper::InitKeyEvent, "
      "shift=%s, ctrl=%s, alt=%s, meta=%s",
      this, OnOrOff(aKeyEvent.IsShift()), OnOrOff(aKeyEvent.IsControl()),
      OnOrOff(aKeyEvent.IsAlt()), OnOrOff(aKeyEvent.IsMeta())));
 
-  if (aKeyEvent.message == NS_KEY_PRESS &&
+  if (aKeyEvent.mMessage == NS_KEY_PRESS &&
       (isPrintableKey || !insertString.IsEmpty())) {
     InitKeyPressEvent(aNativeKeyEvent,
                       insertString.IsEmpty() ? 0 : insertString[0],
                       aKeyEvent, kbType);
     MOZ_ASSERT(!aKeyEvent.charCode || !IsControlChar(aKeyEvent.charCode),
                "charCode must not be a control character");
   } else {
     aKeyEvent.charCode = 0;
@@ -1033,29 +1033,29 @@ TISInputSourceWrapper::InitKeyEvent(NSEv
 void
 TISInputSourceWrapper::InitKeyPressEvent(NSEvent *aNativeKeyEvent,
                                          char16_t aInsertChar,
                                          WidgetKeyboardEvent& aKeyEvent,
                                          UInt32 aKbType)
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
 
-  NS_ASSERTION(aKeyEvent.message == NS_KEY_PRESS,
+  NS_ASSERTION(aKeyEvent.mMessage == NS_KEY_PRESS,
                "aKeyEvent must be NS_KEY_PRESS event");
 
   if (MOZ_LOG_TEST(gLog, LogLevel::Info)) {
     nsAutoString chars;
     nsCocoaUtils::GetStringForNSString([aNativeKeyEvent characters], chars);
     NS_ConvertUTF16toUTF8 utf8Chars(chars);
     char16_t expectedChar = static_cast<char16_t>(aInsertChar);
     NS_ConvertUTF16toUTF8 utf8ExpectedChar(&expectedChar, 1);
     MOZ_LOG(gLog, LogLevel::Info,
       ("%p TISInputSourceWrapper::InitKeyPressEvent, aNativeKeyEvent=%p, "
        "[aNativeKeyEvent characters]=\"%s\", aInsertChar=0x%X(%s), "
-       "aKeyEvent.message=%s, aKbType=0x%X, IsOpenedIMEMode()=%s",
+       "aKeyEvent.mMessage=%s, aKbType=0x%X, IsOpenedIMEMode()=%s",
        this, aNativeKeyEvent, utf8Chars.get(), aInsertChar,
        utf8ExpectedChar.get(), GetGeckoKeyEventType(aKeyEvent), aKbType,
        TrueOrFalse(IsOpenedIMEMode())));
   }
 
   aKeyEvent.isChar = true; // this is not a special key  XXX not used in XP
   aKeyEvent.charCode = aInsertChar;
   if (aKeyEvent.charCode != 0) {
@@ -3772,17 +3772,17 @@ TextInputHandlerBase::OnDestroyWidget(ns
 
   mWidget = nullptr;
   return true;
 }
 
 bool
 TextInputHandlerBase::DispatchEvent(WidgetGUIEvent& aEvent)
 {
-  if (aEvent.message == NS_KEY_PRESS) {
+  if (aEvent.mMessage == NS_KEY_PRESS) {
     WidgetInputEvent& inputEvent = *aEvent.AsInputEvent();
     if (!inputEvent.IsMeta()) {
       MOZ_LOG(gLog, LogLevel::Info,
         ("%p TextInputHandlerBase::DispatchEvent, hiding mouse cursor", this));
       [NSCursor setHiddenUntilMouseMoves:YES];
     }
   }
   return mWidget->DispatchWindowEvent(aEvent);
@@ -3914,17 +3914,17 @@ TextInputHandlerBase::AttachNativeKeyEve
   }
 
   MOZ_LOG(gLog, LogLevel::Info,
     ("%p TextInputHandlerBase::AttachNativeKeyEvent, key=0x%X, char=0x%X, "
      "mod=0x%X", this, aKeyEvent.keyCode, aKeyEvent.charCode,
      aKeyEvent.modifiers));
 
   NSEventType eventType;
-  if (aKeyEvent.message == NS_KEY_UP) {
+  if (aKeyEvent.mMessage == NS_KEY_UP) {
     eventType = NSKeyUp;
   } else {
     eventType = NSKeyDown;
   }
 
   static const uint32_t sModifierFlagMap[][2] = {
     { MODIFIER_SHIFT,    NSShiftKeyMask },
     { MODIFIER_CONTROL,  NSControlKeyMask },
--- a/widget/gtk/IMContextWrapper.cpp
+++ b/widget/gtk/IMContextWrapper.cpp
@@ -2196,17 +2196,17 @@ IMContextWrapper::Selection::Assign(cons
     mOffset = aIMENotification.mSelectionChangeData.mOffset;
     mLength = aIMENotification.mSelectionChangeData.Length();
     mWritingMode = aIMENotification.mSelectionChangeData.GetWritingMode();
 }
 
 void
 IMContextWrapper::Selection::Assign(const WidgetQueryContentEvent& aEvent)
 {
-    MOZ_ASSERT(aEvent.message == NS_QUERY_SELECTED_TEXT);
+    MOZ_ASSERT(aEvent.mMessage == NS_QUERY_SELECTED_TEXT);
     MOZ_ASSERT(aEvent.mSucceeded);
     mOffset = aEvent.mReply.mOffset;
     mLength = aEvent.mReply.mString.Length();
     mWritingMode = aEvent.GetWritingMode();
 }
 
 } // namespace widget
 } // namespace mozilla
--- a/widget/gtk/nsGtkKeyUtils.cpp
+++ b/widget/gtk/nsGtkKeyUtils.cpp
@@ -978,23 +978,23 @@ KeymapWrapper::InitKeyEvent(WidgetKeyboa
          "isAlt=%s, isMeta=%s }",
          keymapWrapper, modifierState,
          ((aGdkKeyEvent->type == GDK_KEY_PRESS) ?
                "GDK_KEY_PRESS" : "GDK_KEY_RELEASE"),
          gdk_keyval_name(aGdkKeyEvent->keyval),
          aGdkKeyEvent->keyval, aGdkKeyEvent->state,
          aGdkKeyEvent->hardware_keycode,
          GetBoolName(aGdkKeyEvent->is_modifier),
-         ((aKeyEvent.message == NS_KEY_DOWN) ? "NS_KEY_DOWN" :
-               (aKeyEvent.message == NS_KEY_PRESS) ? "NS_KEY_PRESS" :
+         ((aKeyEvent.mMessage == NS_KEY_DOWN) ? "NS_KEY_DOWN" :
+               (aKeyEvent.mMessage == NS_KEY_PRESS) ? "NS_KEY_PRESS" :
                                                       "NS_KEY_UP"),
          GetBoolName(aKeyEvent.IsShift()), GetBoolName(aKeyEvent.IsControl()),
          GetBoolName(aKeyEvent.IsAlt()), GetBoolName(aKeyEvent.IsMeta())));
 
-    if (aKeyEvent.message == NS_KEY_PRESS) {
+    if (aKeyEvent.mMessage == NS_KEY_PRESS) {
         keymapWrapper->InitKeypressEvent(aKeyEvent, aGdkKeyEvent);
     }
 
     // The transformations above and in gdk for the keyval are not invertible
     // so link to the GdkEvent (which will vanish soon after return from the
     // event callback) to give plugins access to hardware_keycode and state.
     // (An XEvent would be nice but the GdkEvent is good enough.)
     aKeyEvent.mPluginEvent.Copy(*aGdkKeyEvent);
@@ -1318,17 +1318,17 @@ KeymapWrapper::GetDOMKeyCodeFromKeyPairs
         default:                        return 0;
     }
 }
 
 void
 KeymapWrapper::InitKeypressEvent(WidgetKeyboardEvent& aKeyEvent,
                                  GdkEventKey* aGdkKeyEvent)
 {
-    NS_ENSURE_TRUE_VOID(aKeyEvent.message == NS_KEY_PRESS);
+    NS_ENSURE_TRUE_VOID(aKeyEvent.mMessage == NS_KEY_PRESS);
 
     aKeyEvent.charCode = GetCharCodeFor(aGdkKeyEvent);
     if (!aKeyEvent.charCode) {
         MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
             ("KeymapWrapper(%p): InitKeypressEvent, "
              "keyCode=0x%02X, charCode=0x%08X",
              this, aKeyEvent.keyCode, aKeyEvent.charCode));
         return;
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -987,17 +987,17 @@ nsBaseWidget::ProcessUntransformedAPZEve
   DispatchEvent(aEvent, status);
 
   if (mAPZC && !context.WasRoutedToChildProcess()) {
     // EventStateManager did not route the event into the child process.
     // It's safe to communicate to APZ that the event has been processed.
     // TODO: Eventually we'll be able to move the SendSetTargetAPZCNotification
     // call into APZEventState::Process*Event() as well.
     if (WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent()) {
-      if (touchEvent->message == NS_TOUCH_START) {
+      if (touchEvent->mMessage == NS_TOUCH_START) {
         if (gfxPrefs::TouchActionEnabled()) {
           APZCCallbackHelper::SendSetAllowedTouchBehaviorNotification(this, *touchEvent,
               aInputBlockId, mSetAllowedTouchBehaviorCallback);
         }
         APZCCallbackHelper::SendSetTargetAPZCNotification(this, GetDocument(), *aEvent,
             aGuid, aInputBlockId);
       }
       mAPZEventState->ProcessTouchEvent(*touchEvent, aGuid, aInputBlockId, aApzResponse);
@@ -2623,17 +2623,17 @@ nsBaseWidget::debug_GuiEventToString(Wid
 {
   NS_ASSERTION(nullptr != aGuiEvent,"cmon, null gui event.");
 
   nsAutoString eventName(NS_LITERAL_STRING("UNKNOWN"));
 
 #define _ASSIGN_eventName(_value,_name)\
 case _value: eventName.AssignLiteral(_name) ; break
 
-  switch(aGuiEvent->message)
+  switch(aGuiEvent->mMessage)
   {
     _ASSIGN_eventName(NS_BLUR_CONTENT,"NS_BLUR_CONTENT");
     _ASSIGN_eventName(NS_DRAGDROP_GESTURE,"NS_DND_GESTURE");
     _ASSIGN_eventName(NS_DRAGDROP_DROP,"NS_DND_DROP");
     _ASSIGN_eventName(NS_DRAGDROP_ENTER,"NS_DND_ENTER");
     _ASSIGN_eventName(NS_DRAGDROP_EXIT,"NS_DND_EXIT");
     _ASSIGN_eventName(NS_DRAGDROP_OVER,"NS_DND_OVER");
     _ASSIGN_eventName(NS_EDITOR_INPUT,"NS_EDITOR_INPUT");
@@ -2665,17 +2665,17 @@ case _value: eventName.AssignLiteral(_na
     _ASSIGN_eventName(NS_XUL_COMMAND_UPDATE, "NS_XUL_COMMAND_UPDATE");
 
 #undef _ASSIGN_eventName
 
   default:
     {
       char buf[32];
 
-      snprintf_literal(buf,"UNKNOWN: %d",aGuiEvent->message);
+      snprintf_literal(buf,"UNKNOWN: %d",aGuiEvent->mMessage);
 
       CopyASCIItoUTF16(buf, eventName);
     }
     break;
   }
 
   return nsAutoString(eventName);
 }
@@ -2797,25 +2797,23 @@ nsBaseWidget::debug_WantPaintFlashing()
 //////////////////////////////////////////////////////////////
 /* static */ void
 nsBaseWidget::debug_DumpEvent(FILE *                aFileOut,
                               nsIWidget *           aWidget,
                               WidgetGUIEvent*       aGuiEvent,
                               const nsAutoCString & aWidgetName,
                               int32_t               aWindowID)
 {
-  if (aGuiEvent->message == NS_MOUSE_MOVE)
-  {
+  if (aGuiEvent->mMessage == NS_MOUSE_MOVE) {
     if (!debug_GetCachedBoolPref("nglayout.debug.motion_event_dumping"))
       return;
   }
 
-  if (aGuiEvent->message == NS_MOUSE_ENTER_WIDGET ||
-      aGuiEvent->message == NS_MOUSE_EXIT_WIDGET)
-  {
+  if (aGuiEvent->mMessage == NS_MOUSE_ENTER_WIDGET ||
+      aGuiEvent->mMessage == NS_MOUSE_EXIT_WIDGET) {
     if (!debug_GetCachedBoolPref("nglayout.debug.crossing_event_dumping"))
       return;
   }
 
   if (!debug_GetCachedBoolPref("nglayout.debug.event_dumping"))
     return;
 
   NS_LossyConvertUTF16toASCII tempString(debug_GuiEventToString(aGuiEvent).get());
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -43,28 +43,28 @@ template<>
 struct ParamTraits<mozilla::WidgetEvent>
 {
   typedef mozilla::WidgetEvent paramType;
 
   static void Write(Message* aMsg, const paramType& aParam)
   {
     WriteParam(aMsg,
       static_cast<mozilla::EventClassIDType>(aParam.mClass));
-    WriteParam(aMsg, aParam.message);
+    WriteParam(aMsg, aParam.mMessage);
     WriteParam(aMsg, aParam.refPoint);
     WriteParam(aMsg, aParam.time);
     WriteParam(aMsg, aParam.timeStamp);
     WriteParam(aMsg, aParam.mFlags);
   }
 
   static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
   {
     mozilla::EventClassIDType eventClassID = 0;
     bool ret = ReadParam(aMsg, aIter, &eventClassID) &&
-               ReadParam(aMsg, aIter, &aResult->message) &&
+               ReadParam(aMsg, aIter, &aResult->mMessage) &&
                ReadParam(aMsg, aIter, &aResult->refPoint) &&
                ReadParam(aMsg, aIter, &aResult->time) &&
                ReadParam(aMsg, aIter, &aResult->timeStamp) &&
                ReadParam(aMsg, aIter, &aResult->mFlags);
     aResult->mClass = static_cast<mozilla::EventClassID>(eventClassID);
     return ret;
   }
 };
--- a/widget/qt/nsWindow.cpp
+++ b/widget/qt/nsWindow.cpp
@@ -1095,17 +1095,17 @@ static void
 InitKeyEvent(WidgetKeyboardEvent& aEvent, QKeyEvent* aQEvent)
 {
     aEvent.InitBasicModifiers(aQEvent->modifiers() & Qt::ControlModifier,
                               aQEvent->modifiers() & Qt::AltModifier,
                               aQEvent->modifiers() & Qt::ShiftModifier,
                               aQEvent->modifiers() & Qt::MetaModifier);
 
     aEvent.mIsRepeat =
-        (aEvent.message == NS_KEY_DOWN || aEvent.message == NS_KEY_PRESS) &&
+        (aEvent.mMessage == NS_KEY_DOWN || aEvent.mMessage == NS_KEY_PRESS) &&
         aQEvent->isAutoRepeat();
     aEvent.time = 0;
 
     if (sAltGrModifier) {
         aEvent.modifiers |= (MODIFIER_CONTROL | MODIFIER_ALT);
     }
 
     if (aQEvent->text().length() && aQEvent->text()[0].isPrint()) {
--- a/widget/windows/KeyboardLayout.cpp
+++ b/widget/windows/KeyboardLayout.cpp
@@ -1138,17 +1138,17 @@ NativeKey::InitKeyEvent(WidgetKeyboardEv
 
 void
 NativeKey::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent,
                         const ModifierKeyState& aModKeyState) const
 {
   nsIntPoint point(0, 0);
   mWidget->InitEvent(aKeyEvent, &point);
 
-  switch (aKeyEvent.message) {
+  switch (aKeyEvent.mMessage) {
     case NS_KEY_DOWN:
       aKeyEvent.keyCode = mDOMKeyCode;
       // Unique id for this keydown event and its associated keypress.
       sUniqueKeyEventId++;
       aKeyEvent.mUniqueId = sUniqueKeyEventId;
       break;
     case NS_KEY_UP:
       aKeyEvent.keyCode = mDOMKeyCode;
--- a/widget/windows/WinMouseScrollHandler.cpp
+++ b/widget/windows/WinMouseScrollHandler.cpp
@@ -816,17 +816,17 @@ MouseScrollHandler::LastEventInfo::Round
 }
 
 bool
 MouseScrollHandler::LastEventInfo::InitWheelEvent(
                                      nsWindowBase* aWidget,
                                      WidgetWheelEvent& aWheelEvent,
                                      const ModifierKeyState& aModKeyState)
 {
-  MOZ_ASSERT(aWheelEvent.message == NS_WHEEL_WHEEL);
+  MOZ_ASSERT(aWheelEvent.mMessage == NS_WHEEL_WHEEL);
 
   // XXX Why don't we use lParam value? We should use lParam value because
   //     our internal message is always posted by original message handler.
   //     So, GetMessagePos() may return different cursor position.
   InitEvent(aWidget, aWheelEvent);
 
   aModKeyState.InitInputEvent(aWheelEvent);
 
--- a/widget/windows/nsWinGesture.cpp
+++ b/widget/windows/nsWinGesture.cpp
@@ -329,31 +329,31 @@ nsWinGesture::ProcessGestureMessage(HWND
     case GID_ZOOM:
     {
       if (gi.dwFlags & GF_BEGIN) {
         // Send a zoom start event
 
         // The low 32 bits are the distance in pixels.
         mZoomIntermediate = (float)gi.ullArguments;
 
-        evt.message = NS_SIMPLE_GESTURE_MAGNIFY_START;
+        evt.mMessage = NS_SIMPLE_GESTURE_MAGNIFY_START;
         evt.delta = 0.0;
       }
       else if (gi.dwFlags & GF_END) {
         // Send a zoom end event, the delta is the change
         // in touch points.
-        evt.message = NS_SIMPLE_GESTURE_MAGNIFY;
+        evt.mMessage = NS_SIMPLE_GESTURE_MAGNIFY;
         // (positive for a "zoom in")
         evt.delta = -1.0 * (mZoomIntermediate - (float)gi.ullArguments);
         mZoomIntermediate = (float)gi.ullArguments;
       }
       else {
         // Send a zoom intermediate event, the delta is the change
         // in touch points.
-        evt.message = NS_SIMPLE_GESTURE_MAGNIFY_UPDATE;
+        evt.mMessage = NS_SIMPLE_GESTURE_MAGNIFY_UPDATE;
         // (positive for a "zoom in")
         evt.delta = -1.0 * (mZoomIntermediate - (float)gi.ullArguments);
         mZoomIntermediate = (float)gi.ullArguments;
       }
     }
     break;
 
     case GID_ROTATE:
@@ -380,37 +380,37 @@ nsWinGesture::ProcessGestureMessage(HWND
       mRotateIntermediate = degrees;
 
       if (evt.delta > 0)
         evt.direction = nsIDOMSimpleGestureEvent::ROTATION_COUNTERCLOCKWISE;
       else if (evt.delta < 0)
         evt.direction = nsIDOMSimpleGestureEvent::ROTATION_CLOCKWISE;
 
       if (gi.dwFlags & GF_BEGIN)
-        evt.message = NS_SIMPLE_GESTURE_ROTATE_START;
+        evt.mMessage = NS_SIMPLE_GESTURE_ROTATE_START;
       else if (gi.dwFlags & GF_END)
-        evt.message = NS_SIMPLE_GESTURE_ROTATE;
+        evt.mMessage = NS_SIMPLE_GESTURE_ROTATE;
       else
-        evt.message = NS_SIMPLE_GESTURE_ROTATE_UPDATE;
+        evt.mMessage = NS_SIMPLE_GESTURE_ROTATE_UPDATE;
     }
     break;
 
     case GID_TWOFINGERTAP:
     {
       // Normally maps to "restore" from whatever you may have recently changed. A simple
       // double click.
-      evt.message = NS_SIMPLE_GESTURE_TAP;
+      evt.mMessage = NS_SIMPLE_GESTURE_TAP;
       evt.clickCount = 1;
     }
     break;
 
     case GID_PRESSANDTAP:
     {
       // Two finger right click. Defaults to right click if it falls through.
-      evt.message = NS_SIMPLE_GESTURE_PRESSTAP;
+      evt.mMessage = NS_SIMPLE_GESTURE_PRESSTAP;
       evt.clickCount = 1;
     }
     break;
   }
 
   return true;
 }
 
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -4075,17 +4075,17 @@ bool nsWindow::DispatchMouseEvent(uint32
       break;
   }
 
   // Doubleclicks are used to set the click count, then changed to mousedowns
   // We're going to time double-clicks from mouse *up* to next mouse *down*
   LONG curMsgTime = ::GetMessageTime();
 
   if (aEventType == NS_MOUSE_DOUBLECLICK) {
-    event.message = NS_MOUSE_BUTTON_DOWN;
+    event.mMessage = NS_MOUSE_BUTTON_DOWN;
     event.button = aButton;
     sLastClickCount = 2;
     sLastMouseDownTime = curMsgTime;
   }
   else if (aEventType == NS_MOUSE_BUTTON_UP) {
     // remember when this happened for the next mouse down
     sLastMousePoint.x = eventPoint.x;
     sLastMousePoint.y = eventPoint.y;