Fix selection regression. Bug 214343, r=caillon, sr=jst
git-svn-id: svn://10.0.0.236/trunk@145363 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1015,12 +1015,14 @@ nsContentUtils::GetAncestorsAndOffsets(nsIDOMNode* aNode,
|
||||
aAncestorOffsets->AppendElement(NS_INT32_TO_PTR(aOffset));
|
||||
|
||||
// insert all the ancestors
|
||||
nsIContent* ancestor = content->GetParent();
|
||||
while (ancestor) {
|
||||
ancestor->IndexOf(content, offset);
|
||||
aAncestorNodes->AppendElement(ancestor);
|
||||
nsIContent* child = content;
|
||||
nsIContent* parent = child->GetParent();
|
||||
while (parent) {
|
||||
parent->IndexOf(child, offset);
|
||||
aAncestorNodes->AppendElement(parent);
|
||||
aAncestorOffsets->AppendElement(NS_INT32_TO_PTR(offset));
|
||||
ancestor = ancestor->GetParent();
|
||||
child = parent;
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user