Bug 1850713: remove duplicated setting of early hint preloader id in `ScriptLoader...
[gecko.git] / dom / grid / GridTracks.h
blobd20da5e12bcc064423a1360a0914ecaab33a9091
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 #ifndef mozilla_dom_GridTracks_h
8 #define mozilla_dom_GridTracks_h
10 #include "nsTArray.h"
11 #include "nsWrapperCache.h"
13 namespace mozilla {
15 struct ComputedGridTrackInfo;
17 namespace dom {
19 class GridDimension;
20 class GridTrack;
22 class GridTracks : public nsISupports, public nsWrapperCache {
23 public:
24 explicit GridTracks(GridDimension* aParent);
26 protected:
27 virtual ~GridTracks();
29 public:
30 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
31 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(GridTracks)
33 virtual JSObject* WrapObject(JSContext* aCx,
34 JS::Handle<JSObject*> aGivenProto) override;
35 GridDimension* GetParentObject() { return mParent; }
37 uint32_t Length() const;
38 GridTrack* Item(uint32_t aIndex);
39 GridTrack* IndexedGetter(uint32_t aIndex, bool& aFound);
41 void SetTrackInfo(const mozilla::ComputedGridTrackInfo* aTrackInfo);
43 protected:
44 RefPtr<GridDimension> mParent;
45 nsTArray<RefPtr<GridTrack>> mTracks;
48 } // namespace dom
49 } // namespace mozilla
51 #endif /* mozilla_dom_GridTracks_h */