зеркало из https://github.com/mozilla/gecko-dev.git
Fixing regressions: In order to update the expat buffer position correctly do not block after processing a start element. b=119399, r=heikki, sr=jst. Update the expat buffer position if we're blocked after processing the end element. b=119727, r=heikki, sr=jst
This commit is contained in:
Родитель
8a762c6e37
Коммит
974467d75c
|
@ -1500,6 +1500,7 @@ doContent(XML_Parser parser,
|
|||
}
|
||||
endElementHandler(handlerArg, tag->name.str);
|
||||
if (blocked) {
|
||||
*eventPP = s = next; /* fix bug 119727 */
|
||||
return XML_ERROR_PARSER_BLOCKED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -378,15 +378,10 @@ nsExpatDriver::HandleStartElement(const PRUnichar *aValue,
|
|||
NS_ASSERTION(mSink, "content sink not found!");
|
||||
|
||||
if (mSink){
|
||||
nsresult result = mSink->HandleStartElement(aValue, aAtts,
|
||||
XML_GetSpecifiedAttributeCount(mExpatParser) / 2,
|
||||
XML_GetIdAttributeIndex(mExpatParser),
|
||||
XML_GetCurrentLineNumber(mExpatParser));
|
||||
|
||||
if (result == NS_ERROR_HTMLPARSER_BLOCK) {
|
||||
mInternalState = NS_ERROR_HTMLPARSER_BLOCK;
|
||||
XML_BlockParser(mExpatParser);
|
||||
}
|
||||
mSink->HandleStartElement(aValue, aAtts,
|
||||
XML_GetSpecifiedAttributeCount(mExpatParser) / 2,
|
||||
XML_GetIdAttributeIndex(mExpatParser),
|
||||
XML_GetCurrentLineNumber(mExpatParser));
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1500,6 +1500,7 @@ doContent(XML_Parser parser,
|
|||
}
|
||||
endElementHandler(handlerArg, tag->name.str);
|
||||
if (blocked) {
|
||||
*eventPP = s = next; /* fix bug 119727 */
|
||||
return XML_ERROR_PARSER_BLOCKED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -378,15 +378,10 @@ nsExpatDriver::HandleStartElement(const PRUnichar *aValue,
|
|||
NS_ASSERTION(mSink, "content sink not found!");
|
||||
|
||||
if (mSink){
|
||||
nsresult result = mSink->HandleStartElement(aValue, aAtts,
|
||||
XML_GetSpecifiedAttributeCount(mExpatParser) / 2,
|
||||
XML_GetIdAttributeIndex(mExpatParser),
|
||||
XML_GetCurrentLineNumber(mExpatParser));
|
||||
|
||||
if (result == NS_ERROR_HTMLPARSER_BLOCK) {
|
||||
mInternalState = NS_ERROR_HTMLPARSER_BLOCK;
|
||||
XML_BlockParser(mExpatParser);
|
||||
}
|
||||
mSink->HandleStartElement(aValue, aAtts,
|
||||
XML_GetSpecifiedAttributeCount(mExpatParser) / 2,
|
||||
XML_GetIdAttributeIndex(mExpatParser),
|
||||
XML_GetCurrentLineNumber(mExpatParser));
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче