зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1372994 - Clear up leftover ISO-8859-1 encoding names. r=emk
MozReview-Commit-ID: IBuUPa9H9Q2 --HG-- extra : rebase_source : fb8db0c70caeec179d50b9ecaeb811d1e87eb0dd
This commit is contained in:
Родитель
940c47f97b
Коммит
2f2bb984f8
|
@ -1287,7 +1287,7 @@ nsIDocument::nsIDocument()
|
|||
mBlockAllMixedContentPreloads(false),
|
||||
mUpgradeInsecureRequests(false),
|
||||
mUpgradeInsecurePreloads(false),
|
||||
mCharacterSet(NS_LITERAL_CSTRING("ISO-8859-1")),
|
||||
mCharacterSet(NS_LITERAL_CSTRING("windows-1252")),
|
||||
mCharacterSetSource(0),
|
||||
mParentDocument(nullptr),
|
||||
mCachedRootElement(nullptr),
|
||||
|
|
|
@ -293,7 +293,7 @@ MediaDocument::GetFileName(nsAString& aResult, nsIChannel* aChannel)
|
|||
|
||||
nsAutoCString docCharset;
|
||||
// Now that the charset is set in |StartDocumentLoad| to the charset of
|
||||
// the document viewer instead of a bogus value ("ISO-8859-1" set in
|
||||
// the document viewer instead of a bogus value ("windows-1252" set in
|
||||
// |nsDocument|'s ctor), the priority is given to the current charset.
|
||||
// This is necessary to deal with a media document being opened in a new
|
||||
// window or a new tab, in which case |originCharset| of |nsIURI| is not
|
||||
|
|
|
@ -292,12 +292,12 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel,
|
|||
|
||||
char *bytes;
|
||||
uint32_t bytesLen;
|
||||
NS_NAMED_LITERAL_CSTRING(isoCharset, "ISO-8859-1");
|
||||
NS_NAMED_LITERAL_CSTRING(isoCharset, "windows-1252");
|
||||
NS_NAMED_LITERAL_CSTRING(utf8Charset, "UTF-8");
|
||||
const nsLiteralCString *charset;
|
||||
if (IsISO88591(result)) {
|
||||
// For compatibility, if the result is ISO-8859-1, we use
|
||||
// ISO-8859-1, so that people can compatibly create images
|
||||
// windows-1252, so that people can compatibly create images
|
||||
// using javascript: URLs.
|
||||
bytes = ToNewCString(result);
|
||||
bytesLen = result.Length();
|
||||
|
|
|
@ -1330,7 +1330,7 @@ TextEditor::OutputToString(const nsAString& aFormatType,
|
|||
nsAutoCString charsetStr;
|
||||
rv = GetDocumentCharacterSet(charsetStr);
|
||||
if (NS_FAILED(rv) || charsetStr.IsEmpty()) {
|
||||
charsetStr.AssignLiteral("ISO-8859-1");
|
||||
charsetStr.AssignLiteral("windows-1252");
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocumentEncoder> encoder =
|
||||
|
|
|
@ -152,7 +152,7 @@ nsParser::Initialize(bool aConstructor)
|
|||
|
||||
mContinueEvent = nullptr;
|
||||
mCharsetSource = kCharsetUninitialized;
|
||||
mCharset.AssignLiteral("ISO-8859-1");
|
||||
mCharset.AssignLiteral("windows-1252");
|
||||
mInternalState = NS_OK;
|
||||
mStreamStatus = NS_OK;
|
||||
mCommand = eViewNormal;
|
||||
|
|
|
@ -112,7 +112,8 @@ const NEW_LINES = /(\r\n|\r|\n)/;
|
|||
const MAX_ICON_SIZE = 10000;
|
||||
|
||||
// Default charset to use for sending search parameters. ISO-8859-1 is used to
|
||||
// match previous nsInternetSearchService behavior.
|
||||
// match previous nsInternetSearchService behavior as a URL parameter. Label
|
||||
// resolution causes windows-1252 to be actually used.
|
||||
const DEFAULT_QUERY_CHARSET = "ISO-8859-1";
|
||||
|
||||
const SEARCH_BUNDLE = "chrome://global/locale/search/search.properties";
|
||||
|
|
|
@ -551,8 +551,8 @@ nsHTTPIndex::CommonInit()
|
|||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// set initial/default encoding to ISO-8859-1 (not UTF-8)
|
||||
mEncoding = "ISO-8859-1";
|
||||
// set initial/default encoding to windows-1252 (not UTF-8)
|
||||
mEncoding = "windows-1252";
|
||||
|
||||
mDirRDF = do_GetService(kRDFServiceCID, &rv);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get RDF service");
|
||||
|
@ -603,8 +603,8 @@ nsHTTPIndex::Init()
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
// set initial/default encoding to ISO-8859-1 (not UTF-8)
|
||||
mEncoding = "ISO-8859-1";
|
||||
// set initial/default encoding to windows-1252 (not UTF-8)
|
||||
mEncoding = "windows-1252";
|
||||
|
||||
rv = CommonInit();
|
||||
if (NS_FAILED(rv)) return(rv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче