diff --git a/mozilla/content/base/public/nsIContent.h b/mozilla/content/base/public/nsIContent.h index 9f3167132ef..e2114beb864 100644 --- a/mozilla/content/base/public/nsIContent.h +++ b/mozilla/content/base/public/nsIContent.h @@ -224,11 +224,9 @@ public: * after it is inserted) * @param aNotify whether to notify the document that the insert has * occurred - * @param aDeepSetDocument whether to set document on all children of aKid - * XXXbz aDeepSetDocument is now unused */ virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) = 0; + PRBool aNotify) = 0; /** * Append a content node to the end of the child list. @@ -236,11 +234,8 @@ public: * @param aKid the content to append * @param aNotify whether to notify the document that the replace has * occurred - * @param aDeepSetDocument whether to set document on all children of aKid - * XXXbz aDeepSetDocument is now unused */ - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) = 0; + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify) = 0; /** * Remove a child from this content node. diff --git a/mozilla/content/base/src/nsGenericDOMDataNode.cpp b/mozilla/content/base/src/nsGenericDOMDataNode.cpp index 5da10b817e9..fb5fc7c7622 100644 --- a/mozilla/content/base/src/nsGenericDOMDataNode.cpp +++ b/mozilla/content/base/src/nsGenericDOMDataNode.cpp @@ -850,14 +850,13 @@ nsGenericDOMDataNode::IndexOf(nsIContent* aPossibleChild) const nsresult nsGenericDOMDataNode::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { return NS_OK; } nsresult -nsGenericDOMDataNode::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsGenericDOMDataNode::AppendChildTo(nsIContent* aKid, PRBool aNotify) { return NS_OK; } @@ -1044,7 +1043,7 @@ nsGenericDOMDataNode::SplitText(PRUint32 aOffset, nsIDOMText** aReturn) nsCOMPtr content(do_QueryInterface(newContent)); - parent->InsertChildAt(content, index+1, PR_TRUE, PR_FALSE); + parent->InsertChildAt(content, index+1, PR_TRUE); } // XXX Shouldn't we handle the case where this is a child of the document? diff --git a/mozilla/content/base/src/nsGenericDOMDataNode.h b/mozilla/content/base/src/nsGenericDOMDataNode.h index 16b41cc5ac9..4c9f8e7065e 100644 --- a/mozilla/content/base/src/nsGenericDOMDataNode.h +++ b/mozilla/content/base/src/nsGenericDOMDataNode.h @@ -238,9 +238,8 @@ public: virtual nsIContent *GetChildAt(PRUint32 aIndex) const; virtual PRInt32 IndexOf(nsIContent* aPossibleChild) const; virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); virtual PRBool MayHaveFrame() const; diff --git a/mozilla/content/base/src/nsGenericElement.cpp b/mozilla/content/base/src/nsGenericElement.cpp index b7b71e23208..7812ac14b1b 100644 --- a/mozilla/content/base/src/nsGenericElement.cpp +++ b/mozilla/content/base/src/nsGenericElement.cpp @@ -295,7 +295,7 @@ nsNode3Tearoff::SetTextContent(nsIContent* aContent, textContent->SetText(aTextContent, PR_TRUE); - aContent->AppendChildTo(textContent, PR_TRUE, PR_FALSE); + aContent->AppendChildTo(textContent, PR_TRUE); return NS_OK; } @@ -2639,8 +2639,7 @@ nsGenericElement::MayHaveFrame() const nsresult nsGenericElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, - PRBool aDeepSetDocument) + PRBool aNotify) { NS_PRECONDITION(aKid, "null ptr"); @@ -2693,8 +2692,7 @@ nsGenericElement::InsertChildAt(nsIContent* aKid, } nsresult -nsGenericElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsGenericElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { NS_PRECONDITION(aKid && this != aKid, "null ptr"); nsIDocument *document = GetCurrentDoc(); @@ -2932,7 +2930,7 @@ nsGenericElement::InsertBefore(nsIDOMNode *aNewChild, nsIDOMNode *aRefChild, childContent = newContent->GetChildAt(i); // Insert the child and increment the insertion position - res = InsertChildAt(childContent, refPos++, do_notify, PR_TRUE); + res = InsertChildAt(childContent, refPos++, do_notify); if (NS_FAILED(res)) { break; @@ -3012,7 +3010,7 @@ nsGenericElement::InsertBefore(nsIDOMNode *aNewChild, nsIDOMNode *aRefChild, old_doc); } - res = InsertChildAt(newContent, refPos, PR_TRUE, PR_TRUE); + res = InsertChildAt(newContent, refPos, PR_TRUE); if (NS_FAILED(res)) { return res; @@ -3128,7 +3126,7 @@ nsGenericElement::ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, NS_ENSURE_SUCCESS(res, res); // Insert the child and increment the insertion position - res = InsertChildAt(childContent, oldPos++, PR_TRUE, PR_TRUE); + res = InsertChildAt(childContent, oldPos++, PR_TRUE); NS_ENSURE_SUCCESS(res, res); } } @@ -3184,7 +3182,7 @@ nsGenericElement::ReplaceChild(nsIDOMNode* aNewChild, nsIDOMNode* aOldChild, NS_ENSURE_SUCCESS(res, res); } - res = InsertChildAt(newContent, oldPos, PR_TRUE, PR_TRUE); + res = InsertChildAt(newContent, oldPos, PR_TRUE); NS_ENSURE_SUCCESS(res, res); } @@ -3390,7 +3388,7 @@ nsGenericElement::CopyInnerTo(nsGenericElement* aDst, PRBool aDeep) NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr newContent = do_QueryInterface(newNode); - rv = aDst->AppendChildTo(newContent, PR_FALSE, PR_FALSE); + rv = aDst->AppendChildTo(newContent, PR_FALSE); NS_ENSURE_SUCCESS(rv, rv); } diff --git a/mozilla/content/base/src/nsGenericElement.h b/mozilla/content/base/src/nsGenericElement.h index 5c6536f61b1..6078050a1be 100644 --- a/mozilla/content/base/src/nsGenericElement.h +++ b/mozilla/content/base/src/nsGenericElement.h @@ -394,9 +394,8 @@ public: virtual nsIContent *GetChildAt(PRUint32 aIndex) const; virtual PRInt32 IndexOf(nsIContent* aPossibleChild) const; virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); virtual nsIAtom *GetIDAttributeName() const; virtual nsIAtom *GetClassAttributeName() const; diff --git a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp index 9c5e0c4bdd2..3aeabe4cb56 100644 --- a/mozilla/content/html/content/src/nsGenericHTMLElement.cpp +++ b/mozilla/content/html/content/src/nsGenericHTMLElement.cpp @@ -337,7 +337,7 @@ nsGenericHTMLElement::CopyInnerTo(nsGenericElement* aDst, PRBool aDeep) nsCOMPtr newContent(do_QueryInterface(newNode)); NS_ASSERTION(newContent, "clone doesn't implement nsIContent"); - rv = aDst->AppendChildTo(newContent, PR_FALSE, PR_FALSE); + rv = aDst->AppendChildTo(newContent, PR_FALSE); NS_ENSURE_SUCCESS(rv, rv); } } @@ -3014,7 +3014,7 @@ nsGenericHTMLElement::ReplaceContentsWithText(const nsAString& aText, text->SetText(aText, PR_TRUE); - rv = InsertChildAt(text, 0, aNotify, PR_FALSE); + rv = InsertChildAt(text, 0, aNotify); } return rv; diff --git a/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp b/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp index b6981c9e49b..3afa5e7242e 100644 --- a/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOptGroupElement.cpp @@ -74,9 +74,8 @@ public: // nsIContent virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); virtual nsresult HandleDOMEvent(nsPresContext* aPresContext, @@ -167,8 +166,7 @@ nsHTMLOptGroupElement::GetSelect(nsISelectElement **aSelectElement) // nsIContent nsresult -nsHTMLOptGroupElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsHTMLOptGroupElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { // Since we're appending, the relevant option index to add after is found // *after* this optgroup. @@ -179,12 +177,12 @@ nsHTMLOptGroupElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, } // Actually perform the append - return nsGenericHTMLElement::AppendChildTo(aKid, aNotify, aDeepSetDocument); + return nsGenericHTMLElement::AppendChildTo(aKid, aNotify); } nsresult nsHTMLOptGroupElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { nsCOMPtr sel; GetSelect(getter_AddRefs(sel)); @@ -192,8 +190,7 @@ nsHTMLOptGroupElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, sel->WillAddOptions(aKid, this, aIndex); } - return nsGenericHTMLElement::InsertChildAt(aKid, aIndex, aNotify, - aDeepSetDocument); + return nsGenericHTMLElement::InsertChildAt(aKid, aIndex, aNotify); } nsresult diff --git a/mozilla/content/html/content/src/nsHTMLOptionElement.cpp b/mozilla/content/html/content/src/nsHTMLOptionElement.cpp index e809745b397..71cb42e7fa4 100644 --- a/mozilla/content/html/content/src/nsHTMLOptionElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLOptionElement.cpp @@ -119,9 +119,8 @@ public: nsIAtom* aPrefix, const nsAString& aValue, PRBool aNotify); virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); protected: @@ -424,7 +423,7 @@ nsHTMLOptionElement::SetText(const nsAString& aText) text->SetText(aText, PR_TRUE); - rv = AppendChildTo(text, PR_TRUE, PR_FALSE); + rv = AppendChildTo(text, PR_TRUE); } return rv; @@ -471,19 +470,17 @@ nsHTMLOptionElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, // nsresult nsHTMLOptionElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { - nsresult rv = nsGenericHTMLElement::InsertChildAt(aKid, aIndex, aNotify, - aDeepSetDocument); + nsresult rv = nsGenericHTMLElement::InsertChildAt(aKid, aIndex, aNotify); NotifyTextChanged(); return rv; } nsresult -nsHTMLOptionElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, PRBool aDeepSetDocument) +nsHTMLOptionElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { - nsresult rv = nsGenericHTMLElement::AppendChildTo(aKid, aNotify, - aDeepSetDocument); + nsresult rv = nsGenericHTMLElement::AppendChildTo(aKid, aNotify); NotifyTextChanged(); return rv; } @@ -564,7 +561,7 @@ nsHTMLOptionElement::Initialize(JSContext* aContext, JS_GetStringLength(jsstr), PR_FALSE); - result = AppendChildTo(textContent, PR_FALSE, PR_FALSE); + result = AppendChildTo(textContent, PR_FALSE); if (NS_FAILED(result)) { return result; } diff --git a/mozilla/content/html/content/src/nsHTMLScriptElement.cpp b/mozilla/content/html/content/src/nsHTMLScriptElement.cpp index fe8d1557980..d92a81c534a 100644 --- a/mozilla/content/html/content/src/nsHTMLScriptElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLScriptElement.cpp @@ -351,9 +351,8 @@ public: nsIContent* aBindingParent, PRBool aCompileEventHandlers); virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult GetInnerHTML(nsAString& aInnerHTML); virtual nsresult SetInnerHTML(const nsAString& aInnerHTML); @@ -458,10 +457,9 @@ nsHTMLScriptElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent, nsresult nsHTMLScriptElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { - nsresult rv = nsGenericHTMLElement::InsertChildAt(aKid, aIndex, aNotify, - aDeepSetDocument); + nsresult rv = nsGenericHTMLElement::InsertChildAt(aKid, aIndex, aNotify); if (NS_SUCCEEDED(rv) && aNotify) { MaybeProcessScript(); } @@ -470,11 +468,9 @@ nsHTMLScriptElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, } nsresult -nsHTMLScriptElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsHTMLScriptElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { - nsresult rv = nsGenericHTMLElement::AppendChildTo(aKid, aNotify, - aDeepSetDocument); + nsresult rv = nsGenericHTMLElement::AppendChildTo(aKid, aNotify); if (NS_SUCCEEDED(rv) && aNotify) { MaybeProcessScript(); } diff --git a/mozilla/content/html/content/src/nsHTMLSelectElement.cpp b/mozilla/content/html/content/src/nsHTMLSelectElement.cpp index 096bc7f1967..10aa0b5def8 100644 --- a/mozilla/content/html/content/src/nsHTMLSelectElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLSelectElement.cpp @@ -218,9 +218,8 @@ public: // nsIContent virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); virtual nsresult HandleDOMEvent(nsPresContext* aPresContext, @@ -483,24 +482,21 @@ nsHTMLSelectElement::GetForm(nsIDOMHTMLFormElement** aForm) // nsIContent nsresult -nsHTMLSelectElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsHTMLSelectElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { WillAddOptions(aKid, this, GetChildCount()); // Actually perform the append - return nsGenericHTMLFormElement::AppendChildTo(aKid, aNotify, - aDeepSetDocument); + return nsGenericHTMLFormElement::AppendChildTo(aKid, aNotify); } nsresult nsHTMLSelectElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { WillAddOptions(aKid, this, aIndex); - return nsGenericHTMLFormElement::InsertChildAt(aKid, aIndex, aNotify, - aDeepSetDocument); + return nsGenericHTMLFormElement::InsertChildAt(aKid, aIndex, aNotify); } nsresult @@ -1067,7 +1063,7 @@ nsHTMLSelectElement::SetLength(PRUint32 aLength) rv = NS_NewTextNode(getter_AddRefs(text)); NS_ENSURE_SUCCESS(rv, rv); - rv = element->AppendChildTo(text, PR_FALSE, PR_FALSE); + rv = element->AppendChildTo(text, PR_FALSE); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr node(do_QueryInterface(element)); diff --git a/mozilla/content/html/content/src/nsHTMLStyleElement.cpp b/mozilla/content/html/content/src/nsHTMLStyleElement.cpp index 29b1ea006aa..1ed5682d4c3 100644 --- a/mozilla/content/html/content/src/nsHTMLStyleElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLStyleElement.cpp @@ -75,9 +75,8 @@ public: NS_DECL_NSIDOMHTMLSTYLEELEMENT virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent, nsIContent* aBindingParent, @@ -177,11 +176,9 @@ NS_IMPL_STRING_ATTR(nsHTMLStyleElement, Type, type) nsresult nsHTMLStyleElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { - nsresult rv = - nsGenericHTMLElement::InsertChildAt(aKid, aIndex, aNotify, - aDeepSetDocument); + nsresult rv = nsGenericHTMLElement::InsertChildAt(aKid, aIndex, aNotify); if (NS_SUCCEEDED(rv)) { UpdateStyleSheet(); } @@ -190,11 +187,9 @@ nsHTMLStyleElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, } nsresult -nsHTMLStyleElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsHTMLStyleElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { - nsresult rv = - nsGenericHTMLElement::AppendChildTo(aKid, aNotify, aDeepSetDocument); + nsresult rv = nsGenericHTMLElement::AppendChildTo(aKid, aNotify); if (NS_SUCCEEDED(rv)) { UpdateStyleSheet(); } diff --git a/mozilla/content/html/content/src/nsHTMLTableElement.cpp b/mozilla/content/html/content/src/nsHTMLTableElement.cpp index f6788a793b2..a2de6e0fba8 100644 --- a/mozilla/content/html/content/src/nsHTMLTableElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTableElement.cpp @@ -579,7 +579,7 @@ nsHTMLTableElement::CreateTFoot(nsIDOMHTMLElement** aValue) nsCOMPtr newFoot = NS_NewHTMLTableSectionElement(nodeInfo); if (newFoot) { - rv = AppendChildTo(newFoot, PR_TRUE, PR_FALSE); + rv = AppendChildTo(newFoot, PR_TRUE); CallQueryInterface(newFoot, aValue); } } @@ -625,7 +625,7 @@ nsHTMLTableElement::CreateCaption(nsIDOMHTMLElement** aValue) nsCOMPtr newCaption = NS_NewHTMLTableCaptionElement(nodeInfo); if (newCaption) { - rv = AppendChildTo(newCaption, PR_TRUE, PR_FALSE); + rv = AppendChildTo(newCaption, PR_TRUE); CallQueryInterface(newCaption, aValue); } } @@ -750,7 +750,7 @@ nsHTMLTableElement::InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aValue) NS_NewHTMLTableSectionElement(nodeInfo); if (newRowGroup) { - rv = AppendChildTo(newRowGroup, PR_TRUE, PR_FALSE); + rv = AppendChildTo(newRowGroup, PR_TRUE); rowGroup = do_QueryInterface(newRowGroup); } diff --git a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp index 3efc7f4fbbc..bd80b9ba2cf 100644 --- a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp @@ -112,9 +112,8 @@ public: // nsIContent virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); virtual PRBool ParseAttribute(nsIAtom* aAttribute, const nsAString& aValue, @@ -455,11 +454,10 @@ nsHTMLTextAreaElement::SetDefaultValue(const nsAString& aDefaultValue) nsresult nsHTMLTextAreaElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { nsresult rv; - rv = nsGenericHTMLFormElement::InsertChildAt(aKid, aIndex, aNotify, - aDeepSetDocument); + rv = nsGenericHTMLFormElement::InsertChildAt(aKid, aIndex, aNotify); if (!mValueChanged) { Reset(); } @@ -467,12 +465,10 @@ nsHTMLTextAreaElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, } nsresult -nsHTMLTextAreaElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsHTMLTextAreaElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { nsresult rv; - rv = nsGenericHTMLFormElement::AppendChildTo(aKid, aNotify, - aDeepSetDocument); + rv = nsGenericHTMLFormElement::AppendChildTo(aKid, aNotify); if (!mValueChanged) { Reset(); } diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index 9b3b559b458..26f165d8084 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -1270,9 +1270,9 @@ SinkContext::OpenContainer(const nsIParserNode& aNode) if (mStack[mStackPos - 1].mInsertionPoint != -1) { parent->InsertChildAt(content, mStack[mStackPos - 1].mInsertionPoint++, - PR_FALSE, PR_FALSE); + PR_FALSE); } else { - parent->AppendChildTo(content, PR_FALSE, PR_FALSE); + parent->AppendChildTo(content, PR_FALSE); } mStackPos++; @@ -1528,9 +1528,9 @@ SinkContext::AddLeaf(nsGenericHTMLElement* aContent) if (mStack[mStackPos - 1].mInsertionPoint != -1) { parent->InsertChildAt(aContent, mStack[mStackPos - 1].mInsertionPoint++, - PR_FALSE, PR_FALSE); + PR_FALSE); } else { - parent->AppendChildTo(aContent, PR_FALSE, PR_FALSE); + parent->AppendChildTo(aContent, PR_FALSE); } DidAddContent(aContent, PR_FALSE); @@ -1582,9 +1582,9 @@ SinkContext::AddComment(const nsIParserNode& aNode) if (mStack[mStackPos - 1].mInsertionPoint != -1) { parent->InsertChildAt(comment, mStack[mStackPos - 1].mInsertionPoint++, - PR_FALSE, PR_FALSE); + PR_FALSE); } else { - parent->AppendChildTo(comment, PR_FALSE, PR_FALSE); + parent->AppendChildTo(comment, PR_FALSE); } DidAddContent(comment, PR_FALSE); @@ -1822,9 +1822,9 @@ SinkContext::FlushText(PRBool* aDidFlush, PRBool aReleaseLast) if (mStack[mStackPos - 1].mInsertionPoint != -1) { parent->InsertChildAt(mLastTextNode, mStack[mStackPos - 1].mInsertionPoint++, - PR_FALSE, PR_FALSE); + PR_FALSE); } else { - parent->AppendChildTo(mLastTextNode, PR_FALSE, PR_FALSE); + parent->AppendChildTo(mLastTextNode, PR_FALSE); } didFlush = PR_TRUE; @@ -2121,7 +2121,7 @@ HTMLContentSink::Init(nsIDocument* aDoc, } NS_ADDREF(mHead); - mRoot->AppendChildTo(mHead, PR_FALSE, PR_FALSE); + mRoot->AppendChildTo(mHead, PR_FALSE); mCurrentContext = new SinkContext(this); NS_ENSURE_TRUE(mCurrentContext, NS_ERROR_OUT_OF_MEMORY); @@ -3108,9 +3108,9 @@ HTMLContentSink::SetDocumentTitle(const nsAString& aTitle, const nsIParserNode* text->SetText(title, PR_TRUE); - it->AppendChildTo(text, PR_FALSE, PR_FALSE); + it->AppendChildTo(text, PR_FALSE); - mHead->AppendChildTo(it, PR_FALSE, PR_FALSE); + mHead->AppendChildTo(it, PR_FALSE); MOZ_TIMER_DEBUGLOG(("Stop: nsHTMLContentSink::SetDocumentTitle()\n")); MOZ_TIMER_STOP(mWatch); @@ -3641,7 +3641,7 @@ HTMLContentSink::ProcessAREATag(const nsIParserNode& aNode) NS_ENSURE_SUCCESS(rv, rv); // Add AREA object to the current map - mCurrentMap->AppendChildTo(area, PR_FALSE, PR_FALSE); + mCurrentMap->AppendChildTo(area, PR_FALSE); return NS_OK; } @@ -3765,7 +3765,7 @@ HTMLContentSink::ProcessBASETag(const nsIParserNode& aNode) result = AddAttributes(aNode, element); NS_ENSURE_SUCCESS(result, result); - parent->AppendChildTo(element, PR_FALSE, PR_FALSE); + parent->AppendChildTo(element, PR_FALSE); if (!mInsideNoXXXTag) { nsAutoString value; if (element->GetAttr(kNameSpaceID_None, nsHTMLAtoms::href, @@ -3824,7 +3824,7 @@ HTMLContentSink::ProcessLINKTag(const nsIParserNode& aNode) if (NS_FAILED(result)) { return result; } - parent->AppendChildTo(element, PR_FALSE, PR_FALSE); + parent->AppendChildTo(element, PR_FALSE); if (ssle) { ssle->SetEnableUpdates(PR_TRUE); @@ -3911,7 +3911,7 @@ HTMLContentSink::ProcessMETATag(const nsIParserNode& aNode) return rv; } - parent->AppendChildTo(it, PR_FALSE, PR_FALSE); + parent->AppendChildTo(it, PR_FALSE); // XXX It's just not sufficient to check if the parent is head. Also // check for the preference. @@ -4123,7 +4123,7 @@ HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode) text->SetText(script, PR_TRUE); - element->AppendChildTo(text, PR_FALSE, PR_FALSE); + element->AppendChildTo(text, PR_FALSE); } nsCOMPtr loader; @@ -4162,9 +4162,9 @@ HTMLContentSink::ProcessSCRIPTTag(const nsIParserNode& aNode) if (mCurrentContext->mStack[mCurrentContext->mStackPos - 1].mInsertionPoint != -1) { parent->InsertChildAt(element, mCurrentContext->mStack[mCurrentContext->mStackPos - 1].mInsertionPoint++, - PR_FALSE, PR_FALSE); + PR_FALSE); } else { - parent->AppendChildTo(element, PR_FALSE, PR_FALSE); + parent->AppendChildTo(element, PR_FALSE); } // To prevent script evaluation in a frameset document, we suspended @@ -4256,10 +4256,10 @@ HTMLContentSink::ProcessSTYLETag(const nsIParserNode& aNode) text->SetText(content, PR_TRUE); - element->AppendChildTo(text, PR_FALSE, PR_FALSE); + element->AppendChildTo(text, PR_FALSE); } - parent->AppendChildTo(element, PR_FALSE, PR_FALSE); + parent->AppendChildTo(element, PR_FALSE); if (ssle) { ssle->SetEnableUpdates(PR_TRUE); diff --git a/mozilla/content/html/document/src/nsHTMLFragmentContentSink.cpp b/mozilla/content/html/document/src/nsHTMLFragmentContentSink.cpp index 1e48a6599cc..644c5998496 100644 --- a/mozilla/content/html/document/src/nsHTMLFragmentContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLFragmentContentSink.cpp @@ -430,7 +430,7 @@ nsHTMLFragmentContentSink::SetDocumentTitle(const nsAString& aString, const nsIP AddAttributes(*aNode, content); } - rv = parent->AppendChildTo(content, PR_FALSE, PR_FALSE); + rv = parent->AppendChildTo(content, PR_FALSE); NS_ENSURE_SUCCESS(rv, rv); return AddTextToContent(content, aString); @@ -486,7 +486,7 @@ nsHTMLFragmentContentSink::OpenContainer(const nsIParserNode& aNode) parent = mRoot; } - parent->AppendChildTo(content, PR_FALSE, PR_FALSE); + parent->AppendChildTo(content, PR_FALSE); PushContent(content); } } @@ -589,7 +589,7 @@ nsHTMLFragmentContentSink::AddLeaf(const nsIParserNode& aNode) parent = mRoot; } - parent->AppendChildTo(content, PR_FALSE, PR_FALSE); + parent->AppendChildTo(content, PR_FALSE); } } @@ -662,7 +662,7 @@ nsHTMLFragmentContentSink::AddComment(const nsIParserNode& aNode) parent = mRoot; } - parent->AppendChildTo(comment, PR_FALSE, PR_FALSE); + parent->AppendChildTo(comment, PR_FALSE); } NS_RELEASE(comment); } @@ -825,7 +825,7 @@ nsHTMLFragmentContentSink::AddTextToContent(nsIContent* aContent, const nsAStrin if (NS_SUCCEEDED(result)) { text->SetText(aText, PR_TRUE); - result = aContent->AppendChildTo(text, PR_FALSE, PR_FALSE); + result = aContent->AppendChildTo(text, PR_FALSE); } } } @@ -853,7 +853,7 @@ nsHTMLFragmentContentSink::FlushText() parent = mRoot; } - rv = parent->AppendChildTo(content, PR_FALSE, PR_FALSE); + rv = parent->AppendChildTo(content, PR_FALSE); mTextLength = 0; diff --git a/mozilla/content/html/document/src/nsImageDocument.cpp b/mozilla/content/html/document/src/nsImageDocument.cpp index eb9d7bfacb0..7e542ac3134 100644 --- a/mozilla/content/html/document/src/nsImageDocument.cpp +++ b/mozilla/content/html/document/src/nsImageDocument.cpp @@ -608,7 +608,7 @@ nsImageDocument::CreateSyntheticDocument() mImageContent->SetAttr(kNameSpaceID_None, nsHTMLAtoms::alt, errorMsg, PR_FALSE); } - body->AppendChildTo(mImageContent, PR_FALSE, PR_FALSE); + body->AppendChildTo(mImageContent, PR_FALSE); imageLoader->SetLoadingEnabled(PR_TRUE); return NS_OK; diff --git a/mozilla/content/html/document/src/nsMediaDocument.cpp b/mozilla/content/html/document/src/nsMediaDocument.cpp index 0f04743ab19..0ab1faee892 100644 --- a/mozilla/content/html/document/src/nsMediaDocument.cpp +++ b/mozilla/content/html/document/src/nsMediaDocument.cpp @@ -257,7 +257,7 @@ nsMediaDocument::CreateSyntheticDocument() } mBodyContent = do_QueryInterface(body); - root->AppendChildTo(body, PR_FALSE, PR_FALSE); + root->AppendChildTo(body, PR_FALSE); return NS_OK; } diff --git a/mozilla/content/html/document/src/nsPluginDocument.cpp b/mozilla/content/html/document/src/nsPluginDocument.cpp index 4590838b6c1..8e5e4b941cc 100644 --- a/mozilla/content/html/document/src/nsPluginDocument.cpp +++ b/mozilla/content/html/document/src/nsPluginDocument.cpp @@ -202,7 +202,7 @@ nsPluginDocument::CreateSyntheticPluginDocument() mPluginContent->SetAttr(kNameSpaceID_None, nsHTMLAtoms::type, NS_ConvertUTF8toUTF16(mMimeType), PR_FALSE); - body->AppendChildTo(mPluginContent, PR_FALSE, PR_FALSE); + body->AppendChildTo(mPluginContent, PR_FALSE); return NS_OK; diff --git a/mozilla/content/svg/content/src/nsSVGScriptElement.cpp b/mozilla/content/svg/content/src/nsSVGScriptElement.cpp index 964a279ff5c..99a3ffe2ac3 100644 --- a/mozilla/content/svg/content/src/nsSVGScriptElement.cpp +++ b/mozilla/content/svg/content/src/nsSVGScriptElement.cpp @@ -99,9 +99,8 @@ public: nsIContent* aBindingParent, PRBool aCompileEventHandlers); virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); protected: /** @@ -376,10 +375,9 @@ nsSVGScriptElement::BindToTree(nsIDocument* aDocument, nsIContent* aParent, nsresult nsSVGScriptElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { - nsresult rv = nsSVGScriptElementBase::InsertChildAt(aKid, aIndex, aNotify, - aDeepSetDocument); + nsresult rv = nsSVGScriptElementBase::InsertChildAt(aKid, aIndex, aNotify); if (NS_SUCCEEDED(rv) && aNotify) { MaybeProcessScript(); } @@ -388,11 +386,9 @@ nsSVGScriptElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, } nsresult -nsSVGScriptElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsSVGScriptElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { - nsresult rv = nsSVGScriptElementBase::AppendChildTo(aKid, aNotify, - aDeepSetDocument); + nsresult rv = nsSVGScriptElementBase::AppendChildTo(aKid, aNotify); if (NS_SUCCEEDED(rv) && aNotify) { MaybeProcessScript(); } diff --git a/mozilla/content/svg/content/src/nsSVGStyleElement.cpp b/mozilla/content/svg/content/src/nsSVGStyleElement.cpp index 077cc741a05..c6ca7042b96 100644 --- a/mozilla/content/svg/content/src/nsSVGStyleElement.cpp +++ b/mozilla/content/svg/content/src/nsSVGStyleElement.cpp @@ -66,9 +66,8 @@ public: // nsIContent virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent, nsIContent* aBindingParent, @@ -148,11 +147,9 @@ NS_IMPL_DOM_CLONENODE_WITH_INIT(nsSVGStyleElement) nsresult nsSVGStyleElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { - nsresult rv = - nsSVGStyleElementBase::InsertChildAt(aKid, aIndex, aNotify, - aDeepSetDocument); + nsresult rv = nsSVGStyleElementBase::InsertChildAt(aKid, aIndex, aNotify); if (NS_SUCCEEDED(rv)) { UpdateStyleSheet(); } @@ -161,11 +158,9 @@ nsSVGStyleElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, } nsresult -nsSVGStyleElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsSVGStyleElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { - nsresult rv = - nsSVGStyleElementBase::AppendChildTo(aKid, aNotify, aDeepSetDocument); + nsresult rv = nsSVGStyleElementBase::AppendChildTo(aKid, aNotify); if (NS_SUCCEEDED(rv)) { UpdateStyleSheet(); } diff --git a/mozilla/content/svg/content/src/nsSVGUseElement.cpp b/mozilla/content/svg/content/src/nsSVGUseElement.cpp index 60bd911d0e8..31adf36badb 100644 --- a/mozilla/content/svg/content/src/nsSVGUseElement.cpp +++ b/mozilla/content/svg/content/src/nsSVGUseElement.cpp @@ -557,7 +557,7 @@ nsSVGUseElement::CreateAnonymousContent(nsPresContext* aPresContext, for (i = 0; i < num; i++) { nsCOMPtr child = newcontent->GetChildAt(0); newcontent->RemoveChildAt(0, PR_FALSE); - svgNode->InsertChildAt(child, i, PR_TRUE, PR_TRUE); + svgNode->InsertChildAt(child, i, PR_TRUE); } newcontent = svgNode; diff --git a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp index e32f9602a1d..b6b05134f96 100644 --- a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -528,7 +528,7 @@ nsXBLPrototypeBinding::AttributeChanged(nsIAtom* aAttribute, } textContent->SetText(value, PR_TRUE); - realElement->AppendChildTo(textContent, PR_TRUE, PR_FALSE); + realElement->AppendChildTo(textContent, PR_TRUE); } } } @@ -900,7 +900,7 @@ PRBool PR_CALLBACK SetAttrs(nsHashKey* aKey, void* aData, void* aClosure) } textContent->SetText(value, PR_TRUE); - realElement->AppendChildTo(textContent, PR_TRUE, PR_FALSE); + realElement->AppendChildTo(textContent, PR_TRUE); } } diff --git a/mozilla/content/xml/document/src/nsXMLContentSink.cpp b/mozilla/content/xml/document/src/nsXMLContentSink.cpp index 6019df59122..641879f876b 100644 --- a/mozilla/content/xml/document/src/nsXMLContentSink.cpp +++ b/mozilla/content/xml/document/src/nsXMLContentSink.cpp @@ -561,7 +561,7 @@ nsXMLContentSink::AddContentAsLeaf(nsIContent *aContent) nsCOMPtr parent = GetCurrentContent(); if (parent) { - result = parent->AppendChildTo(aContent, PR_FALSE, PR_FALSE); + result = parent->AppendChildTo(aContent, PR_FALSE); } } @@ -938,7 +938,7 @@ nsXMLContentSink::HandleStartElement(const PRUnichar *aName, nsCOMPtr parent = GetCurrentContent(); NS_ENSURE_TRUE(parent, NS_ERROR_UNEXPECTED); - parent->AppendChildTo(content, PR_FALSE, PR_FALSE); + parent->AppendChildTo(content, PR_FALSE); } PushContent(content); @@ -991,7 +991,7 @@ nsXMLContentSink::HandleEndElement(const PRUnichar *aName) nsCOMPtr parent = GetCurrentContent(); NS_ENSURE_TRUE(parent, NS_ERROR_UNEXPECTED); - parent->AppendChildTo(content, PR_FALSE, PR_FALSE); + parent->AppendChildTo(content, PR_FALSE); } if (mNeedToBlockParser || (mParser && !mParser->IsParserEnabled())) { diff --git a/mozilla/content/xtf/src/nsXMLContentBuilder.cpp b/mozilla/content/xtf/src/nsXMLContentBuilder.cpp index 3a7a7010924..4783281fc2c 100644 --- a/mozilla/content/xtf/src/nsXMLContentBuilder.cpp +++ b/mozilla/content/xtf/src/nsXMLContentBuilder.cpp @@ -174,7 +174,7 @@ NS_IMETHODIMP nsXMLContentBuilder::BeginElement(const nsAString & tagname) mCurrent = mTop; } else { - mCurrent->AppendChildTo(node, PR_TRUE, PR_TRUE); + mCurrent->AppendChildTo(node, PR_TRUE); mCurrent = node; } @@ -210,7 +210,7 @@ NS_IMETHODIMP nsXMLContentBuilder::TextNode(const nsAString & text) domDoc->CreateTextNode(text, getter_AddRefs(textNode)); NS_ASSERTION(textNode, "Failed to create text node"); nsCOMPtr textContent = do_QueryInterface(textNode); - mCurrent->AppendChildTo(textContent, PR_TRUE, PR_TRUE); + mCurrent->AppendChildTo(textContent, PR_TRUE); return NS_OK; } diff --git a/mozilla/content/xtf/src/nsXTFElementWrapper.cpp b/mozilla/content/xtf/src/nsXTFElementWrapper.cpp index 8d009b05769..69b51fc4f6e 100644 --- a/mozilla/content/xtf/src/nsXTFElementWrapper.cpp +++ b/mozilla/content/xtf/src/nsXTFElementWrapper.cpp @@ -196,7 +196,7 @@ nsXTFElementWrapper::UnbindFromTree(PRBool aDeep, PRBool aNullParent) nsresult nsXTFElementWrapper::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument) + PRBool aNotify) { nsresult rv; @@ -207,7 +207,7 @@ nsXTFElementWrapper::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, if (mNotificationMask & nsIXTFElement::NOTIFY_WILL_INSERT_CHILD) GetXTFElement()->WillInsertChild(domKid, aIndex); - rv = nsXTFElementWrapperBase::InsertChildAt(aKid, aIndex, aNotify, aDeepSetDocument); + rv = nsXTFElementWrapperBase::InsertChildAt(aKid, aIndex, aNotify); if (mNotificationMask & nsIXTFElement::NOTIFY_CHILD_INSERTED) GetXTFElement()->ChildInserted(domKid, aIndex); @@ -215,8 +215,7 @@ nsXTFElementWrapper::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, } nsresult -nsXTFElementWrapper::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsXTFElementWrapper::AppendChildTo(nsIContent* aKid, PRBool aNotify) { nsresult rv; @@ -227,7 +226,7 @@ nsXTFElementWrapper::AppendChildTo(nsIContent* aKid, PRBool aNotify, if (mNotificationMask & nsIXTFElement::NOTIFY_WILL_APPEND_CHILD) GetXTFElement()->WillAppendChild(domKid); - rv = nsXTFElementWrapperBase::AppendChildTo(aKid, aNotify, aDeepSetDocument); + rv = nsXTFElementWrapperBase::AppendChildTo(aKid, aNotify); if (mNotificationMask & nsIXTFElement::NOTIFY_CHILD_APPENDED) GetXTFElement()->ChildAppended(domKid); return rv; diff --git a/mozilla/content/xtf/src/nsXTFElementWrapper.h b/mozilla/content/xtf/src/nsXTFElementWrapper.h index 807b3d6ed03..ae78511f35e 100644 --- a/mozilla/content/xtf/src/nsXTFElementWrapper.h +++ b/mozilla/content/xtf/src/nsXTFElementWrapper.h @@ -82,9 +82,8 @@ public: virtual void UnbindFromTree(PRBool aDeep = PR_TRUE, PRBool aNullParent = PR_TRUE); nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); nsIAtom *GetIDAttributeName() const; nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName, diff --git a/mozilla/content/xul/content/src/nsXULElement.cpp b/mozilla/content/xul/content/src/nsXULElement.cpp index 64754a8fafb..49c5b4aaa30 100644 --- a/mozilla/content/xul/content/src/nsXULElement.cpp +++ b/mozilla/content/xul/content/src/nsXULElement.cpp @@ -587,7 +587,7 @@ nsXULElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) if (! newchild) return NS_ERROR_UNEXPECTED; - rv = result->AppendChildTo(newchild, PR_FALSE, PR_FALSE); + rv = result->AppendChildTo(newchild, PR_FALSE); if (NS_FAILED(rv)) return rv; } } @@ -1127,8 +1127,7 @@ nsXULElement::IndexOf(nsIContent* aPossibleChild) const } nsresult -nsXULElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, PRBool aNotify, - PRBool aDeepSetDocument) +nsXULElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, PRBool aNotify) { nsresult rv = EnsureContentsGenerated(); NS_ENSURE_SUCCESS(rv, rv); @@ -1193,8 +1192,7 @@ nsXULElement::InsertChildAt(nsIContent* aKid, PRUint32 aIndex, PRBool aNotify, } nsresult -nsXULElement::AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument) +nsXULElement::AppendChildTo(nsIContent* aKid, PRBool aNotify) { nsresult rv = EnsureContentsGenerated(); NS_ENSURE_SUCCESS(rv, rv); diff --git a/mozilla/content/xul/content/src/nsXULElement.h b/mozilla/content/xul/content/src/nsXULElement.h index 37d63182697..3eb68b76c38 100644 --- a/mozilla/content/xul/content/src/nsXULElement.h +++ b/mozilla/content/xul/content/src/nsXULElement.h @@ -471,9 +471,8 @@ public: virtual nsIContent *GetChildAt(PRUint32 aIndex) const; virtual PRInt32 IndexOf(nsIContent* aPossibleChild) const; virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex, - PRBool aNotify, PRBool aDeepSetDocument); - virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify, - PRBool aDeepSetDocument); + PRBool aNotify); + virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify); virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify); virtual nsIAtom *GetIDAttributeName() const; virtual nsIAtom *GetClassAttributeName() const; diff --git a/mozilla/content/xul/document/src/nsXULDocument.cpp b/mozilla/content/xul/document/src/nsXULDocument.cpp index bc30e033323..3abbefba1d5 100644 --- a/mozilla/content/xul/document/src/nsXULDocument.cpp +++ b/mozilla/content/xul/document/src/nsXULDocument.cpp @@ -2910,7 +2910,7 @@ nsXULDocument::ResumeWalk() if (NS_FAILED(rv)) return rv; // ...and append it to the content model. - rv = element->AppendChildTo(child, PR_FALSE, PR_FALSE); + rv = element->AppendChildTo(child, PR_FALSE); if (NS_FAILED(rv)) return rv; // do pre-order document-level hookup, but only if @@ -2993,7 +2993,7 @@ nsXULDocument::ResumeWalk() if (! child) return NS_ERROR_UNEXPECTED; - rv = element->AppendChildTo(child, PR_FALSE, PR_FALSE); + rv = element->AppendChildTo(child, PR_FALSE); if (NS_FAILED(rv)) return rv; } } @@ -3698,7 +3698,7 @@ nsXULDocument::CreateTemplateBuilder(nsIContent* aElement) getter_AddRefs(bodyContent)); NS_ENSURE_SUCCESS(rv, rv); - aElement->AppendChildTo(bodyContent, PR_FALSE, PR_TRUE); + aElement->AppendChildTo(bodyContent, PR_FALSE); } } else { @@ -4279,7 +4279,7 @@ nsXULDocument::InsertElement(nsIContent* aParent, nsIContent* aChild, PRBool aNo if (pos != -1) { pos = isInsertAfter ? pos + 1 : pos; - rv = aParent->InsertChildAt(aChild, pos, aNotify, PR_TRUE); + rv = aParent->InsertChildAt(aChild, pos, aNotify); if (NS_FAILED(rv)) return rv; @@ -4302,8 +4302,7 @@ nsXULDocument::InsertElement(nsIContent* aParent, nsIContent* aChild, PRBool aNo // appending. if (NS_SUCCEEDED(rv) && pos > 0 && PRUint32(pos - 1) <= aParent->GetChildCount()) { - rv = aParent->InsertChildAt(aChild, pos - 1, aNotify, - PR_TRUE); + rv = aParent->InsertChildAt(aChild, pos - 1, aNotify); if (NS_SUCCEEDED(rv)) wasInserted = PR_TRUE; // If the insertion fails, then we should still @@ -4315,7 +4314,7 @@ nsXULDocument::InsertElement(nsIContent* aParent, nsIContent* aChild, PRBool aNo } if (! wasInserted) { - rv = aParent->AppendChildTo(aChild, aNotify, PR_TRUE); + rv = aParent->AppendChildTo(aChild, aNotify); if (NS_FAILED(rv)) return rv; } return NS_OK; diff --git a/mozilla/content/xul/templates/src/nsXULContentBuilder.cpp b/mozilla/content/xul/templates/src/nsXULContentBuilder.cpp index 7ad68bb09f4..31c6a131b5a 100644 --- a/mozilla/content/xul/templates/src/nsXULContentBuilder.cpp +++ b/mozilla/content/xul/templates/src/nsXULContentBuilder.cpp @@ -658,7 +658,7 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode, content->SetText(value, PR_FALSE); - rv = aRealNode->AppendChildTo(content, aNotify, PR_FALSE); + rv = aRealNode->AppendChildTo(content, aNotify); if (NS_FAILED(rv)) return rv; // XXX Don't bother remembering text nodes as the @@ -678,7 +678,7 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode, NS_ERROR("failed to clone textnode"); return NS_ERROR_FAILURE; } - rv = aRealNode->AppendChildTo(clonedContent, aNotify, PR_FALSE); + rv = aRealNode->AppendChildTo(clonedContent, aNotify); if (NS_FAILED(rv)) return rv; } else { @@ -806,7 +806,7 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode, } if (NS_FAILED(rv)) { - rv = aRealNode->AppendChildTo(realKid, aNotify, PR_FALSE); + rv = aRealNode->AppendChildTo(realKid, aNotify); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to insert element"); } } @@ -1317,7 +1317,7 @@ nsXULContentBuilder::EnsureElementHasGenericChild(nsIContent* parent, if (NS_FAILED(rv)) return rv; // XXX Note that the notification ensures we won't batch insertions! This could be bad! - Dave - rv = parent->AppendChildTo(element, aNotify, PR_FALSE); + rv = parent->AppendChildTo(element, aNotify); if (NS_FAILED(rv)) return rv; *result = element; diff --git a/mozilla/content/xul/templates/src/nsXULSortService.cpp b/mozilla/content/xul/templates/src/nsXULSortService.cpp index 58cc9f2c6e4..059288f292d 100644 --- a/mozilla/content/xul/templates/src/nsXULSortService.cpp +++ b/mozilla/content/xul/templates/src/nsXULSortService.cpp @@ -1228,7 +1228,7 @@ XULSortServiceImpl::SortContainer(nsIContent *container, sortPtr sortInfo, contentSortInfo * contentSortInfo = contentSortInfoArray[loop]; nsIContent *parentNode = (nsIContent *)contentSortInfo->content; nsIContent* kid = parentNode; - container->InsertChildAt(kid, childPos++, PR_FALSE, PR_TRUE); + container->InsertChildAt(kid, childPos++, PR_FALSE); NS_RELEASE(contentSortInfo->content); delete contentSortInfo; @@ -1502,7 +1502,7 @@ XULSortServiceImpl::InsertContainerNode(nsIRDFCompositeDataSource *db, nsRDFSort temp = child; direction = inplaceSortCallback(&node, &temp, &sortInfo); if (direction < 0) { - container->InsertChildAt(node, staticCount, aNotify, PR_FALSE); + container->InsertChildAt(node, staticCount, aNotify); childAdded = PR_TRUE; } else sortState->lastWasFirst = PR_FALSE; @@ -1511,7 +1511,7 @@ XULSortServiceImpl::InsertContainerNode(nsIRDFCompositeDataSource *db, nsRDFSort temp = child; direction = inplaceSortCallback(&node, &temp, &sortInfo); if (direction > 0) { - container->InsertChildAt(node, realNumChildren, aNotify, PR_FALSE); + container->InsertChildAt(node, realNumChildren, aNotify); childAdded = PR_TRUE; } else sortState->lastWasLast = PR_FALSE; @@ -1531,7 +1531,7 @@ XULSortServiceImpl::InsertContainerNode(nsIRDFCompositeDataSource *db, nsRDFSort && (direction >= 0)) || (left == right)) { PRInt32 thePos = ((direction > 0) ? x : x-1); - container->InsertChildAt(node, thePos, aNotify, PR_FALSE); + container->InsertChildAt(node, thePos, aNotify); childAdded = PR_TRUE; sortState->lastWasFirst = (thePos == staticCount) ? PR_TRUE: PR_FALSE; @@ -1548,7 +1548,7 @@ XULSortServiceImpl::InsertContainerNode(nsIRDFCompositeDataSource *db, nsRDFSort } if (!childAdded) - container->InsertChildAt(node, numChildren, aNotify, PR_FALSE); + container->InsertChildAt(node, numChildren, aNotify); if (!sortState->mCache && sortInfo.mInner) sortState->mCache = sortInfo.mInner; @@ -1672,14 +1672,16 @@ XULSortServiceImpl::Sort(nsIDOMNode* node, const nsAString& sortResource, const nsCOMPtr containerParent = container->GetParent(); PRInt32 containerIndex = containerParent->IndexOf(container); PRInt32 childCount = containerParent->GetChildCount(); - if (NS_FAILED(rv = containerParent->RemoveChildAt(containerIndex, PR_TRUE))) return rv; + rv = containerParent->RemoveChildAt(containerIndex, PR_TRUE); + NS_ENSURE_SUCCESS(rv, rv); + if (containerIndex+1 < childCount) { - if (NS_FAILED(rv = containerParent->InsertChildAt(container, containerIndex, PR_TRUE, PR_TRUE))) return rv; + rv = containerParent->InsertChildAt(container, containerIndex, PR_TRUE); } else { - if (NS_FAILED(rv = containerParent->AppendChildTo(container, PR_TRUE, PR_TRUE))) return rv; + rv = containerParent->AppendChildTo(container, PR_TRUE); } - return NS_OK; + return rv; } nsresult diff --git a/mozilla/layout/build/nsContentDLF.cpp b/mozilla/layout/build/nsContentDLF.cpp index 5e76cde9d55..3db651f5655 100644 --- a/mozilla/layout/build/nsContentDLF.cpp +++ b/mozilla/layout/build/nsContentDLF.cpp @@ -364,12 +364,12 @@ nsContentDLF::CreateBlankDocument(nsILoadGroup *aLoadGroup, nsIDocument **aDocum if (htmlElement && headElement && bodyElement) { rv = blankDoc->SetRootContent(htmlElement); if (NS_SUCCEEDED(rv)) { - rv = htmlElement->AppendChildTo(headElement, PR_FALSE, PR_FALSE); + rv = htmlElement->AppendChildTo(headElement, PR_FALSE); if (NS_SUCCEEDED(rv)) { bodyElement->SetContentID(blankDoc->GetAndIncrementContentID()); // XXXbz Why not notifying here? - htmlElement->AppendChildTo(bodyElement, PR_FALSE, PR_FALSE); + htmlElement->AppendChildTo(bodyElement, PR_FALSE); } } } diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index c921148102e..5ec23052485 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -2119,7 +2119,6 @@ nsComboboxControlFrame::CreateAnonymousContent(nsPresContext* aPresContext, mDisplayContent->SetText(NS_LITERAL_STRING("X"), PR_TRUE); nsCOMPtr doc = mContent->GetDocument(); - // mContent->AppendChildTo(labelContent, PR_FALSE, PR_FALSE); nsCOMPtr nodeInfo; doc->NodeInfoManager()->GetNodeInfo(nsHTMLAtoms::input, nsnull, diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index abd5582fb02..854b87a7083 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -1590,8 +1590,8 @@ nsObjectFrame::CreateDefaultFrames(nsPresContext *aPresContext, return; } - anchor->AppendChildTo(img, PR_FALSE, PR_TRUE); - anchor->AppendChildTo(text, PR_FALSE, PR_TRUE); + anchor->AppendChildTo(img, PR_FALSE); + anchor->AppendChildTo(text, PR_FALSE); nsAutoString style; CopyASCIItoUTF16("text-align: -moz-center;" diff --git a/mozilla/layout/html/tests/TestAttributes.cpp b/mozilla/layout/html/tests/TestAttributes.cpp index 57641686ebe..0ca032dbc1c 100644 --- a/mozilla/layout/html/tests/TestAttributes.cpp +++ b/mozilla/layout/html/tests/TestAttributes.cpp @@ -300,9 +300,8 @@ int main(int argc, char** argv) printf("Could not create container.\n"); return -1; } - container->SetDocument(myDoc, PR_FALSE, PR_TRUE); - container->AppendChildTo(text, PR_FALSE, PR_FALSE); + container->AppendChildTo(text, PR_FALSE); PRInt32 nk; container->ChildCount(nk); if (nk != 1) {