mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-05 08:09:15 +00:00
Fixing a cloneNode() regression in the HTML code, doing a deep clone on a element that didn't have a style attribute was failing to clone it's chil nodes. r=pollmann@netscape.com
This commit is contained in:
parent
ad5e1c0d3c
commit
4e563c4a15
@ -425,9 +425,9 @@ nsGenericHTMLElement::CopyInnerTo(nsIContent* aSrcContent,
|
||||
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
nsHTMLValue val;
|
||||
result = aDst->GetHTMLAttribute(nsHTMLAtoms::style, val);
|
||||
nsresult rv = aDst->GetHTMLAttribute(nsHTMLAtoms::style, val);
|
||||
|
||||
if (result == NS_CONTENT_ATTR_HAS_VALUE &&
|
||||
if (rv == NS_CONTENT_ATTR_HAS_VALUE &&
|
||||
val.GetUnit() == eHTMLUnit_ISupports) {
|
||||
nsCOMPtr<nsISupports> supports(dont_AddRef(val.GetISupportsValue()));
|
||||
nsCOMPtr<nsICSSStyleRule> rule(do_QueryInterface(supports));
|
||||
@ -3265,7 +3265,7 @@ nsGenericHTMLContainerElement::CopyInnerTo(nsIContent* aSrcContent,
|
||||
nsresult result = nsGenericHTMLElement::CopyInnerTo(aSrcContent,
|
||||
aDst,
|
||||
aDeep);
|
||||
if (NS_OK != result) {
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -425,9 +425,9 @@ nsGenericHTMLElement::CopyInnerTo(nsIContent* aSrcContent,
|
||||
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
nsHTMLValue val;
|
||||
result = aDst->GetHTMLAttribute(nsHTMLAtoms::style, val);
|
||||
nsresult rv = aDst->GetHTMLAttribute(nsHTMLAtoms::style, val);
|
||||
|
||||
if (result == NS_CONTENT_ATTR_HAS_VALUE &&
|
||||
if (rv == NS_CONTENT_ATTR_HAS_VALUE &&
|
||||
val.GetUnit() == eHTMLUnit_ISupports) {
|
||||
nsCOMPtr<nsISupports> supports(dont_AddRef(val.GetISupportsValue()));
|
||||
nsCOMPtr<nsICSSStyleRule> rule(do_QueryInterface(supports));
|
||||
@ -3265,7 +3265,7 @@ nsGenericHTMLContainerElement::CopyInnerTo(nsIContent* aSrcContent,
|
||||
nsresult result = nsGenericHTMLElement::CopyInnerTo(aSrcContent,
|
||||
aDst,
|
||||
aDeep);
|
||||
if (NS_OK != result) {
|
||||
if (NS_FAILED(result)) {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user