Bug 525094 - Avoid shadowing member fields with local variables in the HTML5 parser. rs=sicking.

--HG--
extra : rebase_source : bb52f6d5f9e335a7473524c6acc410b62b3c0863
This commit is contained in:
Henri Sivonen 2009-12-15 15:19:09 +02:00
Родитель 99a291f6e5
Коммит 0609f873d9
4 изменённых файлов: 4 добавлений и 17 удалений

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

@ -222,18 +222,6 @@ nsHtml5Tokenizer::appendStrBuf(PRUnichar c)
strBuf[strBufLen++] = c;
}
void
nsHtml5Tokenizer::appendStrBufForceWrite(PRUnichar c)
{
if (strBufLen == strBuf.length) {
jArray<PRUnichar,PRInt32> newBuf = jArray<PRUnichar,PRInt32>(strBuf.length + NS_HTML5TOKENIZER_BUFFER_GROW_BY);
nsHtml5ArrayCopy::arraycopy(strBuf, newBuf, strBuf.length);
strBuf.release();
strBuf = newBuf;
}
strBuf[strBufLen++] = c;
}
nsString*
nsHtml5Tokenizer::strBufToString()
{
@ -413,8 +401,8 @@ void
nsHtml5Tokenizer::addAttributeWithValue()
{
if (!!attributeName) {
nsString* value = longStrBufToString();
attributes->addAttribute(attributeName, value);
nsString* val = longStrBufToString();
attributes->addAttribute(attributeName, val);
attributeName = nsnull;
}
}

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

@ -160,7 +160,6 @@ class nsHtml5Tokenizer
void clearStrBufAndAppendForceWrite(PRUnichar c);
void clearStrBufForNextState();
void appendStrBuf(PRUnichar c);
void appendStrBufForceWrite(PRUnichar c);
protected:
nsString* strBufToString();
private:

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

@ -2990,7 +2990,7 @@ nsHtml5TreeBuilder::resetTheInsertionMode()
} else if (nsHtml5Atoms::table == name) {
mode = NS_HTML5TREE_BUILDER_IN_TABLE;
return;
} else if (kNameSpaceID_XHTML != node->ns) {
} else if (kNameSpaceID_XHTML != ns) {
foreignFlag = NS_HTML5TREE_BUILDER_IN_FOREIGN;
mode = NS_HTML5TREE_BUILDER_IN_BODY;
return;

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

@ -198,7 +198,7 @@ class nsHtml5TreeBuilder : public nsAHtml5TreeBuilderState
void appendCommentToDocument(PRUnichar* buf, PRInt32 start, PRInt32 length);
void addAttributesToElement(nsIContent** element, nsHtml5HtmlAttributes* attributes);
void markMalformedIfScript(nsIContent** elt);
void start(PRBool fragment);
void start(PRBool fragmentMode);
void end();
void appendDoctypeToDocument(nsIAtom* name, nsString* publicIdentifier, nsString* systemIdentifier);
void elementPushed(PRInt32 ns, nsIAtom* name, nsIContent** node);