Bug 801763. Don't try to update geometry for plugin widgets with no parent. r=mats

--HG--
extra : rebase_source : d7d0f7c5536adc2cd0ad77c2b3169410f237d206
This commit is contained in:
Robert O'Callahan 2012-10-17 17:51:57 +13:00
parent c02fbc2f2e
commit fe1244558e

View File

@ -120,6 +120,14 @@ public:
void GetWidgetConfiguration(nsTArray<nsIWidget::Configuration>* aConfigurations)
{
if (mWidget) {
if (!mWidget->GetParent()) {
// Plugin widgets should not be toplevel except when they're out of the
// document, in which case the plugin should not be registered for
// geometry updates and this should not be called. But apparently we
// have bugs where mWidget sometimes is toplevel here. Bail out.
NS_ERROR("Plugin widgets registered for geometry updates should not be toplevel");
return;
}
nsIWidget::Configuration* configuration = aConfigurations->AppendElement();
configuration->mChild = mWidget;
configuration->mBounds = mNextConfigurationBounds;