2014-04-12 01:15:59 -07:00
|
|
|
/* -*- Mode: C++; 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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_StyleSheetList_h
|
|
|
|
#define mozilla_dom_StyleSheetList_h
|
|
|
|
|
|
|
|
#include "nsIDOMStyleSheetList.h"
|
2014-04-12 01:18:54 -07:00
|
|
|
#include "nsWrapperCache.h"
|
2014-04-12 01:15:59 -07:00
|
|
|
|
2014-04-12 01:18:54 -07:00
|
|
|
class nsINode;
|
2014-04-12 01:15:59 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
2014-06-20 03:32:49 -07:00
|
|
|
class CSSStyleSheet;
|
|
|
|
|
2014-04-12 01:15:59 -07:00
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class StyleSheetList : public nsIDOMStyleSheetList
|
2014-04-12 01:18:54 -07:00
|
|
|
, public nsWrapperCache
|
2014-04-12 01:15:59 -07:00
|
|
|
{
|
|
|
|
public:
|
2014-04-12 01:18:54 -07:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
|
|
|
|
NS_DECL_NSIDOMSTYLESHEETLIST
|
|
|
|
|
|
|
|
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE MOZ_FINAL;
|
|
|
|
|
|
|
|
virtual nsINode* GetParentObject() const = 0;
|
|
|
|
|
|
|
|
virtual uint32_t Length() = 0;
|
2014-06-20 03:32:49 -07:00
|
|
|
virtual CSSStyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) = 0;
|
|
|
|
CSSStyleSheet* Item(uint32_t aIndex)
|
2014-04-12 01:18:54 -07:00
|
|
|
{
|
|
|
|
bool dummy = false;
|
|
|
|
return IndexedGetter(aIndex, dummy);
|
|
|
|
}
|
2014-06-24 19:09:15 -07:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ~StyleSheetList() {}
|
2014-04-12 01:15:59 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_StyleSheetList_h
|