зеркало из https://github.com/mozilla/gecko-dev.git
fixed bug 9905
This commit is contained in:
Родитель
8b79ce996e
Коммит
8105488cc3
|
@ -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;}
|
||||
|
|
Загрузка…
Ссылка в новой задаче