author | Isaac Aggrey <isaac.aggrey@gmail.com> |
Thu, 23 Aug 2012 12:17:43 -0500 | |
changeset 104540 | f9c3f1cd372ab0a7f8f908d30ab1c44268f8d748 |
parent 104539 | 3a3ce017ee826223693b13d4623124faa0060582 |
child 104541 | f6ad22f8f7b2d890a92bf64c42172c2b1bf0b98a |
push id | 14551 |
push user | eakhgari@mozilla.com |
push date | Fri, 07 Sep 2012 02:33:54 +0000 |
treeherder | mozilla-inbound@f9c3f1cd372a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | ehsan |
bugs | 785131 |
milestone | 18.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/editor/libeditor/html/nsHTMLEditorStyle.cpp +++ b/editor/libeditor/html/nsHTMLEditorStyle.cpp @@ -870,19 +870,23 @@ nsresult nsHTMLEditor::RemoveStyleInside &propertyValue, false); // remove the node if it is a span or font, if its style attribute is // empty or absent, and if it does not have a class nor an id RemoveElementIfNoStyleOrIdOrClass(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; } bool nsHTMLEditor::IsOnlyAttribute(nsIDOMNode *aNode, const nsAString *aAttribute) {