Bug 718504 - Remove some GetChildAt callers; r=smaug
This commit is contained in:
@@ -289,8 +289,8 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
|
||||
|
||||
PRUint32 childCount = parent->GetChildCount();
|
||||
bool didAppend = false;
|
||||
while (node->GetChildCount()) {
|
||||
nsCOMPtr<nsIContent> child = node->GetChildAt(0);
|
||||
while (node->HasChildren()) {
|
||||
nsCOMPtr<nsIContent> child = node->GetFirstChild();
|
||||
rv = node->RemoveChildAt(0, true);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
rv = parent->AppendChildTo(child, false);
|
||||
@@ -517,8 +517,8 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
|
||||
aBuilder->GetDocument());
|
||||
|
||||
PRUint32 pos = foster->IndexOf(table);
|
||||
|
||||
nsIContent* previousSibling = foster->GetChildAt(pos - 1);
|
||||
|
||||
nsIContent* previousSibling = table->GetPreviousSibling();
|
||||
if (previousSibling && previousSibling->IsNodeOfType(nsINode::eTEXT)) {
|
||||
return AppendTextToTextNode(buffer,
|
||||
length,
|
||||
|
||||
Reference in New Issue
Block a user