Bug 1839315: part 4) Link from `SheetLoadData::mWasAlternate` to spec. r=emilio DONTBUILD
[gecko.git] / layout / style / nsICSSLoaderObserver.h
blob1f0d5b5130b9249cba5996d9d3393cecd3815889
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/. */
7 /* internal interface for observing CSS style sheet loads */
9 #ifndef nsICSSLoaderObserver_h___
10 #define nsICSSLoaderObserver_h___
12 #include "nsISupports.h"
14 #define NS_ICSSLOADEROBSERVER_IID \
15 { \
16 0xf51fbf2c, 0xfe4b, 0x4a15, { \
17 0xaf, 0x7e, 0x5e, 0x20, 0x64, 0x5f, 0xaf, 0x58 \
18 } \
21 namespace mozilla {
22 class StyleSheet;
25 class nsICSSLoaderObserver : public nsISupports {
26 public:
27 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSSLOADEROBSERVER_IID)
29 /**
30 * StyleSheetLoaded is called after aSheet is marked complete and before any
31 * load events associated with aSheet are fired.
32 * @param aSheet the sheet that was loaded. Guaranteed to always be
33 * non-null, even if aStatus indicates failure.
34 * @param aWasDeferred whether the sheet load was deferred, due to it being an
35 * alternate sheet, or having a non-matching media list.
36 * @param aStatus is a success code if the sheet loaded successfully and a
37 * failure code otherwise. Note that successful load of aSheet
38 * doesn't indicate anything about whether the data actually parsed
39 * as CSS, and doesn't indicate anything about the status of any child
40 * sheets of aSheet.
42 NS_IMETHOD StyleSheetLoaded(mozilla::StyleSheet* aSheet, bool aWasDeferred,
43 nsresult aStatus) = 0;
46 NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSLoaderObserver, NS_ICSSLOADEROBSERVER_IID)
48 #endif // nsICSSLoaderObserver_h___