mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 288222. resync widgets with views before trying to paint. r+sr=bzbarsky
This commit is contained in:
parent
a29a02d2ec
commit
5281e0b914
@ -1601,7 +1601,7 @@ nsViewManager::CreateBlendingBuffers(nsIRenderingContext *aRC,
|
||||
return buffers;
|
||||
}
|
||||
|
||||
void nsViewManager::ProcessPendingUpdates(nsView* aView)
|
||||
void nsViewManager::ProcessPendingUpdates(nsView* aView, PRBool aDoPaint)
|
||||
{
|
||||
NS_ASSERTION(IsRootVM(), "Updates will be missed");
|
||||
|
||||
@ -1617,10 +1617,10 @@ void nsViewManager::ProcessPendingUpdates(nsView* aView)
|
||||
// process pending updates in child view.
|
||||
for (nsView* childView = aView->GetFirstChild(); childView;
|
||||
childView = childView->GetNextSibling()) {
|
||||
ProcessPendingUpdates(childView);
|
||||
ProcessPendingUpdates(childView, aDoPaint);
|
||||
}
|
||||
|
||||
if (aView->HasNonEmptyDirtyRegion()) {
|
||||
if (aDoPaint && aView->HasNonEmptyDirtyRegion()) {
|
||||
// Push out updates after we've processed the children; ensures that
|
||||
// damage is applied based on the final widget geometry
|
||||
NS_ASSERTION(mRefreshEnabled, "Cannot process pending updates with refresh disabled");
|
||||
@ -2022,6 +2022,10 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
|
||||
EndUpdateViewBatch(NS_VMREFRESH_DEFERRED);
|
||||
}
|
||||
}
|
||||
nsViewManager* rootVM = RootViewManager();
|
||||
if (rootVM->mHasPendingUpdates) {
|
||||
rootVM->ProcessPendingUpdates(mRootView, PR_FALSE);
|
||||
}
|
||||
Refresh(view, event->renderingContext, region,
|
||||
NS_VMREFRESH_DOUBLE_BUFFER);
|
||||
}
|
||||
@ -4322,7 +4326,7 @@ nsViewManager::FlushPendingInvalidates()
|
||||
}
|
||||
|
||||
if (mHasPendingUpdates) {
|
||||
ProcessPendingUpdates(mRootView);
|
||||
ProcessPendingUpdates(mRootView, PR_TRUE);
|
||||
mHasPendingUpdates = PR_FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ protected:
|
||||
|
||||
private:
|
||||
void FlushPendingInvalidates();
|
||||
void ProcessPendingUpdates(nsView *aView);
|
||||
void ProcessPendingUpdates(nsView *aView, PRBool aDoPaint);
|
||||
void ReparentChildWidgets(nsIView* aView, nsIWidget *aNewWidget);
|
||||
void ReparentWidgets(nsIView* aView, nsIView *aParent);
|
||||
already_AddRefed<nsIRenderingContext> CreateRenderingContext(nsView &aView);
|
||||
|
Loading…
Reference in New Issue
Block a user