Loading docshell/base/nsDocShell.cpp +0 −22 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -2098,27 +2097,6 @@ nsDocShell::GetBusyFlags(BusyFlags* aBusyFlags) { return NS_OK; } 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(); Loading docshell/base/nsDocShellTreeOwner.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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(); Loading docshell/base/nsIDocShell.idl +0 −10 Original line number Diff line number Diff line Loading @@ -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 */ Loading dom/base/nsFocusManager.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -3662,12 +3662,10 @@ nsresult nsFocusManager::DetermineElementToMoveFocus( } } else { if (aNavigateByKey) { // There is no parent, so call the tree owner. This will tell the // embedder or parent process that it should take the focus. bool tookFocus; docShell->TabToTreeOwner(forward, forDocumentNavigation, &tookFocus); // If the tree owner took the focus, blur the current element. if (tookFocus) { // There is no parent, so move the focus to the parent process. if (auto* child = BrowserChild::GetFrom(docShell)) { child->SendMoveFocus(forward, forDocumentNavigation); // Blur the current element. RefPtr<BrowsingContext> focusedBC = GetFocusedBrowsingContext(); if (focusedBC && focusedBC->IsInProcess()) { Blur(focusedBC, nullptr, true, true, false, Loading dom/ipc/BrowserChild.cpp +0 −13 Original line number Diff line number Diff line Loading @@ -502,7 +502,6 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(BrowserChild) NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChrome) NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChromeFocus) NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) NS_INTERFACE_MAP_ENTRY(nsIWindowProvider) NS_INTERFACE_MAP_ENTRY(nsIBrowserChild) Loading Loading @@ -627,18 +626,6 @@ BrowserChild::GetDimensions(DimensionKind aDimensionKind, int32_t* aX, NS_IMETHODIMP BrowserChild::Blur() { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP BrowserChild::FocusNextElement(bool aForDocumentNavigation) { SendMoveFocus(true, aForDocumentNavigation); return NS_OK; } NS_IMETHODIMP BrowserChild::FocusPrevElement(bool aForDocumentNavigation) { SendMoveFocus(false, aForDocumentNavigation); return NS_OK; } NS_IMETHODIMP BrowserChild::GetInterface(const nsIID& aIID, void** aSink) { // XXXbz should we restrict the set of interfaces we hand out here? Loading Loading
docshell/base/nsDocShell.cpp +0 −22 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -2098,27 +2097,6 @@ nsDocShell::GetBusyFlags(BusyFlags* aBusyFlags) { return NS_OK; } 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(); Loading
docshell/base/nsDocShellTreeOwner.cpp +0 −8 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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(); Loading
docshell/base/nsIDocShell.idl +0 −10 Original line number Diff line number Diff line Loading @@ -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 */ Loading
dom/base/nsFocusManager.cpp +4 −6 Original line number Diff line number Diff line Loading @@ -3662,12 +3662,10 @@ nsresult nsFocusManager::DetermineElementToMoveFocus( } } else { if (aNavigateByKey) { // There is no parent, so call the tree owner. This will tell the // embedder or parent process that it should take the focus. bool tookFocus; docShell->TabToTreeOwner(forward, forDocumentNavigation, &tookFocus); // If the tree owner took the focus, blur the current element. if (tookFocus) { // There is no parent, so move the focus to the parent process. if (auto* child = BrowserChild::GetFrom(docShell)) { child->SendMoveFocus(forward, forDocumentNavigation); // Blur the current element. RefPtr<BrowsingContext> focusedBC = GetFocusedBrowsingContext(); if (focusedBC && focusedBC->IsInProcess()) { Blur(focusedBC, nullptr, true, true, false, Loading
dom/ipc/BrowserChild.cpp +0 −13 Original line number Diff line number Diff line Loading @@ -502,7 +502,6 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_END NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(BrowserChild) NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChrome) NS_INTERFACE_MAP_ENTRY(nsIWebBrowserChromeFocus) NS_INTERFACE_MAP_ENTRY(nsIInterfaceRequestor) NS_INTERFACE_MAP_ENTRY(nsIWindowProvider) NS_INTERFACE_MAP_ENTRY(nsIBrowserChild) Loading Loading @@ -627,18 +626,6 @@ BrowserChild::GetDimensions(DimensionKind aDimensionKind, int32_t* aX, NS_IMETHODIMP BrowserChild::Blur() { return NS_ERROR_NOT_IMPLEMENTED; } NS_IMETHODIMP BrowserChild::FocusNextElement(bool aForDocumentNavigation) { SendMoveFocus(true, aForDocumentNavigation); return NS_OK; } NS_IMETHODIMP BrowserChild::FocusPrevElement(bool aForDocumentNavigation) { SendMoveFocus(false, aForDocumentNavigation); return NS_OK; } NS_IMETHODIMP BrowserChild::GetInterface(const nsIID& aIID, void** aSink) { // XXXbz should we restrict the set of interfaces we hand out here? Loading