Bug 833009 - Remove "nsContentUtils.h" inclusions from headers in content/events/. r=smaug
authorMounir Lamouri <mounir.lamouri@gmail.com>
Wed, 23 Jan 2013 19:39:34 +0000
changeset 120573 cd11feb558732c53b19f3b5cc4ed21cb8cac9d48
parent 120572 00a33fee3c87b9615c2f18075f70bbfc2a08d4c4
child 120574 02e8dcde27b76ef8fc44fd94e23d81b71d1ef478
push id24256
push userryanvm@gmail.com
push dateFri, 01 Feb 2013 20:50:01 +0000
treeherdermozilla-central@4e7c92906a79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs833009
milestone21.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 833009 - Remove "nsContentUtils.h" inclusions from headers in content/events/. r=smaug
content/events/src/nsEventStateManager.cpp
content/events/src/nsEventStateManager.h
view/src/nsViewManager.cpp
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -3897,16 +3897,28 @@ public:
                            &aVisitor.mEventStatus);
       }
     }
   }
 
   nsCOMPtr<nsIContent> mTarget;
 };
 
+/*static*/ bool
+nsEventStateManager::IsHandlingUserInput()
+{
+  if (sUserInputEventDepth <= 0) {
+    return false;
+  }
+
+  TimeDuration timeout = nsContentUtils::HandlingUserInputTimeout();
+  return timeout <= TimeDuration(0) ||
+         (TimeStamp::Now() - sHandlingInputStart) <= timeout;
+}
+
 nsIFrame*
 nsEventStateManager::DispatchMouseEvent(nsGUIEvent* aEvent, uint32_t aMessage,
                                         nsIContent* aTargetContent,
                                         nsIContent* aRelatedContent)
 {
   // http://dvcs.w3.org/hg/webevents/raw-file/default/mouse-lock.html#methods
   // "[When the mouse is locked on an element...e]vents that require the concept
   // of a mouse cursor must not be dispatched (for example: mouseover, mouseout).
--- a/content/events/src/nsEventStateManager.h
+++ b/content/events/src/nsEventStateManager.h
@@ -21,17 +21,16 @@
 #include "nsIFrameLoader.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsIMarkupDocumentViewer.h"
 #include "nsIScrollableFrame.h"
 #include "nsFocusManager.h"
 #include "nsIDocument.h"
 #include "nsEventStates.h"
 #include "mozilla/TimeStamp.h"
-#include "nsContentUtils.h"
 #include "nsIFrame.h"
 
 class nsIPresShell;
 class nsIDocShell;
 class nsIDocShellTreeNode;
 class nsIDocShellTreeItem;
 class imgIContainer;
 class nsDOMDataTransfer;
@@ -170,25 +169,17 @@ public:
    * This includes timers or anything else that is initiated from user input.
    * However, mouse over events are not counted as user input, nor are
    * page load events. If this method is called from asynchronously executed code,
    * such as during layout reflows, it will return false. If more time has elapsed
    * since the user input than is specified by the
    * dom.event.handling-user-input-time-limit pref (default 1 second), this
    * function also returns false.
    */
-  static bool IsHandlingUserInput()
-  {
-    if (sUserInputEventDepth <= 0) {
-      return false;
-    }
-    TimeDuration timeout = nsContentUtils::HandlingUserInputTimeout();
-    return timeout <= TimeDuration(0) ||
-           (TimeStamp::Now() - sHandlingInputStart) <= timeout;
-  }
+  static bool IsHandlingUserInput();
 
   nsPresContext* GetPresContext() { return mPresContext; }
 
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(nsEventStateManager,
                                            nsIObserver)
 
   static nsIDocument* sMouseOverDocument;
 
--- a/view/src/nsViewManager.cpp
+++ b/view/src/nsViewManager.cpp
@@ -20,16 +20,17 @@
 #include "nsXULPopupManager.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
 #include "nsEventStateManager.h"
 #include "mozilla/StartupTimeline.h"
 #include "sampler.h"
 #include "nsRefreshDriver.h"
 #include "mozilla/Preferences.h"
+#include "nsContentUtils.h"
 
 /**
    XXX TODO XXX
 
    DeCOMify newly private methods
    Optimize view storage
 */