Bug 1259672 Rename InternalFormEvent::originator to mOriginator r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Wed, 03 Aug 2016 17:06:10 +0900
changeset 308062 ac8d7e05b65c5bd7cf8e63ce8730b6f38606a8b0
parent 308061 a75a7acedade19cb8582c2e6188bd5bc39b75dba
child 308063 9e70575bfe319ed62db1cc2e7971e6e799733fde
push id80244
push userkwierso@gmail.com
push dateWed, 03 Aug 2016 23:47:12 +0000
treeherdermozilla-inbound@9112f5b17a3f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1259672
milestone51.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 1259672 Rename InternalFormEvent::originator to mOriginator r=smaug MozReview-Commit-ID: 1RoHVeziNr3
dom/html/HTMLButtonElement.cpp
dom/html/HTMLFormElement.cpp
dom/html/HTMLInputElement.cpp
widget/ContentEvents.h
--- a/dom/html/HTMLButtonElement.cpp
+++ b/dom/html/HTMLButtonElement.cpp
@@ -364,17 +364,17 @@ HTMLButtonElement::PostHandleEvent(Event
       default:
         break;
     }
     if (aVisitor.mItemFlags & NS_OUTER_ACTIVATE_EVENT) {
       if (mForm && (mType == NS_FORM_BUTTON_SUBMIT ||
                     mType == NS_FORM_BUTTON_RESET)) {
         InternalFormEvent event(true,
           (mType == NS_FORM_BUTTON_RESET) ? eFormReset : eFormSubmit);
-        event.originator     = this;
+        event.mOriginator = this;
         nsEventStatus status = nsEventStatus_eIgnore;
 
         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.
         //
--- a/dom/html/HTMLFormElement.cpp
+++ b/dom/html/HTMLFormElement.cpp
@@ -682,17 +682,17 @@ HTMLFormElement::BuildSubmission(HTMLFor
 {
   NS_ASSERTION(!mPendingSubmission, "tried to build two submissions!");
 
   // Get the originating frame (failure is non-fatal)
   nsGenericHTMLElement* originatingElement = nullptr;
   if (aEvent) {
     InternalFormEvent* formEvent = aEvent->AsFormEvent();
     if (formEvent) {
-      nsIContent* originator = formEvent->originator;
+      nsIContent* originator = formEvent->mOriginator;
       if (originator) {
         if (!originator->IsHTMLElement()) {
           return NS_ERROR_UNEXPECTED;
         }
         originatingElement = static_cast<nsGenericHTMLElement*>(originator);
       }
     }
   }
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -4552,17 +4552,17 @@ HTMLInputElement::PostHandleEvent(EventC
         }
         switch(mType) {
         case NS_FORM_INPUT_RESET:
         case NS_FORM_INPUT_SUBMIT:
         case NS_FORM_INPUT_IMAGE:
           if (mForm) {
             InternalFormEvent event(true,
               (mType == NS_FORM_INPUT_RESET) ? eFormReset : eFormSubmit);
-            event.originator      = this;
+            event.mOriginator = this;
             nsEventStatus status  = nsEventStatus_eIgnore;
 
             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.
--- a/widget/ContentEvents.h
+++ b/widget/ContentEvents.h
@@ -108,47 +108,47 @@ public:
     mArea = aEvent.mArea;
   }
 };
 
 /******************************************************************************
  * mozilla::InternalFormEvent
  *
  * We hold the originating form control for form submit and reset events.
- * originator is a weak pointer (does not hold a strong reference).
+ * mOriginator is a weak pointer (does not hold a strong reference).
  ******************************************************************************/
 
 class InternalFormEvent : public WidgetEvent
 {
 public:
   virtual InternalFormEvent* AsFormEvent() override { return this; }
 
   InternalFormEvent(bool aIsTrusted, EventMessage aMessage)
     : WidgetEvent(aIsTrusted, aMessage, eFormEventClass)
-    , originator(nullptr)
+    , mOriginator(nullptr)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     MOZ_ASSERT(mClass == eFormEventClass,
                "Duplicate() must be overridden by sub class");
     InternalFormEvent* result = new InternalFormEvent(false, mMessage);
     result->AssignFormEventData(*this, true);
     result->mFlags = mFlags;
     return result;
   }
 
-  nsIContent *originator;
+  nsIContent* mOriginator;
 
   void AssignFormEventData(const InternalFormEvent& aEvent, bool aCopyTargets)
   {
     AssignEventData(aEvent, aCopyTargets);
 
-    // Don't copy originator due to a weak pointer.
+    // Don't copy mOriginator due to a weak pointer.
   }
 };
 
 /******************************************************************************
  * mozilla::InternalClipboardEvent
  ******************************************************************************/
 
 class InternalClipboardEvent : public WidgetEvent