Bug 1824490 - Use the end page value rather than the start page value of the previous...
[gecko.git] / parser / nsCharsetSource.h
blob0590883688d3ed2fe9952a07d16cd9ffaf723779
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
9 enum nsCharsetSource {
10 kCharsetUninitialized,
11 kCharsetFromFallback,
12 kCharsetFromDocTypeDefault, // This and up confident for XHR
13 // Start subdividing source for telemetry purposes
14 kCharsetFromInitialAutoDetectionASCII,
15 kCharsetFromInitialAutoDetectionWouldHaveBeenUTF8,
16 kCharsetFromInitialAutoDetectionWouldNotHaveBeenUTF8Generic,
17 kCharsetFromInitialAutoDetectionWouldNotHaveBeenUTF8Content,
18 kCharsetFromInitialAutoDetectionWouldNotHaveBeenUTF8DependedOnTLD,
19 // End subdividing source for telemetry purposes
20 kCharsetFromParentFrame, // Same-origin parent takes precedence over detector
21 // to avoid breaking tests. (Also, the HTML spec
22 // says so.)
23 kCharsetFromXmlDeclaration,
24 kCharsetFromMetaTag,
25 kCharsetFromChannel,
26 kCharsetFromOtherComponent,
27 kCharsetFromInitialUserForcedAutoDetection,
28 // Start subdividing source for telemetry purposes
29 // Deliberately no Final version of ASCII
30 kCharsetFromFinalAutoDetectionWouldHaveBeenUTF8InitialWasASCII,
31 kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8Generic,
32 kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8GenericInitialWasASCII,
33 kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8Content,
34 kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8ContentInitialWasASCII,
35 kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8DependedOnTLD,
36 kCharsetFromFinalAutoDetectionWouldNotHaveBeenUTF8DependedOnTLDInitialWasASCII,
37 kCharsetFromFinalAutoDetectionFile,
38 // End subdividing source for telemetry purposes
39 kCharsetFromFinalUserForcedAutoDetection,
40 kCharsetFromXmlDeclarationUtf16, // This one is overridden by
41 // kCharsetFromChannel
42 kCharsetFromByteOrderMark,
43 kCharsetFromUtf8OnlyMime, // For JSON, WebVTT and such
44 kCharsetFromBuiltIn, // resource: URLs
47 #endif /* nsCharsetSource_h_ */