diff options
Diffstat (limited to 'docshell')
-rw-r--r-- | docshell/base/BrowsingContextWebProgress.cpp | 5 | ||||
-rw-r--r-- | docshell/base/CanonicalBrowsingContext.cpp | 15 | ||||
-rw-r--r-- | docshell/base/nsDocShell.cpp | 22 | ||||
-rw-r--r-- | docshell/base/nsDocShellTreeOwner.cpp | 8 | ||||
-rw-r--r-- | docshell/base/nsIDocShell.idl | 10 | ||||
-rw-r--r-- | docshell/base/nsIDocumentViewer.idl | 5 | ||||
-rw-r--r-- | docshell/test/browser/browser_bug134911.js | 2 | ||||
-rw-r--r-- | docshell/test/browser/browser_bug92473.js | 2 | ||||
-rw-r--r-- | docshell/test/browser/head.js | 2 |
9 files changed, 18 insertions, 53 deletions
diff --git a/docshell/base/BrowsingContextWebProgress.cpp b/docshell/base/BrowsingContextWebProgress.cpp index 7c915bd666..3b0096377c 100644 --- a/docshell/base/BrowsingContextWebProgress.cpp +++ b/docshell/base/BrowsingContextWebProgress.cpp @@ -170,7 +170,10 @@ void BrowsingContextWebProgress::ContextReplaced( already_AddRefed<BounceTrackingState> BrowsingContextWebProgress::GetBounceTrackingState() { if (!mBounceTrackingState) { - mBounceTrackingState = BounceTrackingState::GetOrCreate(this); + nsresult rv = NS_OK; + mBounceTrackingState = BounceTrackingState::GetOrCreate(this, rv); + NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), + "Failed to get BounceTrackingState."); } return do_AddRef(mBounceTrackingState); } diff --git a/docshell/base/CanonicalBrowsingContext.cpp b/docshell/base/CanonicalBrowsingContext.cpp index 4c92988c9b..78de7474b0 100644 --- a/docshell/base/CanonicalBrowsingContext.cpp +++ b/docshell/base/CanonicalBrowsingContext.cpp @@ -59,7 +59,7 @@ #include "nsBrowserStatusFilter.h" #include "nsIBrowser.h" #include "nsTHashSet.h" -#include "SessionStoreFunctions.h" +#include "nsISessionStoreFunctions.h" #include "nsIXPConnect.h" #include "nsImportModule.h" #include "UnitTransforms.h" @@ -2673,13 +2673,14 @@ void CanonicalBrowsingContext::RestoreState::Resolve() { nsresult CanonicalBrowsingContext::WriteSessionStorageToSessionStore( const nsTArray<SSCacheCopy>& aSesssionStorage, uint32_t aEpoch) { - nsCOMPtr<nsISessionStoreFunctions> funcs = do_ImportESModule( - "resource://gre/modules/SessionStoreFunctions.sys.mjs", fallible); - if (!funcs) { + nsCOMPtr<nsISessionStoreFunctions> sessionStoreFuncs = + do_GetService("@mozilla.org/toolkit/sessionstore-functions;1"); + if (!sessionStoreFuncs) { return NS_ERROR_FAILURE; } - nsCOMPtr<nsIXPConnectWrappedJS> wrapped = do_QueryInterface(funcs); + nsCOMPtr<nsIXPConnectWrappedJS> wrapped = + do_QueryInterface(sessionStoreFuncs); AutoJSAPI jsapi; if (!jsapi.Init(wrapped->GetJSObjectGlobal())) { return NS_ERROR_FAILURE; @@ -2700,8 +2701,8 @@ nsresult CanonicalBrowsingContext::WriteSessionStorageToSessionStore( update.setNull(); } - return funcs->UpdateSessionStoreForStorage(Top()->GetEmbedderElement(), this, - key, aEpoch, update); + return sessionStoreFuncs->UpdateSessionStoreForStorage( + Top()->GetEmbedderElement(), this, key, aEpoch, update); } void CanonicalBrowsingContext::UpdateSessionStoreSessionStorage( diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 87a34cf5b2..65caf8a231 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -167,7 +167,6 @@ #include "nsIURILoader.h" #include "nsIViewSourceChannel.h" #include "nsIWebBrowserChrome.h" -#include "nsIWebBrowserChromeFocus.h" #include "nsIWebBrowserFind.h" #include "nsIWebProgress.h" #include "nsIWidget.h" @@ -2099,27 +2098,6 @@ nsDocShell::GetBusyFlags(BusyFlags* aBusyFlags) { } NS_IMETHODIMP -nsDocShell::TabToTreeOwner(bool aForward, bool aForDocumentNavigation, - bool* aTookFocus) { - NS_ENSURE_ARG_POINTER(aTookFocus); - - nsCOMPtr<nsIWebBrowserChromeFocus> chromeFocus = do_GetInterface(mTreeOwner); - if (chromeFocus) { - if (aForward) { - *aTookFocus = - NS_SUCCEEDED(chromeFocus->FocusNextElement(aForDocumentNavigation)); - } else { - *aTookFocus = - NS_SUCCEEDED(chromeFocus->FocusPrevElement(aForDocumentNavigation)); - } - } else { - *aTookFocus = false; - } - - return NS_OK; -} - -NS_IMETHODIMP nsDocShell::GetLoadURIDelegate(nsILoadURIDelegate** aLoadURIDelegate) { nsCOMPtr<nsILoadURIDelegate> delegate = GetLoadURIDelegate(); delegate.forget(aLoadURIDelegate); diff --git a/docshell/base/nsDocShellTreeOwner.cpp b/docshell/base/nsDocShellTreeOwner.cpp index 6d8eb11cc6..6861c58b53 100644 --- a/docshell/base/nsDocShellTreeOwner.cpp +++ b/docshell/base/nsDocShellTreeOwner.cpp @@ -39,7 +39,6 @@ #include "nsIRemoteTab.h" #include "nsIBrowserChild.h" #include "nsRect.h" -#include "nsIWebBrowserChromeFocus.h" #include "nsIContent.h" #include "nsServiceManagerUtils.h" #include "nsViewManager.h" @@ -196,13 +195,6 @@ nsDocShellTreeOwner::GetInterface(const nsIID& aIID, void** aSink) { return NS_OK; } - if (aIID.Equals(NS_GET_IID(nsIWebBrowserChromeFocus))) { - if (mWebBrowserChromeWeak != nullptr) { - return mWebBrowserChromeWeak->QueryReferent(aIID, aSink); - } - return mOwnerWin->QueryInterface(aIID, aSink); - } - if (aIID.Equals(NS_GET_IID(nsIPrompt))) { nsCOMPtr<nsIPrompt> prompt; EnsurePrompter(); diff --git a/docshell/base/nsIDocShell.idl b/docshell/base/nsIDocShell.idl index 024c0f544c..fdc04f16c6 100644 --- a/docshell/base/nsIDocShell.idl +++ b/docshell/base/nsIDocShell.idl @@ -271,16 +271,6 @@ interface nsIDocShell : nsIDocShellTreeItem */ attribute float zoom; - /* - * Tells the docshell to offer focus to its tree owner. - * This is currently only necessary for embedding chrome. - * If forDocumentNavigation is true, then document navigation should be - * performed, where only the root of documents are selected. Otherwise, the - * next element in the parent should be returned. Returns true if focus was - * successfully taken by the tree owner. - */ - boolean tabToTreeOwner(in boolean forward, in boolean forDocumentNavigation); - /** * Current busy state for DocShell */ diff --git a/docshell/base/nsIDocumentViewer.idl b/docshell/base/nsIDocumentViewer.idl index afbbdfc464..27510dc879 100644 --- a/docshell/base/nsIDocumentViewer.idl +++ b/docshell/base/nsIDocumentViewer.idl @@ -211,8 +211,9 @@ interface nsIDocumentViewer : nsISupports /** * Sets the print settings for print / print-previewing a subdocument. */ - [can_run_script] void setPrintSettingsForSubdocument(in nsIPrintSettings aPrintSettings, - in RemotePrintJobChildPtr aRemotePrintJob); + [can_run_script, noscript] + void setPrintSettingsForSubdocument(in nsIPrintSettings aPrintSettings, + in RemotePrintJobChildPtr aRemotePrintJob); /** * Get the history entry that this viewer will save itself into when diff --git a/docshell/test/browser/browser_bug134911.js b/docshell/test/browser/browser_bug134911.js index 9b52eeab47..036b7acfec 100644 --- a/docshell/test/browser/browser_bug134911.js +++ b/docshell/test/browser/browser_bug134911.js @@ -29,7 +29,7 @@ function afterOpen() { content.document.getElementById("testinput").value = TEXT.enteredText2; }).then(() => { /* Force the page encoding to Shift_JIS */ - BrowserForceEncodingDetection(); + BrowserCommands.forceEncodingDetection(); }); } diff --git a/docshell/test/browser/browser_bug92473.js b/docshell/test/browser/browser_bug92473.js index 7e386f5ee9..0f8077fbc8 100644 --- a/docshell/test/browser/browser_bug92473.js +++ b/docshell/test/browser/browser_bug92473.js @@ -34,7 +34,7 @@ function afterOpen() { /* Test that the content on load is the expected wrong decoding */ testContent(wrongText).then(() => { - BrowserForceEncodingDetection(); + BrowserCommands.forceEncodingDetection(); }); } diff --git a/docshell/test/browser/head.js b/docshell/test/browser/head.js index 38f2528a2f..00b17d89a9 100644 --- a/docshell/test/browser/head.js +++ b/docshell/test/browser/head.js @@ -16,7 +16,7 @@ function runCharsetTest(url, check1, check2) { ); SpecialPowers.spawn(gBrowser.selectedBrowser, [], check1).then(() => { - BrowserForceEncodingDetection(); + BrowserCommands.forceEncodingDetection(); }); } |