Bug 824926 Make relative font size change handle nested font size tags correctly r=ehsan

This commit is contained in:
Neil Rashbrook 2012-12-31 21:49:49 +00:00
parent a8d4016164
commit 15ad5a16df

View File

@ -1783,9 +1783,13 @@ nsHTMLEditor::RelativeFontChangeHelper(int32_t aSizeChange, nsINode* aNode)
nsresult rv = RelativeFontChangeOnNode(aSizeChange, aNode->GetChildAt(i));
NS_ENSURE_SUCCESS(rv, rv);
}
// RelativeFontChangeOnNode already calls us recursively,
// so we don't need to check our children again.
return NS_OK;
}
// Now cycle through the children.
// Otherwise cycle through the children.
for (uint32_t i = aNode->GetChildCount(); i--; ) {
nsresult rv = RelativeFontChangeHelper(aSizeChange, aNode->GetChildAt(i));
NS_ENSURE_SUCCESS(rv, rv);