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/. */
8 #include "mozilla/dom/GridBinding.h"
14 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GridArea
, mParent
)
15 NS_IMPL_CYCLE_COLLECTING_ADDREF(GridArea
)
16 NS_IMPL_CYCLE_COLLECTING_RELEASE(GridArea
)
17 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(GridArea
)
18 NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
19 NS_INTERFACE_MAP_ENTRY(nsISupports
)
22 GridArea::GridArea(Grid
* aParent
, nsAtom
* aName
, GridDeclaration aType
,
23 uint32_t aRowStart
, uint32_t aRowEnd
, uint32_t aColumnStart
,
30 mColumnStart(aColumnStart
),
31 mColumnEnd(aColumnEnd
) {}
33 GridArea::~GridArea() = default;
35 JSObject
* GridArea::WrapObject(JSContext
* aCx
,
36 JS::Handle
<JSObject
*> aGivenProto
) {
37 return GridArea_Binding::Wrap(aCx
, this, aGivenProto
);
40 void GridArea::GetName(nsString
& aName
) const { mName
->ToString(aName
); }
42 GridDeclaration
GridArea::Type() const { return mType
; }
44 uint32_t GridArea::RowStart() const { return mRowStart
; }
46 uint32_t GridArea::RowEnd() const { return mRowEnd
; }
48 uint32_t GridArea::ColumnStart() const { return mColumnStart
; }
50 uint32_t GridArea::ColumnEnd() const { return mColumnEnd
; }
53 } // namespace mozilla