mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 12:45:27 +00:00
Bug 499844; r=peterv
--HG-- extra : rebase_source : 867ce45fa9da2063a36d88966d0fa1b207311e6e
This commit is contained in:
parent
8ea3d49ec0
commit
c5b97c5208
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user