Merge backout of changeset 7799cfb99362, bug 517804

This commit is contained in:
Markus Stange 2009-09-23 08:53:56 +12:00
commit f877219f80
3 changed files with 10 additions and 24 deletions

View File

@ -893,7 +893,6 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent,
break; break;
} }
case NS_WILL_PAINT:
case NS_PAINT: case NS_PAINT:
{ {
nsPaintEvent *event = static_cast<nsPaintEvent*>(aEvent); nsPaintEvent *event = static_cast<nsPaintEvent*>(aEvent);
@ -906,7 +905,6 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent,
// The rect is in device units, and it's in the coordinate space of its // The rect is in device units, and it's in the coordinate space of its
// associated window. // associated window.
nsCOMPtr<nsIRegion> region = event->region; nsCOMPtr<nsIRegion> region = event->region;
if (aEvent->message == NS_PAINT) {
if (!region) { if (!region) {
if (NS_FAILED(CreateRegion(getter_AddRefs(region)))) if (NS_FAILED(CreateRegion(getter_AddRefs(region))))
break; break;
@ -917,7 +915,6 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent,
if (region->IsEmpty()) if (region->IsEmpty())
break; break;
}
// Refresh the view // Refresh the view
if (IsRefreshEnabled()) { if (IsRefreshEnabled()) {
@ -988,12 +985,12 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent,
rootVM->ProcessPendingUpdates(mRootView, PR_FALSE); rootVM->ProcessPendingUpdates(mRootView, PR_FALSE);
} }
if (view && aEvent->message == NS_PAINT) { if (view) {
Refresh(view, event->renderingContext, region, Refresh(view, event->renderingContext, region,
NS_VMREFRESH_DOUBLE_BUFFER); NS_VMREFRESH_DOUBLE_BUFFER);
} }
} }
} else if (aEvent->message == NS_PAINT) { } else {
// since we got an NS_PAINT event, we need to // since we got an NS_PAINT event, we need to
// draw something so we don't get blank areas, // draw something so we don't get blank areas,
// unless there's no widget or it's transparent. // unless there's no widget or it's transparent.

View File

@ -162,8 +162,6 @@ class nsHashKey;
#define NS_DEACTIVATE (NS_WINDOW_START + 8) #define NS_DEACTIVATE (NS_WINDOW_START + 8)
// top-level window z-level change request // top-level window z-level change request
#define NS_SETZLEVEL (NS_WINDOW_START + 9) #define NS_SETZLEVEL (NS_WINDOW_START + 9)
// Widget will need to be painted
#define NS_WILL_PAINT (NS_WINDOW_START + 29)
// Widget needs to be repainted // Widget needs to be repainted
#define NS_PAINT (NS_WINDOW_START + 30) #define NS_PAINT (NS_WINDOW_START + 30)
// Key is pressed within a window // Key is pressed within a window

View File

@ -2755,15 +2755,6 @@ static const PRInt32 sShadowInvalidationInterval = 100;
NS_OBJC_END_TRY_ABORT_BLOCK; NS_OBJC_END_TRY_ABORT_BLOCK;
} }
- (void)viewWillDraw
{
if (!mGeckoChild)
return;
nsPaintEvent paintEvent(PR_TRUE, NS_WILL_PAINT, mGeckoChild);
mGeckoChild->DispatchWindowEvent(paintEvent);
}
// Allows us to turn off setting up the clip region // Allows us to turn off setting up the clip region
// before each drawRect. We already clip within gecko. // before each drawRect. We already clip within gecko.
- (BOOL)wantsDefaultClipping - (BOOL)wantsDefaultClipping