зеркало из https://github.com/mozilla/pjs.git
14731: only insert formatting whitespace for block nodes
This commit is contained in:
Родитель
770ed40a0a
Коммит
500da59343
|
@ -1033,6 +1033,15 @@ nsEditor::InsertFormattingForNode(nsIDOMNode* aNode)
|
|||
if (nodeType != nsIDOMNode::ELEMENT_NODE)
|
||||
return NS_OK;
|
||||
|
||||
// Insert formatting only for block nodes
|
||||
// (would it be better to insert for any non-inline node?)
|
||||
PRBool block;
|
||||
res = IsNodeBlock(aNode, block);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
if (!block)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> parent;
|
||||
res = aNode->GetParentNode(getter_AddRefs(parent));
|
||||
if (NS_FAILED(res))
|
||||
|
|
|
@ -1033,6 +1033,15 @@ nsEditor::InsertFormattingForNode(nsIDOMNode* aNode)
|
|||
if (nodeType != nsIDOMNode::ELEMENT_NODE)
|
||||
return NS_OK;
|
||||
|
||||
// Insert formatting only for block nodes
|
||||
// (would it be better to insert for any non-inline node?)
|
||||
PRBool block;
|
||||
res = IsNodeBlock(aNode, block);
|
||||
if (NS_FAILED(res))
|
||||
return res;
|
||||
if (!block)
|
||||
return NS_OK;
|
||||
|
||||
nsCOMPtr<nsIDOMNode> parent;
|
||||
res = aNode->GetParentNode(getter_AddRefs(parent));
|
||||
if (NS_FAILED(res))
|
||||
|
|
Загрузка…
Ссылка в новой задаче