Bug 1546998 - Remove EventStateManager::UserInputCount; r=smaug
authorEdgar Chen <echen@mozilla.com>
Tue, 30 Apr 2019 08:55:10 +0000
changeset 530719 4cc7988178100d5e96321da4a0541a77e125ad4a
parent 530718 ee6ceba037af625f039cffb8dae0c860cdda1bbe
child 530720 4b550f29706aa5833edb64db3189fb7daeb9b298
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1546998
milestone68.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 1546998 - Remove EventStateManager::UserInputCount; r=smaug Differential Revision: https://phabricator.services.mozilla.com/D29323
dom/events/EventStateManager.cpp
dom/events/EventStateManager.h
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -188,17 +188,16 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
 NS_INTERFACE_MAP_END
 
 /******************************************************************/
 /* mozilla::EventStateManager                                     */
 /******************************************************************/
 
 static uint32_t sESMInstanceCount = 0;
 
-uint64_t EventStateManager::sUserInputCounter = 0;
 int32_t EventStateManager::sUserInputEventDepth = 0;
 int32_t EventStateManager::sUserKeyboardEventDepth = 0;
 bool EventStateManager::sNormalLMouseEventInProcess = false;
 EventStateManager* EventStateManager::sActiveESM = nullptr;
 Document* EventStateManager::sMouseOverDocument = nullptr;
 AutoWeakFrame EventStateManager::sLastDragOverFrame = nullptr;
 LayoutDeviceIntPoint EventStateManager::sPreLockPoint =
     LayoutDeviceIntPoint(0, 0);
@@ -4050,17 +4049,16 @@ bool EventStateManager::IsHandlingUserIn
 /*static*/
 bool EventStateManager::IsHandlingKeyboardInput() {
   return sUserKeyboardEventDepth > 0;
 }
 
 /*static*/
 void EventStateManager::StartHandlingUserInput(EventMessage aMessage) {
   ++sUserInputEventDepth;
-  ++sUserInputCounter;
   if (sUserInputEventDepth == 1) {
     sLatestUserInputStart = sHandlingInputStart = TimeStamp::Now();
   }
   if (WidgetEvent::IsKeyEventMessage(aMessage)) {
     ++sUserKeyboardEventDepth;
   }
 }
 
--- a/dom/events/EventStateManager.h
+++ b/dom/events/EventStateManager.h
@@ -264,23 +264,16 @@ class EventStateManager : public nsSuppo
    * over events.  And the latter returns true when one of the user inputs
    * is an input from keyboard.  If these methods are called from asynchronously
    * executed code, such as during layout reflows, it will return false.
    */
   static bool IsHandlingUserInput();
   static bool IsHandlingKeyboardInput();
 
   /**
-   * Get the number of user inputs handled since process start. This
-   * includes anything that is initiated by user, with the exception
-   * of page load events or mouse over events.
-   */
-  static uint64_t UserInputCount() { return sUserInputCounter; }
-
-  /**
    * Get the timestamp at which the latest user input was handled.
    *
    * Guaranteed to be monotonic. Until the first user input, return
    * the epoch.
    */
   static TimeStamp LatestUserInputStart() { return sLatestUserInputStart; }
 
   nsPresContext* GetPresContext() { return mPresContext; }
@@ -1251,21 +1244,16 @@ class EventStateManager : public nsSuppo
   nsRefPtrHashtable<nsUint32HashKey, OverOutElementsWrapper>
       mPointersEnterLeaveHelper;
 
  public:
   static nsresult UpdateUserActivityTimer(void);
   // Array for accesskey support
   nsCOMArray<nsIContent> mAccessKeys;
 
-  // The number of user inputs handled since process start. This
-  // includes anything that is initiated by user, with the exception
-  // of page load events or mouse over events.
-  static uint64_t sUserInputCounter;
-
   // The current depth of user and keyboard inputs. sUserInputEventDepth
   // is the number of any user input events, page load events and mouse over
   // events.  sUserKeyboardEventDepth is the number of keyboard input events.
   // Incremented whenever we start handling a user input, decremented when we
   // have finished handling a user input. This depth is *not* reset in case
   // of nested event loops.
   static int32_t sUserInputEventDepth;
   static int32_t sUserKeyboardEventDepth;