Bug 499844; r=peterv

--HG--
extra : rebase_source : 867ce45fa9da2063a36d88966d0fa1b207311e6e
This commit is contained in:
Ehsan Akhgari 2010-01-15 12:17:44 -05:00
parent 8ea3d49ec0
commit c5b97c5208

View File

@ -4196,7 +4196,19 @@ nsHTMLEditRules::WillOutdent(nsISelection *aSelection, PRBool *aCancel, PRBool *
if (NS_FAILED(res)) return res;
}
else if (useCSS) {
RelativeChangeIndentationOfElementNode(curNode, -1);
nsCOMPtr<nsIDOMElement> element;
nsCOMPtr<nsIDOMText> textNode = do_QueryInterface(curNode);
if (textNode) {
// We want to outdent the parent of text nodes
nsCOMPtr<nsIDOMNode> parent;
textNode->GetParentNode(getter_AddRefs(parent));
element = do_QueryInterface(parent);
} else {
element = do_QueryInterface(curNode);
}
if (element) {
RelativeChangeIndentationOfElementNode(element, -1);
}
}
}
}