1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef nsCharsetSource_h_
6 #define nsCharsetSource_h_
8 // note: the value order defines the priority; higher numbers take priority
10 kCharsetUninitialized
,
12 kCharsetFromDocTypeDefault
, // This and up confident for XHR
13 // Start subdividing source for telementry purposes
14 kCharsetFromInitialAutoDetectionASCII
,
15 kCharsetFromInitialAutoDetectionWouldHaveBeenUTF8
,
16 kCharsetFromInitialAutoDetectionWouldNotHaveBeenUTF8Generic
,
17 kCharsetFromInitialAutoDetectionWouldNotHaveBeenUTF8Content
,
18 kCharsetFromInitialAutoDetectionWouldNotHaveBeenUTF8DependedOnTLD
,
19 // Deliberately no Final version of ASCII
20 kCharsetFromFinalAutoDetectionWouldHaveBeenUTF8
,
21 kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8Generic
,
22 kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8Content
,
23 kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8DependedOnTLD
,
24 kCharsetFromFinalAutoDetectionFile
,
25 // End subdividing source for telementry purposes
26 kCharsetFromParentFrame
, // Same-origin parent takes precedence over detector
27 // to avoid breaking tests. (Also, the HTML spec
29 kCharsetFromXmlDeclaration
,
30 kCharsetFromMetaPrescan
, // this one and smaller: HTML5 Tentative
31 kCharsetFromMetaTag
, // this one and greater: HTML5 Confident
33 kCharsetFromOtherComponent
,
34 kCharsetFromPendingUserForcedAutoDetection
, // Marker value to be upgraded
36 kCharsetFromInitialUserForcedAutoDetection
,
37 kCharsetFromFinalUserForcedAutoDetection
,
38 kCharsetFromXmlDeclarationUtf16
, // This one is overridden by
39 // kCharsetFromChannel
40 kCharsetFromIrreversibleAutoDetection
, // This one is overridden by
41 // kCharsetFromChannel
42 kCharsetFromByteOrderMark
,
43 kCharsetFromUtf8OnlyMime
, // For JSON, WebVTT and such
44 kCharsetFromBuiltIn
, // resource: URLs
47 #endif /* nsCharsetSource_h_ */