tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

SheetParsingMode.h (1849B)


      1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
      3 /* This Source Code Form is subject to the terms of the Mozilla Public
      4 * License, v. 2.0. If a copy of the MPL was not distributed with this
      5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      6 
      7 #ifndef mozilla_css_SheetParsingMode_h
      8 #define mozilla_css_SheetParsingMode_h
      9 
     10 #include <stdint.h>
     11 
     12 namespace mozilla {
     13 namespace css {
     14 
     15 /**
     16 * Enum defining the mode in which a sheet is to be parsed.  This is
     17 * usually, but not always, the same as the cascade level at which the
     18 * sheet will apply (see nsStyleSet.h).  Most of the Loader APIs only
     19 * support loading of author sheets.
     20 *
     21 * Author sheets are the normal case: styles embedded in or linked
     22 * from HTML pages.  They are also the most restricted.
     23 *
     24 * User sheets can do anything author sheets can do, and also get
     25 * access to a few CSS extensions that are not yet suitable for
     26 * exposure on the public Web, but are very useful for expressing
     27 * user style overrides, such as @-moz-document rules.
     28 *
     29 * XXX: eUserSheetFeatures was added in bug 1035091, but some patches in
     30 * that bug never landed to use this enum value. Currently, all the features
     31 * in user sheet are also available in author sheet.
     32 *
     33 * Agent sheets have access to all author- and user-sheet features
     34 * plus more extensions that are necessary for internal use but,
     35 * again, not yet suitable for exposure on the public Web.  Some of
     36 * these are outright unsafe to expose; in particular, incorrect
     37 * styling of anonymous box pseudo-elements can violate layout
     38 * invariants.
     39 */
     40 enum SheetParsingMode : uint8_t {
     41  eAuthorSheetFeatures = 0,
     42  eUserSheetFeatures,
     43  eAgentSheetFeatures,
     44 };
     45 
     46 }  // namespace css
     47 }  // namespace mozilla
     48 
     49 #endif  // mozilla_css_SheetParsingMode_h