2015-05-03 22:32:37 +03: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 12:15:59 +04: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 12:18:54 +04:00
|
|
|
#include "nsWrapperCache.h"
|
2014-04-12 12:15:59 +04:00
|
|
|
|
2014-04-12 12:18:54 +04:00
|
|
|
class nsINode;
|
2014-04-12 12:15:59 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
2014-06-20 14:32:49 +04:00
|
|
|
class CSSStyleSheet;
|
|
|
|
|
2014-04-12 12:15:59 +04:00
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
class StyleSheetList : public nsIDOMStyleSheetList
|
2014-04-12 12:18:54 +04:00
|
|
|
, public nsWrapperCache
|
2014-04-12 12:15:59 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-04-12 12:18:54 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
|
|
|
|
NS_DECL_NSIDOMSTYLESHEETLIST
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override final;
|
2014-04-12 12:18:54 +04:00
|
|
|
|
|
|
|
virtual nsINode* GetParentObject() const = 0;
|
|
|
|
|
|
|
|
virtual uint32_t Length() = 0;
|
2014-06-20 14:32:49 +04:00
|
|
|
virtual CSSStyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) = 0;
|
|
|
|
CSSStyleSheet* Item(uint32_t aIndex)
|
2014-04-12 12:18:54 +04:00
|
|
|
{
|
|
|
|
bool dummy = false;
|
|
|
|
return IndexedGetter(aIndex, dummy);
|
|
|
|
}
|
2014-06-25 06:09:15 +04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual ~StyleSheetList() {}
|
2014-04-12 12:15:59 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_StyleSheetList_h
|