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_GridDimension_h
8 #define mozilla_dom_GridDimension_h
10 #include "nsWrapperCache.h"
15 struct ComputedGridLineInfo
;
16 struct ComputedGridTrackInfo
;
25 class GridDimension
: public nsISupports
, public nsWrapperCache
{
27 explicit GridDimension(Grid
* aParent
);
30 virtual ~GridDimension();
33 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
34 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(GridDimension
)
36 virtual JSObject
* WrapObject(JSContext
* aCx
,
37 JS::Handle
<JSObject
*> aGivenProto
) override
;
38 Grid
* GetParentObject() { return mParent
; }
40 GridLines
* Lines() const;
41 GridTracks
* Tracks() const;
43 void SetTrackInfo(const ComputedGridTrackInfo
* aTrackInfo
);
44 void SetLineInfo(const ComputedGridTrackInfo
* aTrackInfo
,
45 const ComputedGridLineInfo
* aLineInfo
,
46 const nsTArray
<RefPtr
<GridArea
>>& aAreas
, bool aIsRow
);
50 RefPtr
<GridLines
> mLines
;
51 RefPtr
<GridTracks
> mTracks
;
55 } // namespace mozilla
57 #endif /* mozilla_dom_GridDimension_h */