Remove unused aDeep args from AppendChildTo and InsertChildAt. Bug 289316,
r=sicking, sr=peterv, a=brendan
This commit is contained in:
Родитель
0be11d1202
Коммит
f911f30fc9
|
@ -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.
|
||||
|
|
|
@ -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<nsIContent> 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?
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<nsIContent> newContent = do_QueryInterface(newNode);
|
||||
rv = aDst->AppendChildTo(newContent, PR_FALSE, PR_FALSE);
|
||||
rv = aDst->AppendChildTo(newContent, PR_FALSE);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -337,7 +337,7 @@ nsGenericHTMLElement::CopyInnerTo(nsGenericElement* aDst, PRBool aDeep)
|
|||
|
||||
nsCOMPtr<nsIContent> 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;
|
||||
|
|
|
@ -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<nsISelectElement> 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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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<nsIDOMNode> node(do_QueryInterface(element));
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -579,7 +579,7 @@ nsHTMLTableElement::CreateTFoot(nsIDOMHTMLElement** aValue)
|
|||
nsCOMPtr<nsIContent> 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<nsIContent> 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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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<nsIScriptLoader> 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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -557,7 +557,7 @@ nsSVGUseElement::CreateAnonymousContent(nsPresContext* aPresContext,
|
|||
for (i = 0; i < num; i++) {
|
||||
nsCOMPtr<nsIContent> 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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -561,7 +561,7 @@ nsXMLContentSink::AddContentAsLeaf(nsIContent *aContent)
|
|||
nsCOMPtr<nsIContent> 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<nsIContent> 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<nsIContent> 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())) {
|
||||
|
|
|
@ -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<nsIContent> textContent = do_QueryInterface(textNode);
|
||||
mCurrent->AppendChildTo(textContent, PR_TRUE, PR_TRUE);
|
||||
mCurrent->AppendChildTo(textContent, PR_TRUE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<nsIContent> 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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2119,7 +2119,6 @@ nsComboboxControlFrame::CreateAnonymousContent(nsPresContext* aPresContext,
|
|||
mDisplayContent->SetText(NS_LITERAL_STRING("X"), PR_TRUE);
|
||||
|
||||
nsCOMPtr<nsIDocument> doc = mContent->GetDocument();
|
||||
// mContent->AppendChildTo(labelContent, PR_FALSE, PR_FALSE);
|
||||
|
||||
nsCOMPtr<nsINodeInfo> nodeInfo;
|
||||
doc->NodeInfoManager()->GetNodeInfo(nsHTMLAtoms::input, nsnull,
|
||||
|
|
|
@ -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;"
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче