mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 04:03:47 +00:00
Bug 1406215 - Part 2: Remove the usage of nsINode::GetChildAt() from nsTextServicesDocument::GetCollapsedSelection(); r=masayuki
This commit is contained in:
parent
6f1701de55
commit
e3ed6f0810
@ -2389,13 +2389,10 @@ nsTextServicesDocument::GetCollapsedSelection(nsITextServicesDocument::TSDBlockS
|
||||
// If the parent has children, position the iterator
|
||||
// on the child that is to the left of the offset.
|
||||
|
||||
uint32_t childIndex = offset;
|
||||
|
||||
if (childIndex > 0) {
|
||||
childIndex -= 1;
|
||||
nsIContent* content = range->GetChildAtStartOffset();
|
||||
if (content && parent->GetFirstChild() != content) {
|
||||
content = content->GetPreviousSibling();
|
||||
}
|
||||
|
||||
nsIContent* content = parent->GetChildAt(childIndex);
|
||||
NS_ENSURE_TRUE(content, NS_ERROR_FAILURE);
|
||||
|
||||
rv = iter->PositionAt(content);
|
||||
|
Loading…
x
Reference in New Issue
Block a user