content/base/src/StyleSheetList.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/src/StyleSheetList.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,48 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef mozilla_dom_StyleSheetList_h
    1.10 +#define mozilla_dom_StyleSheetList_h
    1.11 +
    1.12 +#include "nsIDOMStyleSheetList.h"
    1.13 +#include "nsWrapperCache.h"
    1.14 +
    1.15 +class nsCSSStyleSheet;
    1.16 +class nsINode;
    1.17 +
    1.18 +namespace mozilla {
    1.19 +namespace dom {
    1.20 +
    1.21 +class StyleSheetList : public nsIDOMStyleSheetList
    1.22 +                     , public nsWrapperCache
    1.23 +{
    1.24 +public:
    1.25 +  StyleSheetList()
    1.26 +  {
    1.27 +    SetIsDOMBinding();
    1.28 +  }
    1.29 +  virtual ~StyleSheetList() {}
    1.30 +
    1.31 +  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    1.32 +  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheetList)
    1.33 +  NS_DECL_NSIDOMSTYLESHEETLIST
    1.34 +
    1.35 +  virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE MOZ_FINAL;
    1.36 +
    1.37 +  virtual nsINode* GetParentObject() const = 0;
    1.38 +
    1.39 +  virtual uint32_t Length() = 0;
    1.40 +  virtual nsCSSStyleSheet* IndexedGetter(uint32_t aIndex, bool& aFound) = 0;
    1.41 +  nsCSSStyleSheet* Item(uint32_t aIndex)
    1.42 +  {
    1.43 +    bool dummy = false;
    1.44 +    return IndexedGetter(aIndex, dummy);
    1.45 +  }
    1.46 +};
    1.47 +
    1.48 +} // namespace dom
    1.49 +} // namespace mozilla
    1.50 +
    1.51 +#endif // mozilla_dom_StyleSheetList_h

mercurial