47 lines
1.3 KiB
Text
47 lines
1.3 KiB
Text
|
diff -p -U 8 -r1.15 nsSVGScriptElement.cpp
|
||
|
--- content/svg/content/src/nsSVGScriptElement.cpp 28 Apr 2005 23:47:55 -0000 1.15
|
||
|
+++ content/svg/content/src/nsSVGScriptElement.cpp 26 Feb 2009 21:03:08 -0000
|
||
|
@@ -177,17 +177,40 @@ nsSVGScriptElement::Init()
|
||
|
}
|
||
|
|
||
|
return NS_OK;
|
||
|
}
|
||
|
|
||
|
//----------------------------------------------------------------------
|
||
|
// nsIDOMNode methods
|
||
|
|
||
|
-NS_IMPL_DOM_CLONENODE_WITH_INIT(nsSVGScriptElement)
|
||
|
+nsresult
|
||
|
+nsSVGScriptElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
||
|
+{
|
||
|
+ *aReturn = nsnull;
|
||
|
+
|
||
|
+ nsSVGScriptElement* it = new nsSVGScriptElement(mNodeInfo);
|
||
|
+ if (!it) {
|
||
|
+ return NS_ERROR_OUT_OF_MEMORY;
|
||
|
+ }
|
||
|
+
|
||
|
+ nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);
|
||
|
+
|
||
|
+ CopyInnerTo(it, aDeep);
|
||
|
+
|
||
|
+ // The clone should be marked evaluated if we are. It should also be marked
|
||
|
+ // evaluated if we're evaluating, to handle the case when this script node's
|
||
|
+ // script clones the node.
|
||
|
+ it->mIsEvaluated = mIsEvaluated || mEvaluating;
|
||
|
+ it->mLineNumber = mLineNumber;
|
||
|
+
|
||
|
+ kungFuDeathGrip.swap(*aReturn);
|
||
|
+
|
||
|
+ return NS_OK;
|
||
|
+}
|
||
|
|
||
|
//----------------------------------------------------------------------
|
||
|
// nsIDOMSVGScriptElement methods
|
||
|
|
||
|
/* attribute DOMString type; */
|
||
|
NS_IMETHODIMP
|
||
|
nsSVGScriptElement::GetType(nsAString & aType)
|
||
|
{
|
||
|
|