diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 4cad99537d71..3570a825db69 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -2508,7 +2508,6 @@ NS_IMETHODIMP nsDocShell::SetSecurityUI(nsISecureBrowserUI *aSecurityUI) { mSecurityUI = aSecurityUI; - mSecurityUI->SetDocShell(this); return NS_OK; } diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index a7df668e0e3a..7deb7db39d2c 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -30,7 +30,6 @@ #include "nsFocusManager.h" #include "nsFrameLoader.h" #include "nsIContent.h" -#include "nsIDocShell.h" #include "nsIDOMApplicationRegistry.h" #include "nsIDOMElement.h" #include "nsIDOMEvent.h" @@ -502,14 +501,6 @@ TabParent::GetState(uint32_t *aState) return NS_OK; } -NS_IMETHODIMP -TabParent::SetDocShell(nsIDocShell *aDocShell) -{ - NS_ENSURE_ARG(aDocShell); - NS_WARNING("No mDocShell member in TabParent so there is no docShell to set"); - return NS_OK; -} - NS_IMETHODIMP TabParent::GetTooltipText(nsAString & aTooltipText) { diff --git a/netwerk/base/public/nsISecureBrowserUI.idl b/netwerk/base/public/nsISecureBrowserUI.idl index fb8c00663dee..b04a0e719e80 100644 --- a/netwerk/base/public/nsISecureBrowserUI.idl +++ b/netwerk/base/public/nsISecureBrowserUI.idl @@ -8,13 +8,11 @@ interface nsIDOMWindow; interface nsIDOMElement; -interface nsIDocShell; -[scriptable, uuid(e97e5688-add2-4a1d-acae-396d7702e382)] +[scriptable, uuid(081e31e0-a144-11d3-8c7c-00609792278c)] interface nsISecureBrowserUI : nsISupports { void init(in nsIDOMWindow window); - void setDocShell(in nsIDocShell docShell); readonly attribute unsigned long state; readonly attribute AString tooltipText; diff --git a/security/manager/boot/src/nsSecureBrowserUIImpl.cpp b/security/manager/boot/src/nsSecureBrowserUIImpl.cpp index f679eb57a8cd..e4246723e9f6 100644 --- a/security/manager/boot/src/nsSecureBrowserUIImpl.cpp +++ b/security/manager/boot/src/nsSecureBrowserUIImpl.cpp @@ -19,7 +19,6 @@ #include "nsIObserverService.h" #include "nsCURILoader.h" #include "nsIDocShell.h" -#include "nsIDocShellTreeItem.h" #include "nsIDocument.h" #include "nsIPrincipal.h" #include "nsIDOMElement.h" @@ -287,21 +286,12 @@ nsSecureBrowserUIImpl::MapInternalToExternalState(uint32_t* aState, lockIconStat if (ev && (*aState & STATE_IS_SECURE)) *aState |= nsIWebProgressListener::STATE_IDENTITY_EV_TOPLEVEL; - nsCOMPtr docShell = do_QueryReferent(mDocShell); - if (!docShell) + nsCOMPtr piwin = do_QueryReferent(mWindow); + if (!piwin) return NS_OK; - int32_t docShellType; - // For content docShell's, the mixed content security state is set on the root docShell. - if (NS_SUCCEEDED(docShell->GetItemType(&docShellType)) && docShellType == nsIDocShellTreeItem::typeContent) { - nsCOMPtr docShellTreeItem(do_QueryInterface(docShell)); - nsCOMPtr sameTypeRoot; - docShellTreeItem->GetSameTypeRootTreeItem(getter_AddRefs(sameTypeRoot)); - NS_ASSERTION(sameTypeRoot, "No document shell root tree item from document shell tree item!"); - docShell = do_QueryInterface(sameTypeRoot); - if (!docShell) - return NS_OK; - } + nsIDocShell* docShell = piwin->GetDocShell(); + MOZ_ASSERT(docShell); // Has a Mixed Content Load initiated in nsMixedContentBlocker? // If so, the state should be broken; overriding the previous state @@ -329,14 +319,6 @@ nsSecureBrowserUIImpl::MapInternalToExternalState(uint32_t* aState, lockIconStat return NS_OK; } -NS_IMETHODIMP -nsSecureBrowserUIImpl::SetDocShell(nsIDocShell *aDocShell) -{ - nsresult rv; - mDocShell = do_GetWeakReference(aDocShell, &rv); - return rv; -} - NS_IMETHODIMP nsSecureBrowserUIImpl::GetTooltipText(nsAString& aText) { diff --git a/security/manager/boot/src/nsSecureBrowserUIImpl.h b/security/manager/boot/src/nsSecureBrowserUIImpl.h index fc614663208f..9d9975fca9e8 100644 --- a/security/manager/boot/src/nsSecureBrowserUIImpl.h +++ b/security/manager/boot/src/nsSecureBrowserUIImpl.h @@ -17,7 +17,6 @@ #include "nsIStringBundle.h" #include "nsISecureBrowserUI.h" #include "nsIDocShell.h" -#include "nsIDocShellTreeItem.h" #include "nsIWebProgressListener.h" #include "nsIFormSubmitObserver.h" #include "nsIURI.h" @@ -67,7 +66,6 @@ protected: mozilla::ReentrantMonitor mReentrantMonitor; nsWeakPtr mWindow; - nsWeakPtr mDocShell; nsCOMPtr mIOService; nsCOMPtr mStringBundle; nsCOMPtr mCurrentURI;