From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- layout/base/nsIStyleSheetService.idl | 62 ++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 layout/base/nsIStyleSheetService.idl (limited to 'layout/base/nsIStyleSheetService.idl') diff --git a/layout/base/nsIStyleSheetService.idl b/layout/base/nsIStyleSheetService.idl new file mode 100644 index 000000000..e8d834dd3 --- /dev/null +++ b/layout/base/nsIStyleSheetService.idl @@ -0,0 +1,62 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* 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/. */ + +/* interface for managing user and user-agent style sheets */ + +#include "nsISupports.idl" + +interface nsIURI; +interface nsIDOMStyleSheet; + +/* + * nsIStyleSheetService allows extensions or embeddors to add to the + * built-in list of user or agent style sheets. + */ + +[scriptable, uuid(4de68896-e8eb-41de-8237-a797b570ac4a)] +interface nsIStyleSheetService : nsISupports +{ + const unsigned long AGENT_SHEET = 0; + const unsigned long USER_SHEET = 1; + const unsigned long AUTHOR_SHEET = 2; + + /** + * Synchronously loads a style sheet from |sheetURI| and adds it to the list + * of user or agent style sheets. + * + * A user sheet loaded via this API will come before userContent.css and + * userChrome.css in the cascade (so the rules in it will have lower + * precedence than rules in those sheets). + * + * An agent sheet loaded via this API will come after ua.css in the cascade + * (so the rules in it will have higher precedence than rules in ua.css). + * + * The relative ordering of two user or two agent sheets loaded via + * this API is undefined. + * + * Sheets added via this API take effect on all documents, including + * already-loaded ones, immediately. + */ + void loadAndRegisterSheet(in nsIURI sheetURI, in unsigned long type); + + /** + * Returns true if a style sheet at |sheetURI| has previously been + * added to the list of style sheets specified by |type|. + */ + boolean sheetRegistered(in nsIURI sheetURI, in unsigned long type); + + /** + * Synchronously loads a style sheet from |sheetURI| and returns the + * new style sheet object. Can be used with nsIDOMWindowUtils.addSheet. + */ + nsIDOMStyleSheet preloadSheet(in nsIURI sheetURI, in unsigned long type); + + /** + * Remove the style sheet at |sheetURI| from the list of style sheets + * specified by |type|. The removal takes effect immediately, even for + * already-loaded documents. + */ + void unregisterSheet(in nsIURI sheetURI, in unsigned long type); +}; -- cgit v1.2.3