From e57592c1ba338e132c5c5f3e8bb3d6431617b337 Mon Sep 17 00:00:00 2001 From: Fedor Date: Sun, 7 Feb 2021 17:33:18 +0200 Subject: [PATCH] Clean up presentation api leftovers. --- dom/base/nsContentUtils.cpp | 56 ------------------------------------- dom/base/nsContentUtils.h | 6 ---- dom/base/nsFrameLoader.cpp | 16 +---------- dom/base/nsGkAtomList.h | 1 - dom/ipc/PTabContext.ipdlh | 5 ---- dom/ipc/TabChild.cpp | 5 ---- dom/ipc/TabContext.cpp | 16 ++--------- dom/ipc/TabContext.h | 20 ++----------- modules/libpref/init/all.js | 15 ---------- 9 files changed, 6 insertions(+), 134 deletions(-) diff --git a/dom/base/nsContentUtils.cpp b/dom/base/nsContentUtils.cpp index a34752554..107daaede 100644 --- a/dom/base/nsContentUtils.cpp +++ b/dom/base/nsContentUtils.cpp @@ -9341,62 +9341,6 @@ nsContentUtils::SetScrollbarsVisibility(nsIDocShell* aDocShell, bool aVisible) } } -/* static */ void -nsContentUtils::GetPresentationURL(nsIDocShell* aDocShell, nsAString& aPresentationUrl) -{ - MOZ_ASSERT(aDocShell); - - // Simulate receiver context for web platform test - if (Preferences::GetBool("dom.presentation.testing.simulate-receiver")) { - nsCOMPtr doc; - - nsCOMPtr docShellWin = - do_QueryInterface(aDocShell->GetScriptGlobalObject()); - if (docShellWin) { - doc = docShellWin->GetExtantDoc(); - } - - if (NS_WARN_IF(!doc)) { - return; - } - - nsCOMPtr uri = doc->GetDocumentURI(); - if (NS_WARN_IF(!uri)) { - return; - } - - nsAutoCString uriStr; - uri->GetSpec(uriStr); - aPresentationUrl = NS_ConvertUTF8toUTF16(uriStr); - return; - } - - if (XRE_IsContentProcess()) { - nsCOMPtr sameTypeRoot; - aDocShell->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot)); - nsCOMPtr root; - aDocShell->GetRootTreeItem(getter_AddRefs(root)); - if (sameTypeRoot.get() == root.get()) { - // presentation URL is stored in TabChild for the top most - //