Fixed Bugs:
20087 - [PDT+] Fixed by synchronizing the stacks, in parser and content sink when FORM behaved as a container. 25202 - Fixed a context-mismatch that was caused while handling illegal contents in TABLE. 25658 - Tweaked CanOmit() to be a little picky on omitting misplaced-content in TABLE. 24885 - Removed ADDRESS from being P tag's kid. ( per spec. ) r=pollmann 25880, 21008 - Handling NOTAGS in HEAD. 25749 - SOUND tag is now a non-container and can be contained by flow-entities. ( per spec. ) 22913 - Fixed by not allowing BLOCKQUOTE to be a child of PRE ( as per spec. ) r=rickg r=vidur - For changes in content sink. Did some performace work in nsHTMLTokenizer and nsHTMLTokens. GIST: Avoiding excessive use of ::strlen() and ::memcpy(). Limiting RecordTrailingContent() usage. r=nisheeth git-svn-id: svn://10.0.0.236/trunk@60502 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -123,6 +123,7 @@ nsHTMLTokenizer::nsHTMLTokenizer(PRInt32 aParseMode,PRBool aPlainText) :
|
||||
NS_INIT_REFCNT();
|
||||
mDoXMLEmptyTags=PR_FALSE;
|
||||
mPlainText=aPlainText;
|
||||
mRecordTrailingContent=PR_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -506,7 +507,13 @@ nsresult nsHTMLTokenizer::ConsumeStartTag(PRUnichar aChar,CToken*& aToken,nsScan
|
||||
*/
|
||||
if(NS_SUCCEEDED(result)) {
|
||||
|
||||
RecordTrailingContent((CStartToken*)aToken,aScanner);
|
||||
//XXX - Find a better soution to record content
|
||||
if(theTag==eHTMLTag_textarea && !mRecordTrailingContent) {
|
||||
mRecordTrailingContent=PR_TRUE;
|
||||
}
|
||||
|
||||
if(mRecordTrailingContent)
|
||||
RecordTrailingContent((CStartToken*)aToken,aScanner);
|
||||
|
||||
if((eHTMLTag_style==theTag) || (eHTMLTag_script==theTag)) {
|
||||
nsAutoString endTag(nsHTMLTags::GetStringValue(theTag));
|
||||
@@ -550,6 +557,9 @@ nsresult nsHTMLTokenizer::ConsumeEndTag(PRUnichar aChar,CToken*& aToken,nsScanne
|
||||
nsresult result=NS_OK;
|
||||
|
||||
if(aToken) {
|
||||
if(aToken->GetTypeID()==eHTMLTag_textarea && mRecordTrailingContent) {
|
||||
mRecordTrailingContent=PR_FALSE;
|
||||
}
|
||||
result= aToken->Consume(aChar,aScanner,mParseMode); //tell new token to finish consuming text...
|
||||
AddToken(aToken,result,&mTokenDeque,theRecycler);
|
||||
} //if
|
||||
|
||||
Reference in New Issue
Block a user