зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1525720, part 3 - Remove method to createRemoteFrameLoader from nsIMozBrowserFrame interface. r=farre
This appears unused and adds unneeded surface area for these API's to support. Differential Revision: https://phabricator.services.mozilla.com/D31431 --HG-- extra : rebase_source : 7886ce8abf398d13432fa9e2ef61cedac41f52b4 extra : histedit_source : dc5404d058bac24d47459bd89d261a506a2a891b
This commit is contained in:
Родитель
e084a16216
Коммит
5592e0d298
|
@ -3043,10 +3043,10 @@ already_AddRefed<Element> nsFrameLoader::GetOwnerElement() {
|
|||
return do_AddRef(mOwnerContent);
|
||||
}
|
||||
|
||||
void nsFrameLoader::SetRemoteBrowser(nsIRemoteTab* aBrowserParent) {
|
||||
void nsFrameLoader::InitializeFromBrowserParent(BrowserParent* aBrowserParent) {
|
||||
MOZ_ASSERT(!mBrowserParent);
|
||||
mIsRemoteFrame = true;
|
||||
mBrowserParent = BrowserParent::GetFrom(aBrowserParent);
|
||||
mBrowserParent = aBrowserParent;
|
||||
mChildID = mBrowserParent ? mBrowserParent->Manager()->ChildID() : 0;
|
||||
MaybeUpdatePrimaryBrowserParent(eBrowserParentChanged);
|
||||
ReallyLoadFrameScripts();
|
||||
|
|
|
@ -342,7 +342,7 @@ class nsFrameLoader final : public nsStubMutationObserver,
|
|||
* this object, which means you can't have called ShowRemoteFrame()
|
||||
* or ReallyStartLoading().
|
||||
*/
|
||||
void SetRemoteBrowser(nsIRemoteTab* aBrowserParent);
|
||||
void InitializeFromBrowserParent(BrowserParent* aBrowserParent);
|
||||
|
||||
/**
|
||||
* Stashes a detached nsIFrame on the frame loader. We do this when we're
|
||||
|
|
|
@ -132,12 +132,26 @@ void nsGenericHTMLFrameElement::EnsureFrameLoader() {
|
|||
mFrameLoader = nsFrameLoader::Create(this, mOpenerWindow, mNetworkCreated);
|
||||
}
|
||||
|
||||
nsresult nsGenericHTMLFrameElement::CreateRemoteFrameLoader(
|
||||
nsIRemoteTab* aBrowserParent) {
|
||||
void nsGenericHTMLFrameElement::DisallowCreateFrameLoader() {
|
||||
MOZ_ASSERT(!mFrameLoader);
|
||||
MOZ_ASSERT(!mFrameLoaderCreationDisallowed);
|
||||
mFrameLoaderCreationDisallowed = true;
|
||||
}
|
||||
|
||||
void nsGenericHTMLFrameElement::AllowCreateFrameLoader() {
|
||||
MOZ_ASSERT(!mFrameLoader);
|
||||
MOZ_ASSERT(mFrameLoaderCreationDisallowed);
|
||||
mFrameLoaderCreationDisallowed = false;
|
||||
}
|
||||
|
||||
void nsGenericHTMLFrameElement::CreateRemoteFrameLoader(
|
||||
BrowserParent* aBrowserParent) {
|
||||
MOZ_ASSERT(!mFrameLoader);
|
||||
EnsureFrameLoader();
|
||||
NS_ENSURE_STATE(mFrameLoader);
|
||||
mFrameLoader->SetRemoteBrowser(aBrowserParent);
|
||||
if (NS_WARN_IF(!mFrameLoader)) {
|
||||
return;
|
||||
}
|
||||
mFrameLoader->InitializeFromBrowserParent(aBrowserParent);
|
||||
|
||||
if (nsSubDocumentFrame* subdocFrame = do_QueryFrame(GetPrimaryFrame())) {
|
||||
// The reflow for this element already happened while we were waiting
|
||||
|
@ -146,7 +160,6 @@ nsresult nsGenericHTMLFrameElement::CreateRemoteFrameLoader(
|
|||
// ReflowFinished, and we need to do it properly now.
|
||||
mFrameLoader->UpdatePositionAndSize(subdocFrame);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsGenericHTMLFrameElement::PresetOpenerWindow(
|
||||
|
@ -442,22 +455,6 @@ NS_IMETHODIMP nsGenericHTMLFrameElement::GetIsolated(bool* aOut) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGenericHTMLFrameElement::DisallowCreateFrameLoader() {
|
||||
MOZ_ASSERT(!mFrameLoader);
|
||||
MOZ_ASSERT(!mFrameLoaderCreationDisallowed);
|
||||
mFrameLoaderCreationDisallowed = true;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGenericHTMLFrameElement::AllowCreateFrameLoader() {
|
||||
MOZ_ASSERT(!mFrameLoader);
|
||||
MOZ_ASSERT(mFrameLoaderCreationDisallowed);
|
||||
mFrameLoaderCreationDisallowed = false;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsGenericHTMLFrameElement::InitializeBrowserAPI() {
|
||||
MOZ_ASSERT(mFrameLoader);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class BrowserParent;
|
||||
template <typename>
|
||||
struct Nullable;
|
||||
class WindowProxyHolder;
|
||||
|
@ -90,6 +91,31 @@ class nsGenericHTMLFrameElement : public nsGenericHTMLElement,
|
|||
mozilla::dom::WindowProxyHolder>& aOpenerWindow,
|
||||
mozilla::ErrorResult& aRv);
|
||||
|
||||
/**
|
||||
* Normally, a frame tries to create its frame loader when its src is
|
||||
* modified, or its contentWindow is accessed.
|
||||
*
|
||||
* disallowCreateFrameLoader prevents the frame element from creating its
|
||||
* frame loader (in the same way that not being inside a document prevents the
|
||||
* creation of a frame loader). allowCreateFrameLoader lifts this
|
||||
* restriction.
|
||||
*
|
||||
* These methods are not re-entrant -- it is an error to call
|
||||
* disallowCreateFrameLoader twice without first calling allowFrameLoader.
|
||||
*
|
||||
* It's also an error to call either method if we already have a frame loader.
|
||||
*/
|
||||
void DisallowCreateFrameLoader();
|
||||
void AllowCreateFrameLoader();
|
||||
|
||||
/**
|
||||
* Create a remote (i.e., out-of-process) frame loader attached to the given
|
||||
* remote tab.
|
||||
*
|
||||
* It is an error to call this method if we already have a frame loader.
|
||||
*/
|
||||
void CreateRemoteFrameLoader(mozilla::dom::BrowserParent* aBrowserParent);
|
||||
|
||||
static void InitStatics();
|
||||
static bool BrowserFramesEnabled();
|
||||
|
||||
|
|
|
@ -35,30 +35,6 @@ interface nsIMozBrowserFrame : nsIDOMMozBrowserFrame
|
|||
*/
|
||||
[infallible] readonly attribute boolean isolated;
|
||||
|
||||
/**
|
||||
* Normally, a frame tries to create its frame loader when its src is
|
||||
* modified, or its contentWindow is accessed.
|
||||
*
|
||||
* disallowCreateFrameLoader prevents the frame element from creating its
|
||||
* frame loader (in the same way that not being inside a document prevents the
|
||||
* creation of a frame loader). allowCreateFrameLoader lifts this restriction.
|
||||
*
|
||||
* These methods are not re-entrant -- it is an error to call
|
||||
* disallowCreateFrameLoader twice without first calling allowFrameLoader.
|
||||
*
|
||||
* It's also an error to call either method if we already have a frame loader.
|
||||
*/
|
||||
void disallowCreateFrameLoader();
|
||||
void allowCreateFrameLoader();
|
||||
|
||||
/**
|
||||
* Create a remote (i.e., out-of-process) frame loader attached to the given
|
||||
* remote tab.
|
||||
*
|
||||
* It is an error to call this method if we already have a frame loader.
|
||||
*/
|
||||
void createRemoteFrameLoader(in nsIRemoteTab aRemoteTab);
|
||||
|
||||
/**
|
||||
* Initialize the API, and add frame message listener that supports API
|
||||
* invocations.
|
||||
|
|
Загрузка…
Ссылка в новой задаче