Bug 1655413 [wpt PR 24763] - Make CSP default-src without 'unsafe-eval' block eval...
[gecko.git] / dom / grid / GridArea.cpp
blob36a878369cb2bb8d3e2fe9b919211fa603fe1d7f
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 {
12 namespace dom {
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)
20 NS_INTERFACE_MAP_END
22 GridArea::GridArea(Grid* aParent, nsAtom* aName, GridDeclaration aType,
23 uint32_t aRowStart, uint32_t aRowEnd, uint32_t aColumnStart,
24 uint32_t aColumnEnd)
25 : mParent(aParent),
26 mName(aName),
27 mType(aType),
28 mRowStart(aRowStart),
29 mRowEnd(aRowEnd),
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; }
52 } // namespace dom
53 } // namespace mozilla