Added form searching for form controls that are newly created and added to the tree.

This commit is contained in:
vidur%netscape.com 1999-07-28 05:26:55 +00:00
parent e557b2140e
commit d60aeaab2e
18 changed files with 396 additions and 16 deletions

View File

@ -94,7 +94,7 @@ CPPSRCS= \
CPP_OBJS= \
.\$(OBJDIR)\nsGenericHTMLElement.obj \
.\$(OBJDIR)\nsGenericDOMHTMLCollection.obj \
.\$(OBJDIR)\GenericElementCollection.obj \
.\$(OBJDIR)\GenericElementCollection.obj \
.\$(OBJDIR)\nsHTMLAnchorElement.obj \
.\$(OBJDIR)\nsHTMLAppletElement.obj \
.\$(OBJDIR)\nsHTMLAreaElement.obj \

View File

@ -73,6 +73,9 @@
#include "prprf.h"
#include "prmem.h"
#include "nsIFormControlFrame.h"
#include "nsIForm.h"
#include "nsIFormControl.h"
#include "nsIDOMHTMLFormElement.h"
// XXX todo: add in missing out-of-memory checks
NS_DEFINE_IID(kIDOMHTMLElementIID, NS_IDOMHTMLELEMENT_IID);
@ -90,6 +93,7 @@ static NS_DEFINE_IID(kIDOMDocumentIID, NS_IDOMNODE_IID);
static NS_DEFINE_IID(kIDOMDocumentFragmentIID, NS_IDOMDOCUMENTFRAGMENT_IID);
static NS_DEFINE_IID(kIHTMLContentContainerIID, NS_IHTMLCONTENTCONTAINER_IID);
static NS_DEFINE_IID(kIFormControlFrameIID, NS_IFORMCONTROLFRAME_IID);
static NS_DEFINE_IID(kIDOMHTMLFormElementIID, NS_IDOMHTMLFORMELEMENT_IID);
//----------------------------------------------------------------------
@ -424,6 +428,99 @@ nsGenericHTMLElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
return result;
}
static nsresult
FindFormParent(nsIContent* aParent,
nsIFormControl* aControl)
{
nsresult result = NS_OK;
nsIContent* parent = aParent;
nsIDOMHTMLFormElement* form;
// Will be released below
NS_IF_ADDREF(parent);
while (nsnull != parent) {
nsIAtom* tag;
PRInt32 nameSpaceID;
nsIContent* tmp;
parent->GetTag(tag);
parent->GetNameSpaceID(nameSpaceID);
// If the current ancestor is a form, set it as our form
if ((tag == nsHTMLAtoms::form) && (kNameSpaceID_HTML == nameSpaceID)) {
result = parent->QueryInterface(kIDOMHTMLFormElementIID,
(void**)&form);
if (NS_SUCCEEDED(result)) {
result = aControl->SetForm(form);
NS_RELEASE(form);
}
NS_IF_RELEASE(tag);
NS_RELEASE(parent);
break;
}
NS_IF_RELEASE(tag);
tmp = parent;
parent->GetParent(parent);
NS_RELEASE(tmp);
}
return result;
}
nsresult
nsGenericHTMLElement::SetParentForFormControls(nsIContent* aParent,
nsIFormControl* aControl,
nsIForm* aForm)
{
nsresult result = NS_OK;
if ((nsnull == aParent) && (nsnull != aForm)) {
result = aControl->SetForm(nsnull);
}
// If we have a new parent and either we had an old parent or we
// don't have a form, search for a containing form. If we didn't
// have an old parent, but we do have a form, we shouldn't do the
// search. In this case, someone (possibly the content sink) has
// already set the form for us.
else if ((nsnull != mDocument) && (nsnull != aParent) &&
((nsnull != mParent) || (nsnull == aForm))) {
result = FindFormParent(aParent, aControl);
}
if (NS_SUCCEEDED(result)) {
result = SetParent(aParent);
}
return result;
}
nsresult
nsGenericHTMLElement::SetDocumentForFormControls(nsIDocument* aDocument,
PRBool aDeep,
nsIFormControl* aControl,
nsIForm* aForm)
{
nsresult result = NS_OK;
if ((nsnull != aDocument) && (nsnull != mParent) && (nsnull == aForm)) {
// XXX Do this check since anonymous frame content was also being
// added to the form. To make sure that the form control isn't
// anonymous, we ask the parent if it knows about it.
PRInt32 index;
mParent->IndexOf(mContent, index);
if (-1 != index) {
result = FindFormParent(mParent, aControl);
}
}
if (NS_SUCCEEDED(result)) {
result = SetDocument(aDocument, aDeep);
}
return result;
}
nsresult
nsGenericHTMLElement::GetNameSpaceID(PRInt32& aID) const
{

View File

@ -48,6 +48,8 @@ class nsDOMCSSDeclaration;
class nsIDOMCSSStyleDeclaration;
class nsIURI;
class nsIFormControlFrame;
class nsIFormControl;
class nsIForm;
class nsGenericHTMLElement : public nsGenericElement {
public:
@ -102,6 +104,13 @@ public:
nsIAtom*& aName) const;
nsresult GetAttributeCount(PRInt32& aResult) const;
nsresult List(FILE* out, PRInt32 aIndent) const;
nsresult SetParentForFormControls(nsIContent* aParent,
nsIFormControl* aControl,
nsIForm* aForm);
nsresult SetDocumentForFormControls(nsIDocument* aDocument,
PRBool aDeep,
nsIFormControl* aControl,
nsIForm* aForm);
// Implementation for nsIHTMLContent
nsresult Compact();

View File

@ -87,7 +87,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -204,6 +204,20 @@ nsHTMLButtonElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLButtonElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLButtonElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLButtonElement::GetForm(nsIDOMHTMLFormElement** aForm)
{

View File

@ -68,7 +68,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -164,6 +164,20 @@ nsHTMLFieldSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLFieldSetElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLFieldSetElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLFieldSetElement::GetForm(nsIDOMHTMLFormElement** aForm)
{

View File

@ -116,7 +116,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -224,7 +224,7 @@ nsHTMLInputElement::Release()
}
}
// nsIDOMHTMLInputElement
// nsIDOMNode
nsresult
nsHTMLInputElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
@ -237,6 +237,20 @@ nsHTMLInputElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLInputElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLInputElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLInputElement::GetForm(nsIDOMHTMLFormElement** aForm)
{

View File

@ -73,7 +73,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -168,6 +168,20 @@ nsHTMLLabelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLLabelElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLLabelElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLLabelElement::GetForm(nsIDOMHTMLFormElement** aForm)
{

View File

@ -157,7 +157,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -286,6 +286,20 @@ nsHTMLSelectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLSelectElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLSelectElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLSelectElement::Add(nsIDOMHTMLElement* aElement, nsIDOMHTMLElement* aBefore)
{

View File

@ -95,7 +95,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -197,6 +197,20 @@ nsHTMLTextAreaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLTextAreaElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLTextAreaElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLTextAreaElement::GetForm(nsIDOMHTMLFormElement** aForm)
{

View File

@ -94,7 +94,7 @@ CPPSRCS= \
CPP_OBJS= \
.\$(OBJDIR)\nsGenericHTMLElement.obj \
.\$(OBJDIR)\nsGenericDOMHTMLCollection.obj \
.\$(OBJDIR)\GenericElementCollection.obj \
.\$(OBJDIR)\GenericElementCollection.obj \
.\$(OBJDIR)\nsHTMLAnchorElement.obj \
.\$(OBJDIR)\nsHTMLAppletElement.obj \
.\$(OBJDIR)\nsHTMLAreaElement.obj \

View File

@ -73,6 +73,9 @@
#include "prprf.h"
#include "prmem.h"
#include "nsIFormControlFrame.h"
#include "nsIForm.h"
#include "nsIFormControl.h"
#include "nsIDOMHTMLFormElement.h"
// XXX todo: add in missing out-of-memory checks
NS_DEFINE_IID(kIDOMHTMLElementIID, NS_IDOMHTMLELEMENT_IID);
@ -90,6 +93,7 @@ static NS_DEFINE_IID(kIDOMDocumentIID, NS_IDOMNODE_IID);
static NS_DEFINE_IID(kIDOMDocumentFragmentIID, NS_IDOMDOCUMENTFRAGMENT_IID);
static NS_DEFINE_IID(kIHTMLContentContainerIID, NS_IHTMLCONTENTCONTAINER_IID);
static NS_DEFINE_IID(kIFormControlFrameIID, NS_IFORMCONTROLFRAME_IID);
static NS_DEFINE_IID(kIDOMHTMLFormElementIID, NS_IDOMHTMLFORMELEMENT_IID);
//----------------------------------------------------------------------
@ -424,6 +428,99 @@ nsGenericHTMLElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
return result;
}
static nsresult
FindFormParent(nsIContent* aParent,
nsIFormControl* aControl)
{
nsresult result = NS_OK;
nsIContent* parent = aParent;
nsIDOMHTMLFormElement* form;
// Will be released below
NS_IF_ADDREF(parent);
while (nsnull != parent) {
nsIAtom* tag;
PRInt32 nameSpaceID;
nsIContent* tmp;
parent->GetTag(tag);
parent->GetNameSpaceID(nameSpaceID);
// If the current ancestor is a form, set it as our form
if ((tag == nsHTMLAtoms::form) && (kNameSpaceID_HTML == nameSpaceID)) {
result = parent->QueryInterface(kIDOMHTMLFormElementIID,
(void**)&form);
if (NS_SUCCEEDED(result)) {
result = aControl->SetForm(form);
NS_RELEASE(form);
}
NS_IF_RELEASE(tag);
NS_RELEASE(parent);
break;
}
NS_IF_RELEASE(tag);
tmp = parent;
parent->GetParent(parent);
NS_RELEASE(tmp);
}
return result;
}
nsresult
nsGenericHTMLElement::SetParentForFormControls(nsIContent* aParent,
nsIFormControl* aControl,
nsIForm* aForm)
{
nsresult result = NS_OK;
if ((nsnull == aParent) && (nsnull != aForm)) {
result = aControl->SetForm(nsnull);
}
// If we have a new parent and either we had an old parent or we
// don't have a form, search for a containing form. If we didn't
// have an old parent, but we do have a form, we shouldn't do the
// search. In this case, someone (possibly the content sink) has
// already set the form for us.
else if ((nsnull != mDocument) && (nsnull != aParent) &&
((nsnull != mParent) || (nsnull == aForm))) {
result = FindFormParent(aParent, aControl);
}
if (NS_SUCCEEDED(result)) {
result = SetParent(aParent);
}
return result;
}
nsresult
nsGenericHTMLElement::SetDocumentForFormControls(nsIDocument* aDocument,
PRBool aDeep,
nsIFormControl* aControl,
nsIForm* aForm)
{
nsresult result = NS_OK;
if ((nsnull != aDocument) && (nsnull != mParent) && (nsnull == aForm)) {
// XXX Do this check since anonymous frame content was also being
// added to the form. To make sure that the form control isn't
// anonymous, we ask the parent if it knows about it.
PRInt32 index;
mParent->IndexOf(mContent, index);
if (-1 != index) {
result = FindFormParent(mParent, aControl);
}
}
if (NS_SUCCEEDED(result)) {
result = SetDocument(aDocument, aDeep);
}
return result;
}
nsresult
nsGenericHTMLElement::GetNameSpaceID(PRInt32& aID) const
{

View File

@ -48,6 +48,8 @@ class nsDOMCSSDeclaration;
class nsIDOMCSSStyleDeclaration;
class nsIURI;
class nsIFormControlFrame;
class nsIFormControl;
class nsIForm;
class nsGenericHTMLElement : public nsGenericElement {
public:
@ -102,6 +104,13 @@ public:
nsIAtom*& aName) const;
nsresult GetAttributeCount(PRInt32& aResult) const;
nsresult List(FILE* out, PRInt32 aIndent) const;
nsresult SetParentForFormControls(nsIContent* aParent,
nsIFormControl* aControl,
nsIForm* aForm);
nsresult SetDocumentForFormControls(nsIDocument* aDocument,
PRBool aDeep,
nsIFormControl* aControl,
nsIForm* aForm);
// Implementation for nsIHTMLContent
nsresult Compact();

View File

@ -87,7 +87,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -204,6 +204,20 @@ nsHTMLButtonElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLButtonElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLButtonElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLButtonElement::GetForm(nsIDOMHTMLFormElement** aForm)
{

View File

@ -68,7 +68,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -164,6 +164,20 @@ nsHTMLFieldSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLFieldSetElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLFieldSetElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLFieldSetElement::GetForm(nsIDOMHTMLFormElement** aForm)
{

View File

@ -116,7 +116,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -224,7 +224,7 @@ nsHTMLInputElement::Release()
}
}
// nsIDOMHTMLInputElement
// nsIDOMNode
nsresult
nsHTMLInputElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
@ -237,6 +237,20 @@ nsHTMLInputElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLInputElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLInputElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLInputElement::GetForm(nsIDOMHTMLFormElement** aForm)
{

View File

@ -73,7 +73,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -168,6 +168,20 @@ nsHTMLLabelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLLabelElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLLabelElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLLabelElement::GetForm(nsIDOMHTMLFormElement** aForm)
{

View File

@ -157,7 +157,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -286,6 +286,20 @@ nsHTMLSelectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLSelectElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLSelectElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLSelectElement::Add(nsIDOMHTMLElement* aElement, nsIDOMHTMLElement* aBefore)
{

View File

@ -95,7 +95,7 @@ public:
NS_IMPL_IDOMEVENTRECEIVER_USING_GENERIC(mInner)
// nsIContent
NS_IMPL_ICONTENT_USING_GENERIC(mInner)
NS_IMPL_ICONTENT_NO_SETPARENT_NO_SETDOCUMENT_USING_GENERIC(mInner)
// nsIHTMLContent
NS_IMPL_IHTMLCONTENT_USING_GENERIC(mInner)
@ -197,6 +197,20 @@ nsHTMLTextAreaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
}
// nsIContent
NS_IMETHODIMP
nsHTMLTextAreaElement::SetParent(nsIContent* aParent)
{
return mInner.SetParentForFormControls(aParent, this, mForm);
}
NS_IMETHODIMP
nsHTMLTextAreaElement::SetDocument(nsIDocument* aDocument, PRBool aDeep)
{
return mInner.SetDocumentForFormControls(aDocument, aDeep, this, mForm);
}
NS_IMETHODIMP
nsHTMLTextAreaElement::GetForm(nsIDOMHTMLFormElement** aForm)
{