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_GridArea_h
8 #define mozilla_dom_GridArea_h
10 #include "mozilla/dom/GridBinding.h"
11 #include "nsWrapperCache.h"
15 namespace mozilla::dom
{
19 class GridArea
: public nsISupports
, public nsWrapperCache
{
21 explicit GridArea(Grid
* aParent
, nsAtom
* aName
, GridDeclaration aType
,
22 uint32_t aRowStart
, uint32_t aRowEnd
, uint32_t aColumnStart
,
29 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
30 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(GridArea
)
32 virtual JSObject
* WrapObject(JSContext
* aCx
,
33 JS::Handle
<JSObject
*> aGivenProto
) override
;
34 Grid
* GetParentObject() { return mParent
; }
36 void GetName(nsString
& aName
) const;
37 GridDeclaration
Type() const;
38 uint32_t RowStart() const;
39 uint32_t RowEnd() const;
40 uint32_t ColumnStart() const;
41 uint32_t ColumnEnd() const;
45 const RefPtr
<nsAtom
> mName
;
46 const GridDeclaration mType
;
47 const uint32_t mRowStart
;
48 const uint32_t mRowEnd
;
49 const uint32_t mColumnStart
;
50 const uint32_t mColumnEnd
;
53 } // namespace mozilla::dom
55 #endif /* mozilla_dom_GridTrack_h */