Bug 1179695 - Remove mWasAsync from WidgetQueryContentEvent. r=masayuki,nchen
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 09 Jul 2015 15:09:56 +0900
changeset 283671 23c0e761dec896aebcc5a45df01a3dfd00a5c34f
parent 283670 82c2ba56ae0df47dbee3cf7da34034db3d2bff0d
child 283672 86156917b97ed281c80de74a3e0bab3c224cfe56
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki, nchen
bugs1179695
milestone42.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 1179695 - Remove mWasAsync from WidgetQueryContentEvent. r=masayuki,nchen
widget/ContentCache.cpp
widget/TextEvents.h
widget/android/nsWindow.cpp
widget/nsGUIEventIPC.h
--- a/widget/ContentCache.cpp
+++ b/widget/ContentCache.cpp
@@ -505,17 +505,16 @@ ContentCacheInParent::AssignContent(cons
 
 bool
 ContentCacheInParent::HandleQueryContentEvent(WidgetQueryContentEvent& aEvent,
                                               nsIWidget* aWidget) const
 {
   MOZ_ASSERT(aWidget);
 
   aEvent.mSucceeded = false;
-  aEvent.mWasAsync = false;
   aEvent.mReply.mFocusedWidget = aWidget;
 
   switch (aEvent.message) {
     case NS_QUERY_SELECTED_TEXT:
       MOZ_LOG(sContentCacheLog, LogLevel::Info,
         ("ContentCacheInParent: 0x%p HandleQueryContentEvent("
          "aEvent={ message=NS_QUERY_SELECTED_TEXT }, aWidget=0x%p)",
          this, aWidget));
--- a/widget/TextEvents.h
+++ b/widget/TextEvents.h
@@ -459,17 +459,16 @@ public:
   {
     return this;
   }
 
   WidgetQueryContentEvent(bool aIsTrusted, uint32_t aMessage,
                           nsIWidget* aWidget)
     : WidgetGUIEvent(aIsTrusted, aMessage, aWidget, eQueryContentEventClass)
     , mSucceeded(false)
-    , mWasAsync(false)
     , mUseNativeLineBreak(true)
     , mWithFontRanges(false)
   {
   }
 
   virtual WidgetEvent* Duplicate() const override
   {
     // This event isn't an internal event of any DOM event.
@@ -541,17 +540,16 @@ public:
     NS_ASSERTION(message == NS_QUERY_SELECTED_TEXT ||
                  message == NS_QUERY_CARET_RECT ||
                  message == NS_QUERY_TEXT_RECT,
                  "not querying selection or text rect");
     return mReply.mWritingMode;
   }
 
   bool mSucceeded;
-  bool mWasAsync;
   bool mUseNativeLineBreak;
   bool mWithFontRanges;
   struct
   {
     uint32_t EndOffset() const
     {
       CheckedInt<uint32_t> endOffset =
         CheckedInt<uint32_t>(mOffset) + mLength;
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1890,17 +1890,17 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *
 
             int32_t start = ae->Start(), end = ae->End();
 
             if (start < 0 || end < 0) {
                 WidgetQueryContentEvent event(true, NS_QUERY_SELECTED_TEXT,
                                               this);
                 InitEvent(event, nullptr);
                 DispatchEvent(&event);
-                MOZ_ASSERT(event.mSucceeded && !event.mWasAsync);
+                MOZ_ASSERT(event.mSucceeded);
 
                 if (start < 0)
                     start = int32_t(event.GetSelectionStart());
                 if (end < 0)
                     end = int32_t(event.GetSelectionEnd());
             }
 
             selEvent.mOffset = std::min(start, end);
@@ -1973,17 +1973,17 @@ nsWindow::OnIMEEvent(AndroidGeckoEvent *
                 }
 
                 {
                     WidgetQueryContentEvent queryEvent(true,
                                                        NS_QUERY_SELECTED_TEXT,
                                                        this);
                     InitEvent(queryEvent, nullptr);
                     DispatchEvent(&queryEvent);
-                    MOZ_ASSERT(queryEvent.mSucceeded && !queryEvent.mWasAsync);
+                    MOZ_ASSERT(queryEvent.mSucceeded);
                     event.mData = queryEvent.mReply.mString;
                 }
 
                 {
                     WidgetCompositionEvent event(
                         true, NS_COMPOSITION_START, this);
                     InitEvent(event, nullptr);
                     DispatchEvent(&event);
--- a/widget/nsGUIEventIPC.h
+++ b/widget/nsGUIEventIPC.h
@@ -592,17 +592,16 @@ struct ParamTraits<mozilla::WidgetQueryC
     WriteParam(aMsg, aParam.mReply.mReversed);
     WriteParam(aMsg, aParam.mReply.mHasSelection);
     WriteParam(aMsg, aParam.mReply.mWidgetIsHit);
     WriteParam(aMsg, aParam.mReply.mFontRanges);
   }
 
   static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
   {
-    aResult->mWasAsync = true;
     return ReadParam(aMsg, aIter,
                      static_cast<mozilla::WidgetGUIEvent*>(aResult)) &&
            ReadParam(aMsg, aIter, &aResult->mSucceeded) &&
            ReadParam(aMsg, aIter, &aResult->mUseNativeLineBreak) &&
            ReadParam(aMsg, aIter, &aResult->mWithFontRanges) &&
            ReadParam(aMsg, aIter, &aResult->mInput.mOffset) &&
            ReadParam(aMsg, aIter, &aResult->mInput.mLength) &&
            ReadParam(aMsg, aIter, &aResult->mReply.mOffset) &&