Bug 574089 - Optimize ::GetInnerHTML, r=jst
This commit is contained in:
@@ -342,7 +342,7 @@ nsHTMLDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,
|
||||
// Make the content type default to "text/html", we are a HTML
|
||||
// document, after all. Once we start getting data, this may be
|
||||
// changed.
|
||||
mContentType = "text/html";
|
||||
SetContentTypeInternal(nsDependentCString("text/html"));
|
||||
}
|
||||
|
||||
nsStyleSet::sheetType
|
||||
@@ -2035,7 +2035,7 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
|
||||
}
|
||||
|
||||
// This will be propagated to the parser when someone actually calls write()
|
||||
mContentType = aContentType;
|
||||
SetContentTypeInternal(aContentType);
|
||||
|
||||
mWriteState = eDocumentOpened;
|
||||
|
||||
@@ -2134,7 +2134,7 @@ nsHTMLDocument::Close()
|
||||
|
||||
++mWriteLevel;
|
||||
rv = mParser->Parse(EmptyString(), mParser->GetRootContextKey(),
|
||||
mContentType, PR_TRUE);
|
||||
GetContentTypeInternal(), PR_TRUE);
|
||||
--mWriteLevel;
|
||||
|
||||
// XXX Make sure that all the document.written content is
|
||||
@@ -2234,11 +2234,11 @@ nsHTMLDocument::WriteCommon(const nsAString& aText,
|
||||
// why pay that price when we don't need to?
|
||||
if (aNewlineTerminate) {
|
||||
rv = mParser->Parse(aText + new_line,
|
||||
key, mContentType,
|
||||
key, GetContentTypeInternal(),
|
||||
(mWriteState == eNotWriting || (mWriteLevel > 1)));
|
||||
} else {
|
||||
rv = mParser->Parse(aText,
|
||||
key, mContentType,
|
||||
key, GetContentTypeInternal(),
|
||||
(mWriteState == eNotWriting || (mWriteLevel > 1)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user