зеркало из https://github.com/mozilla/gecko-dev.git
Bug 616076, no need for userdata in print documents, r=jst, a=blocking
--HG-- extra : rebase_source : a9ecb61ffca7f73234cba3c3eb3d956ffc2bf7b1
This commit is contained in:
Родитель
36cdf253ea
Коммит
f67ee04d04
|
@ -448,7 +448,7 @@ nsDOMAttribute::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDOMAttribute::CloneNode(PRBool aDeep, nsIDOMNode** aResult)
|
nsDOMAttribute::CloneNode(PRBool aDeep, nsIDOMNode** aResult)
|
||||||
{
|
{
|
||||||
return nsNodeUtils::CloneNodeImpl(this, aDeep, aResult);
|
return nsNodeUtils::CloneNodeImpl(this, aDeep, PR_TRUE, aResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
@ -5778,7 +5778,7 @@ nsDocument::AppendChild(nsIDOMNode* aNewChild, nsIDOMNode** aReturn)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
nsDocument::CloneNode(PRBool aDeep, nsIDOMNode** aReturn)
|
||||||
{
|
{
|
||||||
return nsNodeUtils::CloneNodeImpl(this, aDeep, aReturn);
|
return nsNodeUtils::CloneNodeImpl(this, aDeep, !mCreatingStaticClone, aReturn);
|
||||||
}
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|
|
@ -485,7 +485,7 @@ private:
|
||||||
return nsGenericDOMDataNode::IsSupported(aFeature, aVersion, aReturn); \
|
return nsGenericDOMDataNode::IsSupported(aFeature, aVersion, aReturn); \
|
||||||
} \
|
} \
|
||||||
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { \
|
NS_IMETHOD CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { \
|
||||||
return nsNodeUtils::CloneNodeImpl(this, aDeep, aReturn); \
|
return nsNodeUtils::CloneNodeImpl(this, aDeep, PR_TRUE, aReturn); \
|
||||||
} \
|
} \
|
||||||
virtual nsGenericDOMDataNode *CloneDataNode(nsINodeInfo *aNodeInfo, \
|
virtual nsGenericDOMDataNode *CloneDataNode(nsINodeInfo *aNodeInfo, \
|
||||||
PRBool aCloneText) const;
|
PRBool aCloneText) const;
|
||||||
|
|
|
@ -544,7 +544,7 @@ public:
|
||||||
PRBool* aReturn);
|
PRBool* aReturn);
|
||||||
nsresult CloneNode(PRBool aDeep, nsIDOMNode **aResult)
|
nsresult CloneNode(PRBool aDeep, nsIDOMNode **aResult)
|
||||||
{
|
{
|
||||||
return nsNodeUtils::CloneNodeImpl(this, aDeep, aResult);
|
return nsNodeUtils::CloneNodeImpl(this, aDeep, PR_TRUE, aResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
|
|
|
@ -418,7 +418,9 @@ nsNodeUtils::TraverseUserData(nsINode* aNode,
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
nsresult
|
nsresult
|
||||||
nsNodeUtils::CloneNodeImpl(nsINode *aNode, PRBool aDeep, nsIDOMNode **aResult)
|
nsNodeUtils::CloneNodeImpl(nsINode *aNode, PRBool aDeep,
|
||||||
|
PRBool aCallUserDataHandlers,
|
||||||
|
nsIDOMNode **aResult)
|
||||||
{
|
{
|
||||||
*aResult = nsnull;
|
*aResult = nsnull;
|
||||||
|
|
||||||
|
@ -429,7 +431,7 @@ nsNodeUtils::CloneNodeImpl(nsINode *aNode, PRBool aDeep, nsIDOMNode **aResult)
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
||||||
nsIDocument *ownerDoc = aNode->GetOwnerDoc();
|
nsIDocument *ownerDoc = aNode->GetOwnerDoc();
|
||||||
if (ownerDoc) {
|
if (ownerDoc && aCallUserDataHandlers) {
|
||||||
rv = CallUserDataHandlers(nodesWithProperties, ownerDoc,
|
rv = CallUserDataHandlers(nodesWithProperties, ownerDoc,
|
||||||
nsIDOMUserDataHandler::NODE_CLONED, PR_TRUE);
|
nsIDOMUserDataHandler::NODE_CLONED, PR_TRUE);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
|
@ -242,9 +242,11 @@ public:
|
||||||
*
|
*
|
||||||
* @param aNode the node to clone
|
* @param aNode the node to clone
|
||||||
* @param aDeep if true all descendants will be cloned too
|
* @param aDeep if true all descendants will be cloned too
|
||||||
|
* @param aCallUserDataHandlers if true, user data handlers will be called
|
||||||
* @param aResult the clone
|
* @param aResult the clone
|
||||||
*/
|
*/
|
||||||
static nsresult CloneNodeImpl(nsINode *aNode, PRBool aDeep,
|
static nsresult CloneNodeImpl(nsINode *aNode, PRBool aDeep,
|
||||||
|
PRBool aCallUserDataHandlers,
|
||||||
nsIDOMNode **aResult);
|
nsIDOMNode **aResult);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Загрузка…
Ссылка в новой задаче