2012-03-22 18:42:42 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef nsCharsetSource_h_
|
|
|
|
#define nsCharsetSource_h_
|
|
|
|
|
|
|
|
// note: the value order defines the priority; higher numbers take priority
|
2019-06-03 12:13:50 +03:00
|
|
|
enum {
|
|
|
|
kCharsetUninitialized,
|
|
|
|
kCharsetFromFallback,
|
|
|
|
kCharsetFromDocTypeDefault, // This and up confident for XHR
|
2021-01-24 03:11:07 +03:00
|
|
|
// Start subdividing source for telementry purposes
|
|
|
|
kCharsetFromInitialAutoDetectionASCII,
|
2021-01-14 10:06:53 +03:00
|
|
|
kCharsetFromInitialAutoDetectionWouldHaveBeenUTF8,
|
2021-01-24 03:11:07 +03:00
|
|
|
kCharsetFromInitialAutoDetectionWouldNotHaveBeenUTF8Generic,
|
|
|
|
kCharsetFromInitialAutoDetectionWouldNotHaveBeenUTF8Content,
|
|
|
|
kCharsetFromInitialAutoDetectionWouldNotHaveBeenUTF8DependedOnTLD,
|
|
|
|
// Deliberately no Final version of ASCII
|
2021-01-14 10:06:53 +03:00
|
|
|
kCharsetFromFinalAutoDetectionWouldHaveBeenUTF8,
|
2021-01-24 03:11:07 +03:00
|
|
|
kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8Generic,
|
|
|
|
kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8Content,
|
|
|
|
kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8DependedOnTLD,
|
2021-01-14 10:06:53 +03:00
|
|
|
kCharsetFromFinalAutoDetectionFile,
|
2021-01-24 03:11:07 +03:00
|
|
|
// End subdividing source for telementry purposes
|
2019-12-12 20:50:19 +03:00
|
|
|
kCharsetFromParentFrame, // Same-origin parent takes precedence over detector
|
|
|
|
// to avoid breaking tests. (Also, the HTML spec
|
|
|
|
// says so.)
|
2021-03-23 12:52:04 +03:00
|
|
|
kCharsetFromXmlDeclaration,
|
2019-06-03 12:13:50 +03:00
|
|
|
kCharsetFromMetaPrescan, // this one and smaller: HTML5 Tentative
|
|
|
|
kCharsetFromMetaTag, // this one and greater: HTML5 Confident
|
|
|
|
kCharsetFromChannel,
|
|
|
|
kCharsetFromOtherComponent,
|
2021-01-14 10:06:53 +03:00
|
|
|
kCharsetFromInitialUserForcedAutoDetection,
|
|
|
|
kCharsetFromFinalUserForcedAutoDetection,
|
2021-03-23 12:52:04 +03:00
|
|
|
kCharsetFromXmlDeclarationUtf16, // This one is overridden by
|
|
|
|
// kCharsetFromChannel
|
2019-06-03 12:13:50 +03:00
|
|
|
kCharsetFromByteOrderMark,
|
|
|
|
kCharsetFromUtf8OnlyMime, // For JSON, WebVTT and such
|
|
|
|
kCharsetFromBuiltIn, // resource: URLs
|
|
|
|
};
|
2012-03-22 18:42:42 +04:00
|
|
|
|
|
|
|
#endif /* nsCharsetSource_h_ */
|