diff --git a/mozilla/htmlparser/src/CNavDTD.cpp b/mozilla/htmlparser/src/CNavDTD.cpp
index f4fddf881d0..24d70f0fd73 100644
--- a/mozilla/htmlparser/src/CNavDTD.cpp
+++ b/mozilla/htmlparser/src/CNavDTD.cpp
@@ -4,7 +4,7 @@
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
- *
+ *
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
@@ -13,7 +13,7 @@
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
- * Reserved.
+ * Reserved.
*/
#include "nsDebug.h"
diff --git a/mozilla/htmlparser/src/nsDTDUtils.cpp b/mozilla/htmlparser/src/nsDTDUtils.cpp
index 3550a4549df..11ea4bcdc95 100644
--- a/mozilla/htmlparser/src/nsDTDUtils.cpp
+++ b/mozilla/htmlparser/src/nsDTDUtils.cpp
@@ -18,7 +18,7 @@
#include "nsDTDUtils.h"
-#include "CNavDTD.h"
+#include "CNavDTD.h"
static CTokenDeallocator gTokenKiller;
@@ -147,7 +147,7 @@ eHTMLTags nsTagStack::Last() const {
*/
nsDTDContext::nsDTDContext(int aDefaultSize) {
#ifndef NS_DEBUG
- mStyles =new nsTagStack*[mCapacity];
+ mStyles =new nsTagStack*[aDefaultSize];
#endif
mOpenStyles=0;
nsCRT::zero(mStyles,mTags.mCapacity*sizeof(void*));
@@ -160,9 +160,7 @@ nsDTDContext::nsDTDContext(int aDefaultSize) {
*/
nsDTDContext::~nsDTDContext() {
#ifndef NS_DEBUG
- delete mTags;
delete mStyles;
- mTags=0;
mStyles=0;
#endif
}
diff --git a/mozilla/htmlparser/src/nsDTDUtils.h b/mozilla/htmlparser/src/nsDTDUtils.h
index c5f326c466f..086aa6ca434 100644
--- a/mozilla/htmlparser/src/nsDTDUtils.h
+++ b/mozilla/htmlparser/src/nsDTDUtils.h
@@ -23,6 +23,8 @@
*
*/
+
+
#ifndef DTDUTILS_
#define DTDUTILS_
@@ -51,6 +53,7 @@
void DebugDumpContainmentRules(nsIDTD& theDTD,const char* aFilename,const char* aTitle);
void DebugDumpContainmentRules2(nsIDTD& theDTD,const char* aFilename,const char* aTitle);
+
class nsTagStack {
public:
diff --git a/mozilla/parser/htmlparser/src/CNavDTD.cpp b/mozilla/parser/htmlparser/src/CNavDTD.cpp
index f4fddf881d0..24d70f0fd73 100644
--- a/mozilla/parser/htmlparser/src/CNavDTD.cpp
+++ b/mozilla/parser/htmlparser/src/CNavDTD.cpp
@@ -4,7 +4,7 @@
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
- *
+ *
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
@@ -13,7 +13,7 @@
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
- * Reserved.
+ * Reserved.
*/
#include "nsDebug.h"
diff --git a/mozilla/parser/htmlparser/src/nsDTDUtils.cpp b/mozilla/parser/htmlparser/src/nsDTDUtils.cpp
index 3550a4549df..11ea4bcdc95 100644
--- a/mozilla/parser/htmlparser/src/nsDTDUtils.cpp
+++ b/mozilla/parser/htmlparser/src/nsDTDUtils.cpp
@@ -18,7 +18,7 @@
#include "nsDTDUtils.h"
-#include "CNavDTD.h"
+#include "CNavDTD.h"
static CTokenDeallocator gTokenKiller;
@@ -147,7 +147,7 @@ eHTMLTags nsTagStack::Last() const {
*/
nsDTDContext::nsDTDContext(int aDefaultSize) {
#ifndef NS_DEBUG
- mStyles =new nsTagStack*[mCapacity];
+ mStyles =new nsTagStack*[aDefaultSize];
#endif
mOpenStyles=0;
nsCRT::zero(mStyles,mTags.mCapacity*sizeof(void*));
@@ -160,9 +160,7 @@ nsDTDContext::nsDTDContext(int aDefaultSize) {
*/
nsDTDContext::~nsDTDContext() {
#ifndef NS_DEBUG
- delete mTags;
delete mStyles;
- mTags=0;
mStyles=0;
#endif
}
diff --git a/mozilla/parser/htmlparser/src/nsDTDUtils.h b/mozilla/parser/htmlparser/src/nsDTDUtils.h
index c5f326c466f..086aa6ca434 100644
--- a/mozilla/parser/htmlparser/src/nsDTDUtils.h
+++ b/mozilla/parser/htmlparser/src/nsDTDUtils.h
@@ -23,6 +23,8 @@
*
*/
+
+
#ifndef DTDUTILS_
#define DTDUTILS_
@@ -51,6 +53,7 @@
void DebugDumpContainmentRules(nsIDTD& theDTD,const char* aFilename,const char* aTitle);
void DebugDumpContainmentRules2(nsIDTD& theDTD,const char* aFilename,const char* aTitle);
+
class nsTagStack {
public: