fixing crash in Composer when head sub-elements are displayed; b=162062, r=brade, sr=bzbarsky

This commit is contained in:
glazman%netscape.com 2002-08-13 10:01:52 +00:00
parent b905185769
commit 99c6bd69fb
3 changed files with 5 additions and 0 deletions

View File

@ -122,6 +122,7 @@ public:
static nsIAtom *address;
// Assumed to be block:
static nsIAtom *body;
static nsIAtom *head;
static nsIAtom *tr;
static nsIAtom *td;
static nsIAtom *th;

View File

@ -107,6 +107,7 @@ nsIAtom * nsIEditProperty::table;
nsIAtom * nsIEditProperty::fieldset;
nsIAtom * nsIEditProperty::address;
nsIAtom * nsIEditProperty::body;
nsIAtom * nsIEditProperty::head;
nsIAtom * nsIEditProperty::tr;
nsIAtom * nsIEditProperty::td;
nsIAtom * nsIEditProperty::th;
@ -242,6 +243,7 @@ nsEditProperty::nsEditProperty()
// Unclear from
// DTD, block?
nsIEditProperty::body = NS_NewAtom("body");
nsIEditProperty::head = NS_NewAtom("head");
nsIEditProperty::tr = NS_NewAtom("tr");
nsIEditProperty::td = NS_NewAtom("td");
nsIEditProperty::th = NS_NewAtom("th");
@ -355,6 +357,7 @@ nsEditProperty::~nsEditProperty()
NS_IF_RELEASE(nsIEditProperty::fieldset);
NS_IF_RELEASE(nsIEditProperty::address);
NS_IF_RELEASE(nsIEditProperty::body);
NS_IF_RELEASE(nsIEditProperty::head);
NS_IF_RELEASE(nsIEditProperty::tr);
NS_IF_RELEASE(nsIEditProperty::td);
NS_IF_RELEASE(nsIEditProperty::th);

View File

@ -518,6 +518,7 @@ nsHTMLEditor::NodeIsBlockStatic(nsIDOMNode *aNode, PRBool *aIsBlock)
// Nodes we know we want to treat as block
// even though the parser says they're not:
if (tagAtom==nsIEditProperty::body ||
tagAtom==nsIEditProperty::head ||
tagAtom==nsIEditProperty::tbody ||
tagAtom==nsIEditProperty::thead ||
tagAtom==nsIEditProperty::tfoot ||