Bug 826632. Part 5: nsViewManager methods do not need to be virtual and most of the ones that return nsresult don't need to. r=tnikkel

Also, just use GetRootView instead of GetRootViewImpl.
This commit is contained in:
Robert O'Callahan
2013-01-05 16:13:05 +13:00
parent e9a29a64e5
commit 05d4a5db6c
5 changed files with 106 additions and 113 deletions

View File

@@ -743,14 +743,14 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetNetscapeWindow(void *value)
#endif
// simply return the topmost document window
nsCOMPtr<nsIWidget> widget;
nsresult rv = vm->GetRootWidget(getter_AddRefs(widget));
vm->GetRootWidget(getter_AddRefs(widget));
if (widget) {
*pvalue = (void*)widget->GetNativeData(NS_NATIVE_WINDOW);
} else {
NS_ASSERTION(widget, "couldn't get doc's widget in getting doc's window handle");
}
return rv;
return NS_OK;
#elif (defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)) && defined(MOZ_X11)
// X11 window managers want the toplevel window for WM_TRANSIENT_FOR.
nsIWidget* win = mObjectFrame->GetNearestWidget();