Bug 842986 - Implement MozFrameLoaderOwner on HTMLFrameElement. r=bz

This commit is contained in:
Andrea Marchesini 2013-02-26 12:02:32 -05:00
parent 854640ae1e
commit 342ae1355d
4 changed files with 18 additions and 0 deletions

View File

@ -19,6 +19,8 @@ class HTMLFrameElement : public nsGenericHTMLFrameElement,
public nsIDOMHTMLFrameElement
{
public:
using nsGenericHTMLFrameElement::SwapFrameLoaders;
HTMLFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
FromParser aFromParser = NOT_FROM_PARSER);
virtual ~HTMLFrameElement();

View File

@ -9,6 +9,7 @@
#include "nsIInterfaceRequestorUtils.h"
#include "nsContentUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/ErrorResult.h"
#include "nsIAppsService.h"
#include "nsServiceManagerUtils.h"
#include "nsIDOMApplicationRegistry.h"
@ -394,3 +395,11 @@ nsGenericHTMLFrameElement::AllowCreateFrameLoader()
mFrameLoaderCreationDisallowed = false;
return NS_OK;
}
void
nsGenericHTMLFrameElement::SwapFrameLoaders(nsXULElement& aOtherOwner,
ErrorResult& aError)
{
aError.Throw(NS_ERROR_NOT_IMPLEMENTED);
}

View File

@ -9,9 +9,12 @@
#include "nsIFrameLoader.h"
#include "nsIMozBrowserFrame.h"
#include "nsIDOMEventListener.h"
#include "mozilla/ErrorResult.h"
#include "nsFrameLoader.h"
class nsXULElement;
/**
* A helper class for frame elements
*/
@ -60,6 +63,8 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED_NO_UNLINK(nsGenericHTMLFrameElement,
nsGenericHTMLElement)
void SwapFrameLoaders(nsXULElement& aOtherOwner, mozilla::ErrorResult& aError);
protected:
/**
* Listens to titlechanged events from the document inside the iframe and

View File

@ -32,3 +32,5 @@ interface HTMLFrameElement : HTMLElement {
[TreatNullAs=EmptyString, SetterThrows] attribute DOMString marginHeight;
[TreatNullAs=EmptyString, SetterThrows] attribute DOMString marginWidth;
};
HTMLFrameElement implements MozFrameLoaderOwner;