parser/nsCharsetSource.h
author Emilio Cobos Álvarez <emilio@crisal.io>
Tue, 02 Jul 2019 18:50:04 +0000
changeset 480995 6525ac41c35455512bc1b681df331a5b74cb75cc
parent 476822 55fd70d72e0873ecc75240956253288d3df4345b
child 506666 0810ad58698650697fe84306377b66209bf27d19
permissions -rw-r--r--
Bug 1562789 - SmallPointerArray should support moves, and have an IsEmpty() helper. r=froydnj This also implicitly deletes its copy-assignment operator and copy-constructor, which is great since it's a huge footgun. Differential Revision: https://phabricator.services.mozilla.com/D36549

/* 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
enum {
  kCharsetUninitialized,
  kCharsetFromFallback,
  kCharsetFromTopLevelDomain,
  kCharsetFromFileURLGuess,
  kCharsetFromDocTypeDefault,  // This and up confident for XHR
  kCharsetFromCache,
  kCharsetFromParentFrame,
  kCharsetFromAutoDetection,
  kCharsetFromMetaPrescan,  // this one and smaller: HTML5 Tentative
  kCharsetFromMetaTag,      // this one and greater: HTML5 Confident
  kCharsetFromIrreversibleAutoDetection,
  kCharsetFromChannel,
  kCharsetFromOtherComponent,
  kCharsetFromParentForced,  // propagates to child frames
  kCharsetFromUserForced,    // propagates to child frames
  kCharsetFromUserForcedAutoDetection,
  kCharsetFromByteOrderMark,
  kCharsetFromUtf8OnlyMime,  // For JSON, WebVTT and such
  kCharsetFromBuiltIn,       // resource: URLs
};

#endif /* nsCharsetSource_h_ */