Disable HTML5 parser by default

This commit is contained in:
Henri Sivonen 2009-06-15 10:17:52 +03:00
parent 16e2287315
commit 40382651ff
3 changed files with 6 additions and 3 deletions

View File

@ -3591,7 +3591,7 @@ nsContentUtils::CreateContextualFragment(nsIDOMNode* aContextNode,
nsCOMPtr<nsIHTMLDocument> htmlDoc(do_QueryInterface(document));
PRBool bHTML = htmlDoc && !bCaseSensitive;
if (bHTML && nsContentUtils::GetBoolPref("html5.enable", PR_TRUE)) {
if (bHTML && nsContentUtils::GetBoolPref("html5.enable", PR_FALSE)) {
// See if the document has a cached fragment parser. nsHTMLDocument is the
// only one that should really have one at the moment.
nsCOMPtr<nsIParser> parser = document->GetFragmentParser();

View File

@ -656,7 +656,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
PRBool aReset,
nsIContentSink* aSink)
{
PRBool loadAsHtml5 = nsContentUtils::GetBoolPref("html5.enable", PR_TRUE);
PRBool loadAsHtml5 = nsContentUtils::GetBoolPref("html5.enable", PR_FALSE);
if (aSink) {
loadAsHtml5 = PR_FALSE;
}
@ -1806,7 +1806,7 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
}
PRBool loadAsHtml5 = nsContentUtils::GetBoolPref("html5.enable", PR_TRUE);
PRBool loadAsHtml5 = nsContentUtils::GetBoolPref("html5.enable", PR_FALSE);
nsresult rv = NS_OK;

View File

@ -2733,3 +2733,6 @@ pref("mozilla.widget.disable-native-theme", true);
// Enable/Disable the geolocation API for content
pref("geo.enabled", true);
// Enable/Disable HTML5 parser
pref("html5.enable", false);