Bug 516406 - Make document.write() parser and stream parser have distinct tokenizers in the HTML5 parser. r=bnewman.

This commit is contained in:
Henri Sivonen
2009-09-21 16:18:20 +03:00
parent 4384f2fdf0
commit 2cf48a3ad5
39 changed files with 1546 additions and 614 deletions

View File

@@ -96,6 +96,19 @@ nsHtml5Portability::newCharArrayFromString(nsString* string)
return arr;
}
nsIAtom*
nsHtml5Portability::newLocalFromLocal(nsIAtom* local, nsHtml5AtomTable* interner)
{
NS_PRECONDITION(local, "Atom was null.");
NS_PRECONDITION(interner, "Atom table was null");
if (local->IsStaticAtom()) {
nsAutoString str;
local->ToString(str);
local = interner->GetAtom(str);
}
return local;
}
void
nsHtml5Portability::releaseString(nsString* str)
{
@@ -114,18 +127,6 @@ nsHtml5Portability::releaseLocal(nsIAtom* local)
{
}
// XXX Useless code
void
nsHtml5Portability::retainElement(nsIContent** element)
{
}
// XXX Useless code
void
nsHtml5Portability::releaseElement(nsIContent** element)
{
}
PRBool
nsHtml5Portability::localEqualsBuffer(nsIAtom* local, PRUnichar* buf, PRInt32 offset, PRInt32 length)
{