Mozilla.org bug 210658:

Fix hanging with non-standard HTML elements parsererror, sourcetext.
This commit is contained in:
naddy 2005-10-19 15:21:21 +00:00
parent 79f5804452
commit 7a6b27f1d2
6 changed files with 125 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.93 2005/10/14 04:00:38 kurt Exp $
# $OpenBSD: Makefile,v 1.94 2005/10/19 15:21:21 naddy Exp $
ONLY_FOR_ARCHS= alpha i386 sparc sparc64 amd64 powerpc
@ -7,8 +7,8 @@ COMMENT-devel= "devel files for Gecko"
VER= 1.7.12
DISTNAME= mozilla
PKGNAME= mozilla-${VER}p2
PKGNAME-devel= mozilla-devel-${VER}p2
PKGNAME= mozilla-${VER}p3
PKGNAME-devel= mozilla-devel-${VER}p3
DISTFILES= mozilla-${VER}-source.tar.bz2
SO_VERSION= 5.0
# NOTE: Must bump minor version if any shlib's are removed from the

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-htmlparser_public_nsHTMLTagList_h,v 1.1 2005/10/19 15:21:21 naddy Exp $
--- htmlparser/public/nsHTMLTagList.h.orig Fri Jun 4 17:29:24 2004
+++ htmlparser/public/nsHTMLTagList.h Wed Oct 19 15:11:46 2005
@@ -141,7 +141,6 @@ HTML_TAG(optgroup, OptGroup)
HTML_TAG(option, Option)
HTML_TAG(p, Paragraph)
HTML_TAG(param, SharedLeaf)
-HTML_TAG(parsererror, Div)
HTML_TAG(plaintext, Span)
HTML_TAG(pre, Pre)
HTML_TAG(q, Quote)
@@ -152,7 +151,6 @@ HTML_TAG(select, Select)
HTML_TAG(server, Span)
HTML_TAG(small, Span)
HTML_TAG(sound, Span)
-HTML_TAG(sourcetext, Div)
HTML_TAG(spacer, SharedLeaf)
HTML_TAG(span, Span)
HTML_TAG(strike, Span)

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-htmlparser_src_COtherElements_h,v 1.1 2005/10/19 15:21:21 naddy Exp $
--- htmlparser/src/COtherElements.h.orig Wed Jul 2 00:21:20 2003
+++ htmlparser/src/COtherElements.h Wed Oct 19 15:11:46 2005
@@ -2346,7 +2346,6 @@ void CElementTable::InitializeElements()
mDfltElements[eHTMLTag_p].mContainsGroups.mBits.mSelf=0;
CElement::InitializeLeaf( mDfltElements[eHTMLTag_param], eHTMLTag_param, CElement::GetEmptyGroup(), CLeafElement::GetContainedGroups());
- CBlockElement::Initialize( mDfltElements[eHTMLTag_parsererror],eHTMLTag_parsererror);
CElement::Initialize( mDfltElements[eHTMLTag_plaintext], eHTMLTag_plaintext);
CBlockElement::Initialize( mDfltElements[eHTMLTag_pre], eHTMLTag_pre);
mDfltElements[eHTMLTag_pre].mExcludeKids=kPreExcludeKids;
@@ -2366,7 +2365,6 @@ void CElementTable::InitializeElements()
CElement::Initialize( mDfltElements[eHTMLTag_server], eHTMLTag_server);
CFontStyleElement::Initialize( mDfltElements[eHTMLTag_small], eHTMLTag_small);
- CElement::Initialize( mDfltElements[eHTMLTag_sourcetext], eHTMLTag_sourcetext);
CElement::Initialize( mDfltElements[eHTMLTag_spacer], eHTMLTag_spacer);
CSpecialElement::Initialize( mDfltElements[eHTMLTag_span], eHTMLTag_span);
CFontStyleElement::Initialize( mDfltElements[eHTMLTag_strike], eHTMLTag_strike);

View File

@ -0,0 +1,35 @@
$OpenBSD: patch-htmlparser_src_nsElementTable_cpp,v 1.1 2005/10/19 15:21:21 naddy Exp $
--- htmlparser/src/nsElementTable.cpp.orig Sat Apr 10 06:08:26 2004
+++ htmlparser/src/nsElementTable.cpp Wed Oct 19 15:11:46 2005
@@ -934,15 +934,6 @@ void InitializeElementTable(void) {
/*special parents,kids,skip*/ &gParamParents,0,eHTMLTag_unknown);
Initialize(
- /*tag*/ eHTMLTag_parsererror,
- /*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
- /*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
- /*autoclose starttags and endtags*/ &gDivAutoClose,0,0,0,
- /*parent,incl,exclgroups*/ kNone, (kSelf|kFlowEntity), kNone,
- /*special props, prop-range*/ 0, kNoPropRange,
- /*special parents,kids,skip*/ 0,0,eHTMLTag_unknown);
-
- Initialize(
/*tag*/ eHTMLTag_plaintext,
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
/*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
@@ -1031,15 +1022,6 @@ void InitializeElementTable(void) {
/*autoclose starttags and endtags*/ 0,0,0,0,
/*parent,incl,exclgroups*/ (kFlowEntity|kHeadContent), kNone, kNone, // Added kFlowEntity|kHeadContent & kNonContainer in
/*special props, prop-range*/ kNonContainer,kDefaultPropRange, // Ref. to Bug 25749
- /*special parents,kids,skip*/ 0,0,eHTMLTag_unknown);
-
- Initialize(
- /*tag*/ eHTMLTag_sourcetext,
- /*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
- /*rootnodes,endrootnodes*/ &gRootTags,&gRootTags,
- /*autoclose starttags and endtags*/ &gDivAutoClose,0,0,0,
- /*parent,incl,exclgroups*/ kNone, (kSelf|kFlowEntity), kNone,
- /*special props, prop-range*/ 0,kDefaultPropRange,
/*special parents,kids,skip*/ 0,0,eHTMLTag_unknown);
Initialize(

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-htmlparser_src_nsHTMLTags_cpp,v 1.1 2005/10/19 15:21:21 naddy Exp $
--- htmlparser/src/nsHTMLTags.cpp.orig Wed Feb 18 01:15:49 2004
+++ htmlparser/src/nsHTMLTags.cpp Wed Oct 19 15:11:46 2005
@@ -200,8 +200,6 @@ static const PRUnichar sHTMLTagUnicodeNa
{'p', '\0'};
static const PRUnichar sHTMLTagUnicodeName_param[] =
{'p', 'a', 'r', 'a', 'm', '\0'};
-static const PRUnichar sHTMLTagUnicodeName_parsererror[] =
- {'p', 'a', 'r', 's', 'e', 'r', 'e', 'r', 'r', 'o', 'r', '\0'};
static const PRUnichar sHTMLTagUnicodeName_plaintext[] =
{'p', 'l', 'a', 'i', 'n', 't', 'e', 'x', 't', '\0'};
static const PRUnichar sHTMLTagUnicodeName_pre[] =
@@ -222,8 +220,6 @@ static const PRUnichar sHTMLTagUnicodeNa
{'s', 'm', 'a', 'l', 'l', '\0'};
static const PRUnichar sHTMLTagUnicodeName_sound[] =
{'s', 'o', 'u', 'n', 'd', '\0'};
-static const PRUnichar sHTMLTagUnicodeName_sourcetext[] =
- {'s', 'o', 'u', 'r', 'c', 'e', 't', 'e', 'x', 't', '\0'};
static const PRUnichar sHTMLTagUnicodeName_spacer[] =
{'s', 'p', 'a', 'c', 'e', 'r', '\0'};
static const PRUnichar sHTMLTagUnicodeName_span[] =
@@ -311,7 +307,7 @@ HTMLTagsKeyCompareUCPtr(const void *key1
static PRUint32 sMaxTagNameLength;
-#define NS_HTMLTAG_NAME_MAX_LENGTH 11
+#define NS_HTMLTAG_NAME_MAX_LENGTH 10
// static
nsresult

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-htmlparser_tools_gentags_pl,v 1.1 2005/10/19 15:21:21 naddy Exp $
--- htmlparser/tools/gentags.pl.orig Tue Oct 23 03:36:53 2001
+++ htmlparser/tools/gentags.pl Wed Oct 19 15:11:46 2005
@@ -104,7 +104,6 @@ $tags[$i++] = "optgroup";
$tags[$i++] = "option";
$tags[$i++] = "p";
$tags[$i++] = "param";
-$tags[$i++] = "parsererror";
$tags[$i++] = "plaintext";
$tags[$i++] = "pre";
$tags[$i++] = "q";
@@ -115,7 +114,6 @@ $tags[$i++] = "select";
$tags[$i++] = "server";
$tags[$i++] = "small";
$tags[$i++] = "sound";
-$tags[$i++] = "sourcetext";
$tags[$i++] = "spacer";
$tags[$i++] = "span";
$tags[$i++] = "strike";