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:
jfrancis%netscape.com 1999-10-27 23:44:33 +00:00
Родитель 73299b260d
Коммит 5996f2a7f1
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -1785,8 +1785,9 @@ nsHTMLEditRules::IsEmptyNode(nsIDOMNode *aNode, PRBool *outIsEmptyNode)
// then we dont call it empty (it's an <hr>, or <br>, etc). // 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 // 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 // anchors are containers, named anchors are "empty" but we don't
// want to treat them as such. // want to treat them as such. Also, don't call ListItems empty:
if (!mEditor->IsContainer(aNode) || IsAnchor(aNode)) // empty list items still render and might be wanted.
if (!mEditor->IsContainer(aNode) || IsAnchor(aNode) || IsListItem(aNode))
{ {
*outIsEmptyNode = PR_FALSE; *outIsEmptyNode = PR_FALSE;
return NS_OK; 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). // 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 // 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 // anchors are containers, named anchors are "empty" but we don't
// want to treat them as such. // want to treat them as such. Also, don't call ListItems empty:
if (!mEditor->IsContainer(aNode) || IsAnchor(aNode)) // empty list items still render and might be wanted.
if (!mEditor->IsContainer(aNode) || IsAnchor(aNode) || IsListItem(aNode))
{ {
*outIsEmptyNode = PR_FALSE; *outIsEmptyNode = PR_FALSE;
return NS_OK; return NS_OK;