Bug 499844; r=peterv a19=beltzner

git-svn-id: svn://10.0.0.236/trunk@259857 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ehsan.akhgari%gmail.com 2010-03-01 21:05:40 +00:00
parent 1121fde6c4
commit 5323722f17

View File

@ -4125,7 +4125,19 @@ nsHTMLEditRules::WillOutdent(nsISelection *aSelection, PRBool *aCancel, PRBool *
if (NS_FAILED(res)) return res; if (NS_FAILED(res)) return res;
} }
else if (useCSS) { 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);
}
} }
} }
} }