зеркало из https://github.com/mozilla/gecko-dev.git
Fxing nsbeta3+ bug 45680. Cloning an HTML element with a style attribute didn't clone the style declaration in the element so changing the style on the clone resulted in a style change for both elements. Also fixing a few memory leaks in nsHTMLTableElement. r=pollmann@netscape.com
This commit is contained in:
Родитель
6807364e12
Коммит
f8d31e1884
|
@ -438,6 +438,26 @@ nsGenericHTMLElement::CopyInnerTo(nsIContent* aSrcContent,
|
|||
|
||||
if (nsnull != mAttributes) {
|
||||
result = mAttributes->Clone(&(aDst->mAttributes));
|
||||
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
nsHTMLValue val;
|
||||
result = aDst->GetHTMLAttribute(nsHTMLAtoms::style, val);
|
||||
|
||||
if (result == NS_CONTENT_ATTR_HAS_VALUE &&
|
||||
val.GetUnit() == eHTMLUnit_ISupports) {
|
||||
nsCOMPtr<nsISupports> supports(dont_AddRef(val.GetISupportsValue()));
|
||||
nsCOMPtr<nsICSSStyleRule> rule(do_QueryInterface(supports));
|
||||
|
||||
if (rule) {
|
||||
nsCOMPtr<nsICSSRule> ruleClone;
|
||||
|
||||
result = rule->Clone(*getter_AddRefs(ruleClone));
|
||||
|
||||
val.SetISupportsValue(ruleClone);
|
||||
aDst->SetHTMLAttribute(nsHTMLAtoms::style, val, PR_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PRInt32 id;
|
||||
|
|
|
@ -198,6 +198,7 @@ nsHTMLAnchorElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -190,6 +190,7 @@ nsHTMLAppletElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -172,6 +172,7 @@ nsHTMLAreaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ nsHTMLBRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLBaseElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -123,6 +123,7 @@ nsHTMLBaseFontElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -744,6 +744,7 @@ nsHTMLBodyElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -251,6 +251,7 @@ nsHTMLButtonElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ nsHTMLDListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLDelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ nsHTMLDirectoryElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLDivElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -148,6 +148,7 @@ nsHTMLEmbedElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -144,6 +144,7 @@ nsHTMLFieldSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -127,6 +127,7 @@ nsHTMLFontElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -247,6 +247,7 @@ nsHTMLFormElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -150,6 +150,7 @@ nsHTMLFrameElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLFrameSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ nsHTMLHRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ nsHTMLHeadElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ nsHTMLHeadingElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ nsHTMLHtmlElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
it->mInner.Init(it, mInner.mNodeInfo);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
|
|
|
@ -155,6 +155,7 @@ nsHTMLIFrameElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -253,6 +253,7 @@ nsHTMLImageElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -283,6 +283,7 @@ nsHTMLInputElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLInsElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ nsHTMLIsIndexElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ nsHTMLLIElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -225,6 +225,7 @@ nsHTMLLabelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -144,6 +144,7 @@ nsHTMLLegendElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -174,6 +174,7 @@ nsHTMLLinkElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -301,6 +301,7 @@ nsHTMLMapElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ nsHTMLMenuElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ nsHTMLMetaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLModElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ nsHTMLOListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ nsHTMLObjectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ nsHTMLOptGroupElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -196,6 +196,7 @@ nsHTMLOptionElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ nsHTMLParagraphElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
it->mInner.Init(it, mInner.mNodeInfo);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
|
|
|
@ -125,6 +125,7 @@ nsHTMLParamElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ nsHTMLPreElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ nsHTMLQuoteElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ nsHTMLScriptElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -432,11 +432,9 @@ nsHTMLSelectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
// Stabilize the refcount before copying the inner element.
|
||||
NS_ADDREF(it);
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
nsresult rv = it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
NS_RELEASE(it);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,6 +119,7 @@ nsHTMLObjectElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -154,6 +154,7 @@ nsHTMLSpacerElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -107,6 +107,7 @@ nsHTMLSpanElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -144,6 +144,7 @@ nsHTMLStyleElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ nsHTMLTableCaptionElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -173,6 +173,7 @@ nsHTMLTableCellElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -142,6 +142,7 @@ nsHTMLTableColElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -131,6 +131,7 @@ nsHTMLTableColGroupElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -382,6 +382,7 @@ nsHTMLTableElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
@ -819,20 +820,20 @@ nsHTMLTableElement::InsertRow(PRInt32 aIndex, nsIDOMHTMLElement** aValue)
|
|||
NS_IMETHODIMP
|
||||
nsHTMLTableElement::DeleteRow(PRInt32 aValue)
|
||||
{
|
||||
nsIDOMHTMLCollection *rows;
|
||||
GetRows(&rows);
|
||||
nsIDOMNode *row=nsnull;
|
||||
rows->Item(aValue, &row);
|
||||
if (nsnull!=row)
|
||||
nsCOMPtr<nsIDOMHTMLCollection> rows;
|
||||
GetRows(getter_AddRefs(rows));
|
||||
nsCOMPtr<nsIDOMNode> row;
|
||||
rows->Item(aValue, getter_AddRefs(row));
|
||||
if (row)
|
||||
{
|
||||
nsIDOMNode *parent=nsnull;
|
||||
row->GetParentNode(&parent);
|
||||
if (nsnull!=parent)
|
||||
nsCOMPtr<nsIDOMNode> parent=nsnull;
|
||||
row->GetParentNode(getter_AddRefs(parent));
|
||||
if (parent)
|
||||
{
|
||||
parent->RemoveChild(row, &row);
|
||||
nsCOMPtr<nsIDOMNode> deleted_row;
|
||||
parent->RemoveChild(row, getter_AddRefs(deleted_row));
|
||||
}
|
||||
}
|
||||
NS_RELEASE(rows);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -276,6 +276,7 @@ nsHTMLTableRowElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -140,6 +140,7 @@ nsHTMLTableSectionElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -191,6 +191,7 @@ nsHTMLTextAreaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -125,6 +125,7 @@ nsHTMLTitleElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -125,6 +125,7 @@ nsHTMLUListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -249,6 +249,7 @@ nsHTMLUnknownElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ nsHTMLWBRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -438,6 +438,26 @@ nsGenericHTMLElement::CopyInnerTo(nsIContent* aSrcContent,
|
|||
|
||||
if (nsnull != mAttributes) {
|
||||
result = mAttributes->Clone(&(aDst->mAttributes));
|
||||
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
nsHTMLValue val;
|
||||
result = aDst->GetHTMLAttribute(nsHTMLAtoms::style, val);
|
||||
|
||||
if (result == NS_CONTENT_ATTR_HAS_VALUE &&
|
||||
val.GetUnit() == eHTMLUnit_ISupports) {
|
||||
nsCOMPtr<nsISupports> supports(dont_AddRef(val.GetISupportsValue()));
|
||||
nsCOMPtr<nsICSSStyleRule> rule(do_QueryInterface(supports));
|
||||
|
||||
if (rule) {
|
||||
nsCOMPtr<nsICSSRule> ruleClone;
|
||||
|
||||
result = rule->Clone(*getter_AddRefs(ruleClone));
|
||||
|
||||
val.SetISupportsValue(ruleClone);
|
||||
aDst->SetHTMLAttribute(nsHTMLAtoms::style, val, PR_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PRInt32 id;
|
||||
|
|
|
@ -198,6 +198,7 @@ nsHTMLAnchorElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -190,6 +190,7 @@ nsHTMLAppletElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -172,6 +172,7 @@ nsHTMLAreaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ nsHTMLBRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLBaseElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -123,6 +123,7 @@ nsHTMLBaseFontElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -744,6 +744,7 @@ nsHTMLBodyElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -251,6 +251,7 @@ nsHTMLButtonElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ nsHTMLDListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLDelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ nsHTMLDirectoryElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLDivElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -148,6 +148,7 @@ nsHTMLEmbedElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -144,6 +144,7 @@ nsHTMLFieldSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -127,6 +127,7 @@ nsHTMLFontElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -247,6 +247,7 @@ nsHTMLFormElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -150,6 +150,7 @@ nsHTMLFrameElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLFrameSetElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ nsHTMLHRElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ nsHTMLHeadElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ nsHTMLHeadingElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ nsHTMLHtmlElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
it->mInner.Init(it, mInner.mNodeInfo);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
|
|
|
@ -155,6 +155,7 @@ nsHTMLIFrameElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -253,6 +253,7 @@ nsHTMLImageElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -283,6 +283,7 @@ nsHTMLInputElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLInsElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ nsHTMLIsIndexElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ nsHTMLLIElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -225,6 +225,7 @@ nsHTMLLabelElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -166,6 +166,7 @@ nsHTMLLayerElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -144,6 +144,7 @@ nsHTMLLegendElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -174,6 +174,7 @@ nsHTMLLinkElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -301,6 +301,7 @@ nsHTMLMapElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ nsHTMLMenuElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ nsHTMLMetaElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ nsHTMLModElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
|
@ -124,6 +124,7 @@ nsHTMLOListElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
|||
if (nsnull == it) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||||
mInner.CopyInnerTo(this, &it->mInner, aDeep);
|
||||
return it->QueryInterface(kIDOMNodeIID, (void**) aReturn);
|
||||
}
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче