Bug 1880216 - Migrate Fenix docs into Sphinx. r=owlish,geckoview-reviewers,android...
[gecko.git] / dom / grid / GridArea.cpp
blobfb87bd5b2dfacf1d0e51ec47069111ab3762cfb7
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 #include "GridArea.h"
8 #include "mozilla/dom/GridBinding.h"
9 #include "Grid.h"
11 namespace mozilla::dom {
13 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GridArea, mParent)
14 NS_IMPL_CYCLE_COLLECTING_ADDREF(GridArea)
15 NS_IMPL_CYCLE_COLLECTING_RELEASE(GridArea)
16 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(GridArea)
17 NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
18 NS_INTERFACE_MAP_ENTRY(nsISupports)
19 NS_INTERFACE_MAP_END
21 GridArea::GridArea(Grid* aParent, nsAtom* aName, GridDeclaration aType,
22 uint32_t aRowStart, uint32_t aRowEnd, uint32_t aColumnStart,
23 uint32_t aColumnEnd)
24 : mParent(aParent),
25 mName(aName),
26 mType(aType),
27 mRowStart(aRowStart),
28 mRowEnd(aRowEnd),
29 mColumnStart(aColumnStart),
30 mColumnEnd(aColumnEnd) {}
32 GridArea::~GridArea() = default;
34 JSObject* GridArea::WrapObject(JSContext* aCx,
35 JS::Handle<JSObject*> aGivenProto) {
36 return GridArea_Binding::Wrap(aCx, this, aGivenProto);
39 void GridArea::GetName(nsString& aName) const { mName->ToString(aName); }
41 GridDeclaration GridArea::Type() const { return mType; }
43 uint32_t GridArea::RowStart() const { return mRowStart; }
45 uint32_t GridArea::RowEnd() const { return mRowEnd; }
47 uint32_t GridArea::ColumnStart() const { return mColumnStart; }
49 uint32_t GridArea::ColumnEnd() const { return mColumnEnd; }
51 } // namespace mozilla::dom