Bug 1477343 - Remove PBrowser::IsParentWindowMainWidgetVisible. r=mccr8,bzbarsky

Differential Revision: https://phabricator.services.mozilla.com/D2347

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Blake Kaplan 2018-07-26 19:26:02 +00:00
Родитель 02f535024e
Коммит e4a0da7d25
5 изменённых файлов: 4 добавлений и 33 удалений

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

@ -3551,6 +3551,10 @@ nsDOMWindowUtils::AllowScriptsToClose()
NS_IMETHODIMP
nsDOMWindowUtils::GetIsParentWindowMainWidgetVisible(bool* aIsVisible)
{
if (!XRE_IsParentProcess()) {
MOZ_CRASH("IsParentWindowMainWidgetVisible is only available in the parent process");
}
// this should reflect the "is parent window visible" logic in
// nsWindowWatcher::OpenWindowInternal()
nsCOMPtr<nsPIDOMWindowOuter> window = do_QueryReferent(mWindow);
@ -3559,12 +3563,6 @@ nsDOMWindowUtils::GetIsParentWindowMainWidgetVisible(bool* aIsVisible)
nsCOMPtr<nsIWidget> parentWidget;
nsIDocShell *docShell = window->GetDocShell();
if (docShell) {
if (TabChild *tabChild = TabChild::GetFrom(docShell)) {
if (!tabChild->SendIsParentWindowMainWidgetVisible(aIsVisible))
return NS_ERROR_FAILURE;
return NS_OK;
}
nsCOMPtr<nsIDocShellTreeOwner> parentTreeOwner;
docShell->GetTreeOwner(getter_AddRefs(parentTreeOwner));
nsCOMPtr<nsIBaseWindow> parentWindow(do_GetInterface(parentTreeOwner));

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

@ -359,8 +359,6 @@ parent:
nested(inside_cpow) async SetInputContext(InputContext context,
InputContextAction action);
sync IsParentWindowMainWidgetVisible() returns (bool visible);
/**
* Set the native cursor.
* @param value

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

@ -2491,26 +2491,6 @@ TabParent::RecvSetInputContext(
return IPC_OK();
}
mozilla::ipc::IPCResult
TabParent::RecvIsParentWindowMainWidgetVisible(bool* aIsVisible)
{
// XXXbz This looks unused; can we just remove it?
nsCOMPtr<nsIContent> frame = do_QueryInterface(mFrameElement);
if (!frame)
return IPC_OK();
nsGlobalWindowOuter* outer =
nsGlobalWindowOuter::Cast(frame->OwnerDoc()->GetWindow());
if (!outer)
return IPC_OK();
nsCOMPtr<nsIDOMWindowUtils> windowUtils = outer->WindowUtils();
nsresult rv = windowUtils->GetIsParentWindowMainWidgetVisible(aIsVisible);
if (NS_FAILED(rv)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
already_AddRefed<nsIWidget>
TabParent::GetTopLevelWidget()
{

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

@ -283,8 +283,6 @@ public:
virtual mozilla::ipc::IPCResult RecvSetStatus(const uint32_t& aType,
const nsString& aStatus) override;
virtual mozilla::ipc::IPCResult RecvIsParentWindowMainWidgetVisible(bool* aIsVisible) override;
virtual mozilla::ipc::IPCResult RecvShowTooltip(const uint32_t& aX,
const uint32_t& aY,
const nsString& aTooltip,

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

@ -830,9 +830,6 @@ description =
description =
[PBrowser::GetInputContext]
description =
[PBrowser::IsParentWindowMainWidgetVisible]
description =
description =
[PBrowser::RequestNativeKeyBindings]
description =
[PBrowser::DispatchWheelEvent]