зеркало из https://github.com/mozilla/gecko-dev.git
fix for 17056: making a list in empty doc didnt work; also making a new list item didn't work. r=floppy moose
This commit is contained in:
Родитель
73299b260d
Коммит
5996f2a7f1
|
@ -1785,8 +1785,9 @@ nsHTMLEditRules::IsEmptyNode(nsIDOMNode *aNode, PRBool *outIsEmptyNode)
|
|||
// then we dont call it empty (it's an <hr>, or <br>, etc).
|
||||
// Also, if it's an anchor then dont treat it as empty - even though
|
||||
// anchors are containers, named anchors are "empty" but we don't
|
||||
// want to treat them as such.
|
||||
if (!mEditor->IsContainer(aNode) || IsAnchor(aNode))
|
||||
// want to treat them as such. Also, don't call ListItems empty:
|
||||
// empty list items still render and might be wanted.
|
||||
if (!mEditor->IsContainer(aNode) || IsAnchor(aNode) || IsListItem(aNode))
|
||||
{
|
||||
*outIsEmptyNode = PR_FALSE;
|
||||
return NS_OK;
|
||||
|
|
|
@ -1785,8 +1785,9 @@ nsHTMLEditRules::IsEmptyNode(nsIDOMNode *aNode, PRBool *outIsEmptyNode)
|
|||
// then we dont call it empty (it's an <hr>, or <br>, etc).
|
||||
// Also, if it's an anchor then dont treat it as empty - even though
|
||||
// anchors are containers, named anchors are "empty" but we don't
|
||||
// want to treat them as such.
|
||||
if (!mEditor->IsContainer(aNode) || IsAnchor(aNode))
|
||||
// want to treat them as such. Also, don't call ListItems empty:
|
||||
// empty list items still render and might be wanted.
|
||||
if (!mEditor->IsContainer(aNode) || IsAnchor(aNode) || IsListItem(aNode))
|
||||
{
|
||||
*outIsEmptyNode = PR_FALSE;
|
||||
return NS_OK;
|
||||
|
|
Загрузка…
Ссылка в новой задаче