Line data Source code
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/. */
6 :
7 : #include "GridArea.h"
8 : #include "mozilla/dom/GridBinding.h"
9 : #include "Grid.h"
10 :
11 : namespace mozilla {
12 : namespace dom {
13 :
14 0 : NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GridArea, mParent)
15 0 : NS_IMPL_CYCLE_COLLECTING_ADDREF(GridArea)
16 0 : NS_IMPL_CYCLE_COLLECTING_RELEASE(GridArea)
17 0 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(GridArea)
18 0 : NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
19 0 : NS_INTERFACE_MAP_ENTRY(nsISupports)
20 0 : NS_INTERFACE_MAP_END
21 :
22 0 : GridArea::GridArea(Grid* aParent,
23 : const nsString& aName,
24 : GridDeclaration aType,
25 : uint32_t aRowStart,
26 : uint32_t aRowEnd,
27 : uint32_t aColumnStart,
28 0 : uint32_t aColumnEnd)
29 : : mParent(aParent)
30 : , mName(aName)
31 : , mType(aType)
32 : , mRowStart(aRowStart)
33 : , mRowEnd(aRowEnd)
34 : , mColumnStart(aColumnStart)
35 0 : , mColumnEnd(aColumnEnd)
36 : {
37 0 : }
38 :
39 0 : GridArea::~GridArea()
40 : {
41 0 : }
42 :
43 : JSObject*
44 0 : GridArea::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
45 : {
46 0 : return GridAreaBinding::Wrap(aCx, this, aGivenProto);
47 : }
48 :
49 : void
50 0 : GridArea::GetName(nsString& aName) const
51 : {
52 0 : aName = mName;
53 0 : }
54 :
55 : GridDeclaration
56 0 : GridArea::Type() const
57 : {
58 0 : return mType;
59 : }
60 :
61 : uint32_t
62 0 : GridArea::RowStart() const
63 : {
64 0 : return mRowStart;
65 : }
66 :
67 : uint32_t
68 0 : GridArea::RowEnd() const
69 : {
70 0 : return mRowEnd;
71 : }
72 :
73 : uint32_t
74 0 : GridArea::ColumnStart() const
75 : {
76 0 : return mColumnStart;
77 : }
78 :
79 : uint32_t
80 0 : GridArea::ColumnEnd() const
81 : {
82 0 : return mColumnEnd;
83 : }
84 :
85 : } // namespace dom
86 : } // namespace mozilla
|