77746 - Remove style from the style stack on encountering the appropritate end tag.
78202 - Added text-decoration property for GetComputedStyle. 26347 - Anchor ( special element ) should be able to close phrasel elements 78140 - Putting back list-style-image support for getComputedStyle that got removed accidently. r=heikki sr=jst git-svn-id: svn://10.0.0.236/trunk@94319 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -431,6 +431,8 @@ nsresult CNavDTD::WillBuildModel( const CParserContext& aParserContext,nsIConte
|
||||
mParserCommand=aParserContext.mParserCommand;
|
||||
mMimeType=aParserContext.mMimeType;
|
||||
|
||||
mBodyContext->SetNodeAllocator(&mNodeAllocator);
|
||||
|
||||
if((!aParserContext.mPrevContext) && (aSink)) {
|
||||
|
||||
STOP_TIMER();
|
||||
@@ -1978,7 +1980,9 @@ nsresult CNavDTD::HandleEndToken(CToken* aToken) {
|
||||
static eHTMLTags gBarriers[]={eHTMLTag_thead,eHTMLTag_tbody,eHTMLTag_tfoot,eHTMLTag_table};
|
||||
|
||||
if(!FindTagInSet(theParentTag,gBarriers,sizeof(gBarriers)/sizeof(theParentTag))) {
|
||||
PopStyle(theChildTag);
|
||||
if(nsHTMLElement::IsResidualStyleTag(theChildTag)) {
|
||||
mBodyContext->RemoveStyle(theChildTag); // fix bug 77746
|
||||
}
|
||||
}
|
||||
|
||||
// If the bit kHandleStrayTag is set then we automatically open up a matching
|
||||
|
||||
@@ -1105,24 +1105,25 @@ nsCParserNode* nsDTDContext::PopStyle(eHTMLTags aTag){
|
||||
*
|
||||
* @update gess 01/26/00
|
||||
*/
|
||||
nsCParserNode* nsDTDContext::RemoveStyle(eHTMLTags aTag){
|
||||
|
||||
PRInt32 theLevel=0;
|
||||
nsCParserNode* result=0;
|
||||
|
||||
for(theLevel=mStack.mCount-1;theLevel>0;theLevel--) {
|
||||
nsEntryStack *theStack=mStack.mEntries[theLevel].mStyles;
|
||||
if(theStack) {
|
||||
if(aTag==theStack->Last()) {
|
||||
result=theStack->Pop();
|
||||
mResidualStyleCount--;
|
||||
} else {
|
||||
// NS_ERROR("bad residual style entry");
|
||||
void nsDTDContext::RemoveStyle(eHTMLTags aTag){
|
||||
|
||||
PRInt32 theLevel=mStack.mCount;
|
||||
|
||||
while (theLevel) {
|
||||
nsEntryStack *theStack=GetStylesAt(--theLevel);
|
||||
if (theStack) {
|
||||
PRInt32 index=theStack->mCount;
|
||||
while (index){
|
||||
nsTagEntry *theEntry=theStack->EntryAt(--index);
|
||||
if (aTag==(eHTMLTags)theEntry->mNode->GetNodeType()) {
|
||||
mResidualStyleCount--;
|
||||
nsCParserNode* result=theStack->Remove(index,aTag);
|
||||
IF_FREE(result, mNodeAllocator);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
void PushStyles(nsEntryStack *theStyles);
|
||||
nsCParserNode* PopStyle(void);
|
||||
nsCParserNode* PopStyle(eHTMLTags aTag);
|
||||
nsCParserNode* RemoveStyle(eHTMLTags aTag);
|
||||
void RemoveStyle(eHTMLTags aTag);
|
||||
|
||||
static void ReleaseGlobalObjects(void);
|
||||
|
||||
|
||||
@@ -2119,8 +2119,9 @@ eHTMLTags nsHTMLElement::GetCloseTargetForEndTag(nsDTDContext& aContext,PRInt32
|
||||
//phrasal elements can close other phrasals, along with fontstyle and special tags...
|
||||
|
||||
if((eHTMLTag_userdefined==theTag) ||
|
||||
gHTMLElements[theTag].IsSpecialEntity() ||
|
||||
gHTMLElements[theTag].IsFontStyleEntity()) {
|
||||
gHTMLElements[theTag].IsSpecialEntity() ||
|
||||
gHTMLElements[theTag].IsFontStyleEntity()||
|
||||
gHTMLElements[theTag].IsPhraseEntity()) { // Added Phrasel to fix bug 26347
|
||||
continue;
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user