Bug 476948: Need to be able to clear outstanding MozAfterPaint events r+sr=roc

This commit is contained in:
Taras Glek 2009-02-26 16:21:55 -08:00
parent 6d0f9d36c6
commit a3edad2b35
3 changed files with 17 additions and 0 deletions

View File

@ -307,6 +307,8 @@ interface nsIDOMWindowUtils : nsISupports {
*/
void suppressEventHandling(in boolean aSuppress);
void clearMozAfterPaintEvents();
/**
* Disable or enable non synthetic test mouse events on *all* windows.
*

View File

@ -683,6 +683,16 @@ nsDOMWindowUtils::GetIsMozAfterPaintPending(PRBool *aResult)
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::ClearMozAfterPaintEvents()
{
nsPresContext* presContext = GetPresContext();
if (!presContext)
return NS_OK;
presContext->ClearMozAfterPaintEvents();
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::DisableNonTestMouseEvents(PRBool aDisable)
{

View File

@ -802,6 +802,11 @@ public:
return !mSameDocDirtyRegion.IsEmpty() || !mCrossDocDirtyRegion.IsEmpty();
}
void ClearMozAfterPaintEvents() {
mSameDocDirtyRegion.SetEmpty();
mCrossDocDirtyRegion.SetEmpty();
}
protected:
friend class nsRunnableMethod<nsPresContext>;
NS_HIDDEN_(void) ThemeChangedInternal();