зеркало из https://github.com/mozilla/pjs.git
Родитель
7b34fa1c99
Коммит
f3fdc6e727
|
@ -973,7 +973,7 @@ nsContentUtils::GetAncestors(nsIDOMNode* aNode,
|
|||
do {
|
||||
aArray->AppendElement(node.get());
|
||||
node->GetParentNode(getter_AddRefs(ancestor));
|
||||
node = ancestor;
|
||||
node.swap(ancestor);
|
||||
} while (node);
|
||||
|
||||
return NS_OK;
|
||||
|
@ -1016,7 +1016,7 @@ nsContentUtils::GetAncestorsAndOffsets(nsIDOMNode* aNode,
|
|||
ancestor->IndexOf(content, offset);
|
||||
aAncestorNodes->AppendElement(ancestor.get());
|
||||
aAncestorOffsets->AppendElement(NS_INT32_TO_PTR(offset));
|
||||
content = ancestor;
|
||||
content.swap(ancestor);
|
||||
content->GetParent(getter_AddRefs(ancestor));
|
||||
}
|
||||
|
||||
|
@ -1078,8 +1078,8 @@ nsContentUtils::GetFirstDifferentAncestors(nsIDOMNode *aNode,
|
|||
aDifferentNodes.AppendObject(aOther);
|
||||
return NS_OK;
|
||||
}
|
||||
node = ancestor;
|
||||
} while (ancestor);
|
||||
node.swap(ancestor);
|
||||
} while (node);
|
||||
|
||||
// Insert all the ancestors of |aOther|
|
||||
nsCOMPtr<nsIDOMNode> other(aOther);
|
||||
|
@ -1091,8 +1091,8 @@ nsContentUtils::GetFirstDifferentAncestors(nsIDOMNode *aNode,
|
|||
aDifferentNodes.AppendObject(aNode);
|
||||
return NS_OK;
|
||||
}
|
||||
other = ancestor;
|
||||
} while (ancestor);
|
||||
other.swap(ancestor);
|
||||
} while (other);
|
||||
|
||||
PRInt32 nodeIdx = nodeAncestors.Count() - 1;
|
||||
PRInt32 otherIdx = otherAncestors.Count() - 1;
|
||||
|
|
|
@ -2419,7 +2419,7 @@ isSelfOrAncestor(nsIContent *aNode, nsIContent *aChild)
|
|||
|
||||
parent->GetParent(getter_AddRefs(tmpNode));
|
||||
|
||||
parent = tmpNode;
|
||||
parent.swap(tmpNode);
|
||||
}
|
||||
|
||||
return PR_FALSE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче