Bug 1631548 - part 1: Remove unused methods from nsGenericHTMLFrameElement. r=emilio

This removes:

- `nsGenericHTMLFrameElement::CreateRemoteFrameLoader()`
- `nsGenericHTMLFrameElement::AllowCreateFrameLoader()`
- `nsGenericHTMLFrameElement::DisallowCreateFrameLoader()`

These were moved from nsIMozBrowserFrame interface in bug 1525720.

Differential Revision: https://phabricator.services.mozilla.com/D71629
This commit is contained in:
Tetsuharu Ohzeki
2020-04-20 19:02:12 +00:00
parent bc0239abfb
commit c20e177924
2 changed files with 0 additions and 55 deletions

View File

@@ -131,36 +131,6 @@ void nsGenericHTMLFrameElement::EnsureFrameLoader() {
mFrameLoader = nsFrameLoader::Create(this, mNetworkCreated);
}
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();
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
// for the iframe creation. Therefore the subdoc frame didn't have a
// frameloader when UpdatePositionAndSize was supposed to be called in
// ReflowFinished, and we need to do it properly now.
mFrameLoader->UpdatePositionAndSize(subdocFrame);
}
}
void nsGenericHTMLFrameElement::SwapFrameLoaders(
HTMLIFrameElement& aOtherLoaderOwner, ErrorResult& rv) {
if (&aOtherLoaderOwner == this) {

View File

@@ -84,31 +84,6 @@ class nsGenericHTMLFrameElement : public nsGenericHTMLElement,
void SwapFrameLoaders(nsFrameLoaderOwner* aOtherLoaderOwner,
mozilla::ErrorResult& rv);
/**
* 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);
/**
* Helper method to map a HTML 'scrolling' attribute value (which can be null)
* to a ScrollbarPreference value value. scrolling="no" (and its synonyms)