Bug 425958 - Fill an opaque NSView with white when Gecko refuses to draw, because not drawing anything means that garbage reaches the screen. r=mstange

--HG--
extra : rebase_source : c43ccac7359cd376a4f6a138f538d203dc281909
This commit is contained in:
Stuart Morgan 2009-11-06 11:17:45 +01:00
Родитель 399649fd52
Коммит cfc8100176
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -2617,7 +2617,14 @@ static const PRInt32 sShadowInvalidationInterval = 100;
paintEvent.region = rgn;
nsAutoRetainCocoaObject kungFuDeathGrip(self);
mGeckoChild->DispatchWindowEvent(paintEvent);
PRBool painted = mGeckoChild->DispatchWindowEvent(paintEvent);
if (!painted && [self isOpaque]) {
// Gecko refused to draw, but we've claimed to be opaque, so we have to
// draw something--fill with white.
CGContextSetRGBFillColor(aContext, 1, 1, 1, 1);
CGContextFillRect(aContext, CGRectMake(aRect.origin.x, aRect.origin.y,
aRect.size.width, aRect.size.height));
}
if (!mGeckoChild)
return;