Loading view/src/nsViewManager.cpp +1 −42 Original line number Diff line number Diff line Loading @@ -80,21 +80,6 @@ #define NSCOORD_NONE PR_INT32_MIN void nsViewManager::PostInvalidateEvent() { NS_ASSERTION(IsRootVM(), "Caller screwed up"); if (!mInvalidateEvent.IsPending()) { nsRefPtr<nsInvalidateEvent> ev = new nsInvalidateEvent(this); if (NS_FAILED(NS_DispatchToCurrentThread(ev))) { NS_WARNING("failed to dispatch nsInvalidateEvent"); } else { mInvalidateEvent = ev; } } } #undef DEBUG_MOUSE_LOCATION PRInt32 nsViewManager::mVMCount = 0; Loading Loading @@ -132,10 +117,6 @@ nsViewManager::~nsViewManager() mRootView = nsnull; } // Make sure to revoke pending events for all viewmanagers, since some events // are posted by a non-root viewmanager. mInvalidateEvent.Revoke(); if (!IsRootVM()) { // We have a strong ref to mRootViewManager NS_RELEASE(mRootViewManager); Loading Loading @@ -1387,11 +1368,7 @@ void nsViewManager::TriggerRefresh(PRUint32 aUpdateFlags) if (mUpdateBatchCnt > 0) return; if (!mHasPendingUpdates) { // Nothing to do } else if (aUpdateFlags & NS_VMREFRESH_DEFERRED) { PostInvalidateEvent(); } else { // NO_SYNC if (mHasPendingUpdates) { FlushPendingInvalidates(); } } Loading Loading @@ -1531,24 +1508,6 @@ nsViewManager::CallDidPaintOnObservers() } } void nsViewManager::ProcessInvalidateEvent() { NS_ASSERTION(IsRootVM(), "Incorrectly targeted invalidate event"); // If we're in the middle of an update batch, just repost the event, // to be processed when the batch ends. bool processEvent = (mUpdateBatchCnt == 0); if (processEvent) { FlushPendingInvalidates(); } mInvalidateEvent.Forget(); if (!processEvent) { // We didn't actually process this event... post a new one PostInvalidateEvent(); } } NS_IMETHODIMP nsViewManager::GetLastUserEventTime(PRUint32& aTime) { Loading view/src/nsViewManager.h +0 −23 Original line number Diff line number Diff line Loading @@ -81,8 +81,6 @@ Composite() calls should also be forwarded to the root view manager. */ class nsInvalidateEvent; class nsViewManager : public nsIViewManager { public: nsViewManager(); Loading Loading @@ -142,7 +140,6 @@ public: NS_IMETHOD IsPainting(bool& aIsPainting); NS_IMETHOD GetLastUserEventTime(PRUint32& aTime); void ProcessInvalidateEvent(); static PRUint32 gLastUserEventTime; /* Update the cached RootViewManager pointer on this view manager. */ Loading Loading @@ -259,8 +256,6 @@ private: // never null (if we have no ancestors, it will be |this|). nsViewManager *mRootViewManager; nsRevocableEventPtr<nsInvalidateEvent> mInvalidateEvent; // The following members should not be accessed directly except by // the root view manager. Some have accessor functions to enforce // this, as noted. Loading @@ -281,24 +276,6 @@ private: //list of view managers static nsVoidArray *gViewManagers; void PostInvalidateEvent(); }; class nsInvalidateEvent : public nsRunnable { public: nsInvalidateEvent(class nsViewManager *vm) : mViewManager(vm) { NS_ASSERTION(mViewManager, "null parameter"); } void Revoke() { mViewManager = nsnull; } NS_IMETHOD Run() { if (mViewManager) mViewManager->ProcessInvalidateEvent(); return NS_OK; } protected: class nsViewManager *mViewManager; }; #endif /* nsViewManager_h___ */ Loading
view/src/nsViewManager.cpp +1 −42 Original line number Diff line number Diff line Loading @@ -80,21 +80,6 @@ #define NSCOORD_NONE PR_INT32_MIN void nsViewManager::PostInvalidateEvent() { NS_ASSERTION(IsRootVM(), "Caller screwed up"); if (!mInvalidateEvent.IsPending()) { nsRefPtr<nsInvalidateEvent> ev = new nsInvalidateEvent(this); if (NS_FAILED(NS_DispatchToCurrentThread(ev))) { NS_WARNING("failed to dispatch nsInvalidateEvent"); } else { mInvalidateEvent = ev; } } } #undef DEBUG_MOUSE_LOCATION PRInt32 nsViewManager::mVMCount = 0; Loading Loading @@ -132,10 +117,6 @@ nsViewManager::~nsViewManager() mRootView = nsnull; } // Make sure to revoke pending events for all viewmanagers, since some events // are posted by a non-root viewmanager. mInvalidateEvent.Revoke(); if (!IsRootVM()) { // We have a strong ref to mRootViewManager NS_RELEASE(mRootViewManager); Loading Loading @@ -1387,11 +1368,7 @@ void nsViewManager::TriggerRefresh(PRUint32 aUpdateFlags) if (mUpdateBatchCnt > 0) return; if (!mHasPendingUpdates) { // Nothing to do } else if (aUpdateFlags & NS_VMREFRESH_DEFERRED) { PostInvalidateEvent(); } else { // NO_SYNC if (mHasPendingUpdates) { FlushPendingInvalidates(); } } Loading Loading @@ -1531,24 +1508,6 @@ nsViewManager::CallDidPaintOnObservers() } } void nsViewManager::ProcessInvalidateEvent() { NS_ASSERTION(IsRootVM(), "Incorrectly targeted invalidate event"); // If we're in the middle of an update batch, just repost the event, // to be processed when the batch ends. bool processEvent = (mUpdateBatchCnt == 0); if (processEvent) { FlushPendingInvalidates(); } mInvalidateEvent.Forget(); if (!processEvent) { // We didn't actually process this event... post a new one PostInvalidateEvent(); } } NS_IMETHODIMP nsViewManager::GetLastUserEventTime(PRUint32& aTime) { Loading
view/src/nsViewManager.h +0 −23 Original line number Diff line number Diff line Loading @@ -81,8 +81,6 @@ Composite() calls should also be forwarded to the root view manager. */ class nsInvalidateEvent; class nsViewManager : public nsIViewManager { public: nsViewManager(); Loading Loading @@ -142,7 +140,6 @@ public: NS_IMETHOD IsPainting(bool& aIsPainting); NS_IMETHOD GetLastUserEventTime(PRUint32& aTime); void ProcessInvalidateEvent(); static PRUint32 gLastUserEventTime; /* Update the cached RootViewManager pointer on this view manager. */ Loading Loading @@ -259,8 +256,6 @@ private: // never null (if we have no ancestors, it will be |this|). nsViewManager *mRootViewManager; nsRevocableEventPtr<nsInvalidateEvent> mInvalidateEvent; // The following members should not be accessed directly except by // the root view manager. Some have accessor functions to enforce // this, as noted. Loading @@ -281,24 +276,6 @@ private: //list of view managers static nsVoidArray *gViewManagers; void PostInvalidateEvent(); }; class nsInvalidateEvent : public nsRunnable { public: nsInvalidateEvent(class nsViewManager *vm) : mViewManager(vm) { NS_ASSERTION(mViewManager, "null parameter"); } void Revoke() { mViewManager = nsnull; } NS_IMETHOD Run() { if (mViewManager) mViewManager->ProcessInvalidateEvent(); return NS_OK; } protected: class nsViewManager *mViewManager; }; #endif /* nsViewManager_h___ */