From 0dc9302aa8d1ce61a20b05dd71ac344aad9900f4 Mon Sep 17 00:00:00 2001 From: kipp Date: Wed, 3 Jun 1998 15:56:15 +0000 Subject: [PATCH] Implement stubs for revised insert/delete/remove/append api's git-svn-id: svn://10.0.0.236/trunk@3052 18797224-902f-48f8-a5cc-f745e15eee43 --- .../layout/html/base/src/nsHTMLContent.cpp | 26 ++++++++++++------- mozilla/layout/html/base/src/nsHTMLContent.h | 11 ++++---- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/mozilla/layout/html/base/src/nsHTMLContent.cpp b/mozilla/layout/html/base/src/nsHTMLContent.cpp index c779f294378..c1588d9f14d 100644 --- a/mozilla/layout/html/base/src/nsHTMLContent.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContent.cpp @@ -197,10 +197,12 @@ void nsHTMLContent::Compact() { } -nsIDocument* nsHTMLContent::GetDocument() const +nsresult +nsHTMLContent::GetDocument(nsIDocument*& aResult) const { + aResult = mDocument; NS_IF_ADDREF(mDocument); - return mDocument; + return NS_OK; } void nsHTMLContent::SetDocument(nsIDocument* aDocument) @@ -239,24 +241,28 @@ PRInt32 nsHTMLContent::IndexOf(nsIContent* aPossibleChild) const return -1; } -PRBool nsHTMLContent::InsertChildAt(nsIContent* aKid, PRInt32 aIndex) +NS_IMETHODIMP +nsHTMLContent::InsertChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify) { - return PR_FALSE; + return NS_OK; } -PRBool nsHTMLContent::ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex) +NS_IMETHODIMP +nsHTMLContent::ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify) { - return PR_FALSE; + return NS_OK; } -PRBool nsHTMLContent::AppendChild(nsIContent* aKid) +NS_IMETHODIMP +nsHTMLContent::AppendChild(nsIContent* aKid, PRBool aNotify) { - return PR_FALSE; + return NS_OK; } -PRBool nsHTMLContent::RemoveChildAt(PRInt32 aIndex) +NS_IMETHODIMP +nsHTMLContent::RemoveChildAt(PRInt32 aIndex, PRBool aNotify) { - return PR_FALSE; + return NS_OK; } void nsHTMLContent::SetAttribute(const nsString& aName, const nsString& aValue) diff --git a/mozilla/layout/html/base/src/nsHTMLContent.h b/mozilla/layout/html/base/src/nsHTMLContent.h index d199917d9f9..7e34afe71ac 100644 --- a/mozilla/layout/html/base/src/nsHTMLContent.h +++ b/mozilla/layout/html/base/src/nsHTMLContent.h @@ -53,7 +53,7 @@ public: NS_IMETHOD_(nsrefcnt) AddRef(); NS_IMETHOD_(nsrefcnt) Release(); - virtual nsIDocument* GetDocument() const; + NS_IMETHOD GetDocument(nsIDocument*& aResult) const; virtual void SetDocument(nsIDocument* aDocument); virtual nsIContent* GetParent() const; @@ -63,10 +63,11 @@ public: virtual PRInt32 ChildCount() const; virtual nsIContent* ChildAt(PRInt32 aIndex) const; virtual PRInt32 IndexOf(nsIContent* aPossibleChild) const; - virtual PRBool InsertChildAt(nsIContent* aKid, PRInt32 aIndex); - virtual PRBool ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex); - virtual PRBool AppendChild(nsIContent* aKid); - virtual PRBool RemoveChildAt(PRInt32 aIndex); + + NS_IMETHOD InsertChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify); + NS_IMETHOD ReplaceChildAt(nsIContent* aKid, PRInt32 aIndex, PRBool aNotify); + NS_IMETHOD AppendChild(nsIContent* aKid, PRBool aNotify); + NS_IMETHOD RemoveChildAt(PRInt32 aIndex, PRBool aNotify); NS_IMETHOD IsSynthetic(PRBool& aResult);