summaryrefslogtreecommitdiffstats
path: root/dom/base
diff options
context:
space:
mode:
Diffstat (limited to 'dom/base')
-rw-r--r--dom/base/nsContentUtils.cpp56
-rw-r--r--dom/base/nsContentUtils.h6
-rw-r--r--dom/base/nsFrameLoader.cpp16
-rw-r--r--dom/base/nsGkAtomList.h1
4 files changed, 1 insertions, 78 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<nsIDocument> doc;
-
- nsCOMPtr<nsPIDOMWindowOuter> docShellWin =
- do_QueryInterface(aDocShell->GetScriptGlobalObject());
- if (docShellWin) {
- doc = docShellWin->GetExtantDoc();
- }
-
- if (NS_WARN_IF(!doc)) {
- return;
- }
-
- nsCOMPtr<nsIURI> uri = doc->GetDocumentURI();
- if (NS_WARN_IF(!uri)) {
- return;
- }
-
- nsAutoCString uriStr;
- uri->GetSpec(uriStr);
- aPresentationUrl = NS_ConvertUTF8toUTF16(uriStr);
- return;
- }
-
- if (XRE_IsContentProcess()) {
- nsCOMPtr<nsIDocShellTreeItem> sameTypeRoot;
- aDocShell->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot));
- nsCOMPtr<nsIDocShellTreeItem> root;
- aDocShell->GetRootTreeItem(getter_AddRefs(root));
- if (sameTypeRoot.get() == root.get()) {
- // presentation URL is stored in TabChild for the top most
- // <iframe mozbrowser> in content process.
- TabChild* tabChild = TabChild::GetFrom(aDocShell);
- if (tabChild) {
- aPresentationUrl = tabChild->PresentationURL();
- }
- return;
- }
- }
-
- nsCOMPtr<nsILoadContext> loadContext(do_QueryInterface(aDocShell));
- nsCOMPtr<nsIDOMElement> topFrameElement;
- loadContext->GetTopFrameElement(getter_AddRefs(topFrameElement));
- if (!topFrameElement) {
- return;
- }
-
- topFrameElement->GetAttribute(NS_LITERAL_STRING("mozpresentation"), aPresentationUrl);
-}
-
/* static */ nsIDocShell*
nsContentUtils::GetDocShellForEventTarget(EventTarget* aTarget)
{
diff --git a/dom/base/nsContentUtils.h b/dom/base/nsContentUtils.h
index e0c023fff..83ee41740 100644
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -2680,12 +2680,6 @@ public:
static void SetScrollbarsVisibility(nsIDocShell* aDocShell, bool aVisible);
/*
- * Return the associated presentation URL of the presented content.
- * Will return empty string if the docshell is not in a presented content.
- */
- static void GetPresentationURL(nsIDocShell* aDocShell, nsAString& aPresentationUrl);
-
- /*
* Try to find the docshell corresponding to the given event target.
*/
static nsIDocShell* GetDocShellForEventTarget(mozilla::dom::EventTarget* aTarget);
diff --git a/dom/base/nsFrameLoader.cpp b/dom/base/nsFrameLoader.cpp
index 79c889596..b4397d063 100644
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -3102,14 +3102,6 @@ nsFrameLoader::ApplySandboxFlags(uint32_t sandboxFlags)
// The child can only add restrictions, never remove them.
sandboxFlags |= parentSandboxFlags;
- // If this frame is a receiving browsing context, we should add
- // sandboxed auxiliary navigation flag to sandboxFlags. See
- // https://w3c.github.io/presentation-api/#creating-a-receiving-browsing-context
- nsAutoString presentationURL;
- nsContentUtils::GetPresentationURL(mDocShell, presentationURL);
- if (!presentationURL.IsEmpty()) {
- sandboxFlags |= SANDBOXED_AUXILIARY_NAVIGATION;
- }
mDocShell->SetSandboxFlags(sandboxFlags);
}
}
@@ -3427,11 +3419,6 @@ nsFrameLoader::GetNewTabContext(MutableTabContext* aTabContext,
rv = PopulateUserContextIdFromAttribute(attrs);
NS_ENSURE_SUCCESS(rv, rv);
- nsAutoString presentationURLStr;
- mOwnerContent->GetAttr(kNameSpaceID_None,
- nsGkAtoms::mozpresentation,
- presentationURLStr);
-
nsCOMPtr<nsIDocShell> docShell = mOwnerContent->OwnerDoc()->GetDocShell();
nsCOMPtr<nsILoadContext> parentContext = do_QueryInterface(docShell);
NS_ENSURE_STATE(parentContext);
@@ -3459,8 +3446,7 @@ nsFrameLoader::GetNewTabContext(MutableTabContext* aTabContext,
containingApp,
showAccelerators,
showFocusRings,
- attrs,
- presentationURLStr);
+ attrs);
NS_ENSURE_STATE(tabContextUpdated);
return NS_OK;
diff --git a/dom/base/nsGkAtomList.h b/dom/base/nsGkAtomList.h
index a1a0b15f9..5e08fdc20 100644
--- a/dom/base/nsGkAtomList.h
+++ b/dom/base/nsGkAtomList.h
@@ -1038,7 +1038,6 @@ GK_ATOM(predicate, "predicate")
GK_ATOM(prefix, "prefix")
GK_ATOM(preload, "preload")
GK_ATOM(prerendered, "prerendered")
-GK_ATOM(mozpresentation, "mozpresentation")
GK_ATOM(preserve, "preserve")
GK_ATOM(preserveSpace, "preserve-space")
GK_ATOM(preventdefault, "preventdefault")