This commit is contained in:
rickg%netscape.com 1999-07-18 03:46:21 +00:00
Родитель 8b79ce996e
Коммит 8105488cc3
6 изменённых файлов: 76 добавлений и 4 удалений

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

@ -847,7 +847,7 @@ PRInt32 GetIndexOfChildOrSynonym(nsEntryStack& aTagStack,eHTMLTags aChildTag) {
}
else{
theChildIndex=aTagStack.GetCount();
PRInt32 theGroup=gHTMLElements[aChildTag].mParentBits;
PRInt32 theGroup=nsHTMLElement::GetSynonymousGroups(gHTMLElements[aChildTag].mParentBits);
while(-1<--theChildIndex) {
eHTMLTags theTag=aTagStack[theChildIndex];
if(gHTMLElements[theTag].IsMemberOf(theGroup)) {

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

@ -1218,6 +1218,41 @@ public:
};
CTableInitializer gTableInitializer;
int nsHTMLElement::GetSynonymousGroups(int aGroup) {
int result=0;
switch(aGroup) {
case kPhrase:
case kSpecial:
case kFontStyle:
result=aGroup;
break;
case kHTMLContent:
case kHeadContent:
case kHeadMisc:
case kFormControl:
case kPreformatted:
case kHeading:
case kBlockMisc:
case kBlock:
case kList:
case kPCDATA:
case kExtensions:
case kTable:
case kSelf:
case kInlineEntity:
case kBlockEntity:
case kFlowEntity:
case kAllTags:
default:
break;
}
return result;
}
/**
*
* @update gess12/13/98

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

@ -77,12 +77,13 @@ struct nsHTMLElement {
static PRBool IsInlineEntity(eHTMLTags aTag);
static PRBool IsFlowEntity(eHTMLTags aTag);
static PRBool IsBlockCloser(eHTMLTags aTag);
static int GetSynonymousGroups(int aGroup);
CTagList* GetSynonymousTags(void) const {return mSynonymousTags;}
CTagList* GetRootTags(void) const {return mRootNodes;}
CTagList* GetEndRootTags(void) const {return mEndRootNodes;}
CTagList* GetAutoCloseStartTags(void) const {return mAutocloseStart;}
CTagList* GetAutoCloseEndTags(void) const {return mAutocloseEnd;}
CTagList* GetSynonymousTags(void) const {return mSynonymousTags;}
eHTMLTags GetCloseTargetForEndTag(nsEntryStack& aTagStack,PRInt32 anIndex) const;
CTagList* GetSpecialChildren(void) const {return mSpecialKids;}

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

@ -847,7 +847,7 @@ PRInt32 GetIndexOfChildOrSynonym(nsEntryStack& aTagStack,eHTMLTags aChildTag) {
}
else{
theChildIndex=aTagStack.GetCount();
PRInt32 theGroup=gHTMLElements[aChildTag].mParentBits;
PRInt32 theGroup=nsHTMLElement::GetSynonymousGroups(gHTMLElements[aChildTag].mParentBits);
while(-1<--theChildIndex) {
eHTMLTags theTag=aTagStack[theChildIndex];
if(gHTMLElements[theTag].IsMemberOf(theGroup)) {

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

@ -1218,6 +1218,41 @@ public:
};
CTableInitializer gTableInitializer;
int nsHTMLElement::GetSynonymousGroups(int aGroup) {
int result=0;
switch(aGroup) {
case kPhrase:
case kSpecial:
case kFontStyle:
result=aGroup;
break;
case kHTMLContent:
case kHeadContent:
case kHeadMisc:
case kFormControl:
case kPreformatted:
case kHeading:
case kBlockMisc:
case kBlock:
case kList:
case kPCDATA:
case kExtensions:
case kTable:
case kSelf:
case kInlineEntity:
case kBlockEntity:
case kFlowEntity:
case kAllTags:
default:
break;
}
return result;
}
/**
*
* @update gess12/13/98

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

@ -77,12 +77,13 @@ struct nsHTMLElement {
static PRBool IsInlineEntity(eHTMLTags aTag);
static PRBool IsFlowEntity(eHTMLTags aTag);
static PRBool IsBlockCloser(eHTMLTags aTag);
static int GetSynonymousGroups(int aGroup);
CTagList* GetSynonymousTags(void) const {return mSynonymousTags;}
CTagList* GetRootTags(void) const {return mRootNodes;}
CTagList* GetEndRootTags(void) const {return mEndRootNodes;}
CTagList* GetAutoCloseStartTags(void) const {return mAutocloseStart;}
CTagList* GetAutoCloseEndTags(void) const {return mAutocloseEnd;}
CTagList* GetSynonymousTags(void) const {return mSynonymousTags;}
eHTMLTags GetCloseTargetForEndTag(nsEntryStack& aTagStack,PRInt32 anIndex) const;
CTagList* GetSpecialChildren(void) const {return mSpecialKids;}