зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1132592 - Avoid showing PluginWidgetParent widgets before they are positioned and clipped. r=aklotz
This commit is contained in:
Родитель
7237654e96
Коммит
2cf73763f7
|
@ -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");
|
||||
|
|
Загрузка…
Ссылка в новой задаче