layout/base/nsIStyleSheetService.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 /* interface for managing user and user-agent style sheets */
     8 #include "nsISupports.idl"
    10 interface nsIURI;
    12 /*
    13  * nsIStyleSheetService allows extensions or embeddors to add to the
    14  * built-in list of user or agent style sheets.
    15  */
    17 [scriptable, uuid(1f42a6a2-ab0a-45d4-8a96-396f58ea6c6d)]
    18 interface nsIStyleSheetService : nsISupports
    19 {
    20   const unsigned long AGENT_SHEET = 0;
    21   const unsigned long USER_SHEET = 1;
    22   const unsigned long AUTHOR_SHEET = 2;
    24   /**
    25    * Synchronously loads a style sheet from |sheetURI| and adds it to the list
    26    * of user or agent style sheets.
    27    *
    28    * A user sheet loaded via this API will come before userContent.css and
    29    * userChrome.css in the cascade (so the rules in it will have lower
    30    * precedence than rules in those sheets).
    31    *
    32    * An agent sheet loaded via this API will come after ua.css in the cascade
    33    * (so the rules in it will have higher precedence than rules in ua.css).
    34    *
    35    * The relative ordering of two user or two agent sheets loaded via
    36    * this API is undefined.
    37    *
    38    * Sheets added via this API take effect on all documents, including
    39    * already-loaded ones, immediately.
    40    */
    41   void loadAndRegisterSheet(in nsIURI sheetURI, in unsigned long type);
    43   /**
    44    * Returns true if a style sheet at |sheetURI| has previously been
    45    * added to the list of style sheets specified by |type|.
    46    */
    47   boolean sheetRegistered(in nsIURI sheetURI, in unsigned long type);
    49   /**
    50    * Remove the style sheet at |sheetURI| from the list of style sheets
    51    * specified by |type|.  The removal takes effect immediately, even for
    52    * already-loaded documents.
    53    */
    54   void unregisterSheet(in nsIURI sheetURI, in unsigned long type);
    55 };

mercurial