2015-05-03 19:32:37 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2014-04-12 08:15:59 +00:00
|
|
|
/* 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 08:18:54 +00:00
|
|
|
#include "nsWrapperCache.h"
|
2014-04-12 08:15:59 +00:00
|
|
|
|
2014-04-12 08:18:54 +00:00
|
|
|
class nsINode;
|
2014-04-12 08:15:59 +00:00
|
|
|
|
|
|
|
namespace mozilla {
|
2014-06-20 10:32:49 +00:00
|
|
|
class CSSStyleSheet;
|
|
|
|
|
2014-04-12 08:15:59 +00:00
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class StyleSheetList : public nsIDOMStyleSheetList
|
2014-04-12 08:18:54 +00:00
|
|
|
, public nsWrapperCache
|
2014-04-12 08:15:59 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-04-12 08:18:54 +00:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
|
|
|
|
NS_DECL_NSIDOMSTYLESHEETLIST
|
|
|
|
|
2015-03-21 16:28:04 +00:00
|
|
|
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override final;
|
2014-04-12 08:18:54 +00:00
|
|
|
|
|
|
|
virtual nsINode* GetParentObject() const = 0;
|
|
|
|
|
|
|
|
virtual uint32_t Length() = 0;
|
2014-06-20 10:32:49 +00:00
|
|
|
virtual CSSStyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) = 0;
|
|
|
|
CSSStyleSheet* Item(uint32_t aIndex)
|
2014-04-12 08:18:54 +00:00
|
|
|
{
|
|
|
|
bool dummy = false;
|
|
|
|
return IndexedGetter(aIndex, dummy);
|
|
|
|
}
|
2014-06-25 02:09:15 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ~StyleSheetList() {}
|
2014-04-12 08:15:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_StyleSheetList_h
|