зеркало из https://github.com/mozilla/pjs.git
Bug 596414. Don't paint NSViews for plugins. r=jrmuizel,josh a=b
This commit is contained in:
Родитель
46fe63d710
Коммит
1e7bae6c19
|
@ -2400,7 +2400,7 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||||
|
|
||||||
- (BOOL)isOpaque
|
- (BOOL)isOpaque
|
||||||
{
|
{
|
||||||
return [[self window] isOpaque];
|
return [[self window] isOpaque] && !mIsPluginView;
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)setIsPluginView:(BOOL)aIsPlugin
|
-(void)setIsPluginView:(BOOL)aIsPlugin
|
||||||
|
@ -2597,6 +2597,11 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Don't ever draw non-QuickDraw plugin views explicitly; they'll be drawn as
|
||||||
|
// part of their parent widget.
|
||||||
|
if (mIsPluginView)
|
||||||
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG_UPDATE
|
#ifdef DEBUG_UPDATE
|
||||||
nsIntRect geckoBounds;
|
nsIntRect geckoBounds;
|
||||||
mGeckoChild->GetBounds(geckoBounds);
|
mGeckoChild->GetBounds(geckoBounds);
|
||||||
|
@ -2627,17 +2632,22 @@ NSEvent* gLastDragMouseDownEvent = nil;
|
||||||
nsIntRect(aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height);
|
nsIntRect(aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subtract child view rectangles from the region
|
#ifndef NP_NO_QUICKDRAW
|
||||||
|
// Subtract quickdraw plugin rectangles from the region
|
||||||
NSArray* subviews = [self subviews];
|
NSArray* subviews = [self subviews];
|
||||||
for (int i = 0; i < int([subviews count]); ++i) {
|
for (int i = 0; i < int([subviews count]); ++i) {
|
||||||
NSView* view = [subviews objectAtIndex:i];
|
NSView* view = [subviews objectAtIndex:i];
|
||||||
if (![view isKindOfClass:[ChildView class]] || [view isHidden])
|
if (![view isKindOfClass:[ChildView class]] || [view isHidden])
|
||||||
continue;
|
continue;
|
||||||
NSRect frame = [view frame];
|
ChildView* cview = (ChildView*) view;
|
||||||
paintEvent.region.Sub(paintEvent.region,
|
if ([cview isPluginView] && [cview pluginDrawingModel] == NPDrawingModelQuickDraw) {
|
||||||
nsIntRect(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height));
|
NSRect frame = [view frame];
|
||||||
|
paintEvent.region.Sub(paintEvent.region,
|
||||||
|
nsIntRect(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (mGeckoChild->GetLayerManager()->GetBackendType() == LayerManager::LAYERS_OPENGL) {
|
if (mGeckoChild->GetLayerManager()->GetBackendType() == LayerManager::LAYERS_OPENGL) {
|
||||||
LayerManagerOGL *manager = static_cast<LayerManagerOGL*>(mGeckoChild->GetLayerManager());
|
LayerManagerOGL *manager = static_cast<LayerManagerOGL*>(mGeckoChild->GetLayerManager());
|
||||||
manager->SetClippingRegion(paintEvent.region);
|
manager->SetClippingRegion(paintEvent.region);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче