diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index 3e48f21f8d0c..6669b1ae84d7 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -184,6 +184,7 @@ static PRBool sKeyCausesActivation = PR_TRUE; static PRUint32 sESMInstanceCount = 0; static PRInt32 sChromeAccessModifier = 0, sContentAccessModifier = 0; PRInt32 nsEventStateManager::sUserInputEventDepth = 0; +PRBool nsEventStateManager::sNormalLMouseEventInProcess = PR_FALSE; static PRUint32 gMouseOrKeyboardEventCounter = 0; static nsITimer* gUserInteractionTimer = nsnull; @@ -778,7 +779,6 @@ nsEventStateManager::nsEventStateManager() mLClickCount(0), mMClickCount(0), mRClickCount(0), - mNormalLMouseEventInProcess(PR_FALSE), m_haveShutdown(PR_FALSE), mLastLineScrollConsumedX(PR_FALSE), mLastLineScrollConsumedY(PR_FALSE), @@ -1085,7 +1085,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext, #endif mLClickCount = ((nsMouseEvent*)aEvent)->clickCount; SetClickCount(aPresContext, (nsMouseEvent*)aEvent, aStatus); - mNormalLMouseEventInProcess = PR_TRUE; + sNormalLMouseEventInProcess = PR_TRUE; break; case nsMouseEvent::eMiddleButton: mMClickCount = ((nsMouseEvent*)aEvent)->clickCount; @@ -1109,7 +1109,7 @@ nsEventStateManager::PreHandleEvent(nsPresContext* aPresContext, #ifndef XP_OS2 StopTrackingDragGesture(); #endif - mNormalLMouseEventInProcess = PR_FALSE; + sNormalLMouseEventInProcess = PR_FALSE; case nsMouseEvent::eRightButton: #ifdef XP_OS2 StopTrackingDragGesture(); @@ -2799,7 +2799,7 @@ nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext, case NS_MOUSE_BUTTON_DOWN: { if (static_cast(aEvent)->button == nsMouseEvent::eLeftButton && - !mNormalLMouseEventInProcess) { + !sNormalLMouseEventInProcess) { // We got a mouseup event while a mousedown event was being processed. // Make sure that the capturing content is cleared. nsIPresShell::SetCapturingContent(nsnull, 0); @@ -4493,7 +4493,7 @@ nsEventStateManager::EventStatusOK(nsGUIEvent* aEvent, PRBool *aOK) *aOK = PR_TRUE; if (aEvent->message == NS_MOUSE_BUTTON_DOWN && static_cast(aEvent)->button == nsMouseEvent::eLeftButton) { - if (!mNormalLMouseEventInProcess) { + if (!sNormalLMouseEventInProcess) { *aOK = PR_FALSE; } } diff --git a/content/events/src/nsEventStateManager.h b/content/events/src/nsEventStateManager.h index 9d5d99529809..e466fe912994 100644 --- a/content/events/src/nsEventStateManager.h +++ b/content/events/src/nsEventStateManager.h @@ -387,8 +387,6 @@ protected: PRUint32 mMClickCount; PRUint32 mRClickCount; - PRPackedBool mNormalLMouseEventInProcess; - PRPackedBool m_haveShutdown; // Array for accesskey support @@ -399,6 +397,8 @@ protected: PRPackedBool mLastLineScrollConsumedY; static PRInt32 sUserInputEventDepth; + + static PRBool sNormalLMouseEventInProcess; // Functions used for click hold context menus PRBool mClickHoldContextMenu;