Bumping manifests a=b2g-bump
[gecko.git] / layout / base / nsIStyleSheetService.idl
blobe8d834dd33a3a80e66656485c29d75bff5afb301
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;
11 interface nsIDOMStyleSheet;
14 * nsIStyleSheetService allows extensions or embeddors to add to the
15 * built-in list of user or agent style sheets.
18 [scriptable, uuid(4de68896-e8eb-41de-8237-a797b570ac4a)]
19 interface nsIStyleSheetService : nsISupports
21 const unsigned long AGENT_SHEET = 0;
22 const unsigned long USER_SHEET = 1;
23 const unsigned long AUTHOR_SHEET = 2;
25 /**
26 * Synchronously loads a style sheet from |sheetURI| and adds it to the list
27 * of user or agent style sheets.
29 * A user sheet loaded via this API will come before userContent.css and
30 * userChrome.css in the cascade (so the rules in it will have lower
31 * precedence than rules in those sheets).
33 * An agent sheet loaded via this API will come after ua.css in the cascade
34 * (so the rules in it will have higher precedence than rules in ua.css).
36 * The relative ordering of two user or two agent sheets loaded via
37 * this API is undefined.
39 * Sheets added via this API take effect on all documents, including
40 * already-loaded ones, immediately.
42 void loadAndRegisterSheet(in nsIURI sheetURI, in unsigned long type);
44 /**
45 * Returns true if a style sheet at |sheetURI| has previously been
46 * added to the list of style sheets specified by |type|.
48 boolean sheetRegistered(in nsIURI sheetURI, in unsigned long type);
50 /**
51 * Synchronously loads a style sheet from |sheetURI| and returns the
52 * new style sheet object. Can be used with nsIDOMWindowUtils.addSheet.
54 nsIDOMStyleSheet preloadSheet(in nsIURI sheetURI, in unsigned long type);
56 /**
57 * Remove the style sheet at |sheetURI| from the list of style sheets
58 * specified by |type|. The removal takes effect immediately, even for
59 * already-loaded documents.
61 void unregisterSheet(in nsIURI sheetURI, in unsigned long type);