Bug 482921 part 0.5 - Restore support for using tree op queue to set document charset. r=bzbarsky.
This commit is contained in:
@@ -127,6 +127,7 @@ nsHtml5TreeOperation::~nsHtml5TreeOperation()
|
||||
case eTreeOpAppendCommentToDocument:
|
||||
delete[] mTwo.unicharPtr;
|
||||
break;
|
||||
case eTreeOpSetDocumentCharset:
|
||||
case eTreeOpNeedsCharsetSwitchTo:
|
||||
delete[] mOne.charPtr;
|
||||
break;
|
||||
@@ -632,6 +633,13 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
|
||||
aBuilder->FlushPendingAppendNotifications();
|
||||
return rv;
|
||||
}
|
||||
case eTreeOpSetDocumentCharset: {
|
||||
char* str = mOne.charPtr;
|
||||
PRInt32 charsetSource = mInt;
|
||||
nsDependentCString dependentString(str);
|
||||
aBuilder->SetDocumentCharsetAndSource(dependentString, charsetSource);
|
||||
return rv;
|
||||
}
|
||||
case eTreeOpNeedsCharsetSwitchTo: {
|
||||
char* str = mOne.charPtr;
|
||||
PRInt32 charsetSource = mInt;
|
||||
|
||||
Reference in New Issue
Block a user