Bug 785131 - Don't process any node when aChildrenOnly is set; r=ehsan

This commit is contained in:
Isaac Aggrey 2012-08-23 12:17:43 -05:00
parent f15d0f1a70
commit a989c54e1d

View File

@ -875,9 +875,13 @@ nsresult nsHTMLEditor::RemoveStyleInside(nsIDOMNode *aNode,
}
}
if (aProperty == nsEditProperty::font && // or node is big or small and we are setting font size
if (!aChildrenOnly &&
(
(aProperty == nsEditProperty::font) && // or node is big or small and we are setting font size
(nsHTMLEditUtils::IsBig(aNode) || nsHTMLEditUtils::IsSmall(aNode)) &&
aAttribute && aAttribute->LowerCaseEqualsLiteral("size")) {
(aAttribute && aAttribute->LowerCaseEqualsLiteral("size"))
)
) {
return RemoveContainer(aNode); // if we are setting font size, remove any nested bigs and smalls
}
return NS_OK;