Bug 1132592 - Avoid showing PluginWidgetParent widgets before they are positioned and clipped. r=aklotz

This commit is contained in:
Jim Mathies 2015-02-13 12:27:56 -06:00
Родитель 7237654e96
Коммит 2cf73763f7
2 изменённых файлов: 7 добавлений и 9 удалений

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

@ -152,10 +152,6 @@ PluginWidgetParent::RecvCreate(nsresult* aResult)
DebugOnly<nsresult> drv;
drv = mWidget->EnableDragDrop(true);
NS_ASSERTION(NS_SUCCEEDED(drv), "widget call failure");
drv = mWidget->Show(true);
NS_ASSERTION(NS_SUCCEEDED(drv), "widget call failure");
drv = mWidget->Enable(true);
NS_ASSERTION(NS_SUCCEEDED(drv), "widget call failure");
#if defined(MOZ_WIDGET_GTK)
// For setup, initially GTK code expects 'window' to hold the parent.

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

@ -217,16 +217,18 @@ CompositorChild::RecvUpdatePluginConfigurations(const nsIntPoint& aContentOffset
bounds.width, bounds.height, false);
NS_ASSERTION(NS_SUCCEEDED(rv), "widget call failure");
nsTArray<nsIntRect> rectsOut;
// This call may change the value of isVisible
CalculatePluginClip(bounds, aPlugins[pluginsIdx].clip(),
aContentOffset, aParentLayerVisibleRegion,
rectsOut, visibleBounds, isVisible);
if (isVisible) {
// content clipping region (widget origin)
rv = widget->SetWindowClipRegion(rectsOut, false);
NS_ASSERTION(NS_SUCCEEDED(rv), "widget call failure");
}
// content clipping region (widget origin)
rv = widget->SetWindowClipRegion(rectsOut, false);
NS_ASSERTION(NS_SUCCEEDED(rv), "widget call failure");
}
rv = widget->Enable(isVisible);
NS_ASSERTION(NS_SUCCEEDED(rv), "widget call failure");
// visible state - updated after clipping, prior to invalidating
rv = widget->Show(isVisible);
NS_ASSERTION(NS_SUCCEEDED(rv), "widget call failure");