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