diff --git a/content/html/content/src/Makefile.in b/content/html/content/src/Makefile.in index 8807ae727e62..7a095905d2da 100644 --- a/content/html/content/src/Makefile.in +++ b/content/html/content/src/Makefile.in @@ -18,6 +18,7 @@ FAIL_ON_WARNINGS = 1 EXPORTS = \ nsGenericHTMLElement.h \ + nsHTMLIFrameElement.h \ nsClientRect.h \ nsHTMLDNSPrefetch.h \ nsTimeRanges.h \ diff --git a/content/html/content/src/nsHTMLIFrameElement.cpp b/content/html/content/src/nsHTMLIFrameElement.cpp index 69bb73fa09a0..4756f2db327c 100644 --- a/content/html/content/src/nsHTMLIFrameElement.cpp +++ b/content/html/content/src/nsHTMLIFrameElement.cpp @@ -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 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 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) diff --git a/content/html/content/src/nsHTMLIFrameElement.h b/content/html/content/src/nsHTMLIFrameElement.h new file mode 100644 index 000000000000..a1ff7fd80715 --- /dev/null +++ b/content/html/content/src/nsHTMLIFrameElement.h @@ -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 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); +};