Bug 742944 - Part 3: Move nsHTMLIFrameElement to a header file. r=bz

--HG--
extra : rebase_source : 9138a7a4ba9d5ca13ba7c98b59d24dc283d47bee
This commit is contained in:
Justin Lebar 2012-06-12 18:01:25 -04:00
parent 75eaafe074
commit 9ff0e10da2
3 changed files with 54 additions and 52 deletions

View File

@ -18,6 +18,7 @@ FAIL_ON_WARNINGS = 1
EXPORTS = \
nsGenericHTMLElement.h \
nsHTMLIFrameElement.h \
nsClientRect.h \
nsHTMLDNSPrefetch.h \
nsTimeRanges.h \

View File

@ -5,10 +5,8 @@
#include "mozilla/Util.h"
#include "nsIDOMHTMLIFrameElement.h"
#include "nsGenericHTMLFrameElement.h"
#include "nsHTMLIFrameElement.h"
#include "nsIDOMDocument.h"
#include "nsIDOMGetSVGDocument.h"
#include "nsIDOMSVGDocument.h"
#include "nsGkAtoms.h"
#include "nsIDocument.h"
@ -20,54 +18,8 @@
using namespace mozilla;
using namespace mozilla::dom;
class nsHTMLIFrameElement : public nsGenericHTMLFrameElement
, public nsIDOMHTMLIFrameElement
, public nsIDOMGetSVGDocument
{
public:
nsHTMLIFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
virtual ~nsHTMLIFrameElement();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE(nsGenericHTMLFrameElement::)
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLFrameElement::)
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLFrameElement::)
// nsIDOMHTMLIFrameElement
NS_DECL_NSIDOMHTMLIFRAMEELEMENT
// nsIDOMGetSVGDocument
NS_DECL_NSIDOMGETSVGDOCUMENT
// nsIContent
virtual bool ParseAttribute(PRInt32 aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
nsAttrValue& aResult);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
virtual nsIDOMNode* AsDOMNode() { return this; }
protected:
virtual void GetItemValueText(nsAString& text);
virtual void SetItemValueText(const nsAString& text);
};
NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(IFrame)
nsHTMLIFrameElement::nsHTMLIFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
FromParser aFromParser)
: nsGenericHTMLFrameElement(aNodeInfo, aFromParser)
@ -78,7 +30,6 @@ nsHTMLIFrameElement::~nsHTMLIFrameElement()
{
}
NS_IMPL_ADDREF_INHERITED(nsHTMLIFrameElement,nsGenericElement)
NS_IMPL_RELEASE_INHERITED(nsHTMLIFrameElement,nsGenericElement)
@ -94,10 +45,8 @@ NS_INTERFACE_TABLE_HEAD(nsHTMLIFrameElement)
nsGenericHTMLFrameElement)
NS_HTML_CONTENT_INTERFACE_TABLE_TAIL_CLASSINFO(HTMLIFrameElement)
NS_IMPL_ELEMENT_CLONE(nsHTMLIFrameElement)
NS_IMPL_STRING_ATTR(nsHTMLIFrameElement, Align, align)
NS_IMPL_STRING_ATTR(nsHTMLIFrameElement, FrameBorder, frameborder)
NS_IMPL_STRING_ATTR(nsHTMLIFrameElement, Height, height)

View File

@ -0,0 +1,52 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsGenericHTMLFrameElement.h"
#include "nsIDOMHTMLIFrameElement.h"
#include "nsIDOMGetSVGDocument.h"
class nsHTMLIFrameElement : public nsGenericHTMLFrameElement
, public nsIDOMHTMLIFrameElement
, public nsIDOMGetSVGDocument
{
public:
nsHTMLIFrameElement(already_AddRefed<nsINodeInfo> aNodeInfo,
mozilla::dom::FromParser aFromParser = mozilla::dom::NOT_FROM_PARSER);
virtual ~nsHTMLIFrameElement();
// nsISupports
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMNode
NS_FORWARD_NSIDOMNODE(nsGenericHTMLFrameElement::)
// nsIDOMElement
NS_FORWARD_NSIDOMELEMENT(nsGenericHTMLFrameElement::)
// nsIDOMHTMLElement
NS_FORWARD_NSIDOMHTMLELEMENT(nsGenericHTMLFrameElement::)
// nsIDOMHTMLIFrameElement
NS_DECL_NSIDOMHTMLIFRAMEELEMENT
// nsIDOMGetSVGDocument
NS_DECL_NSIDOMGETSVGDOCUMENT
// nsIContent
virtual bool ParseAttribute(PRInt32 aNamespaceID,
nsIAtom* aAttribute,
const nsAString& aValue,
nsAttrValue& aResult);
NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const;
virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const;
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
virtual nsXPCClassInfo* GetClassInfo();
virtual nsIDOMNode* AsDOMNode() { return this; }
protected:
virtual void GetItemValueText(nsAString& text);
virtual void SetItemValueText(const nsAString& text);
};