no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / dom / grid / GridLine.h
blobbcc332558394d1b119d4845bc2d89d17955cb2bc
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_GridLine_h
8 #define mozilla_dom_GridLine_h
10 #include "mozilla/dom/GridBinding.h"
11 #include "nsString.h"
12 #include "nsTArray.h"
13 #include "nsWrapperCache.h"
15 class nsAtom;
17 namespace mozilla::dom {
19 class GridLines;
21 class GridLine : public nsISupports, public nsWrapperCache {
22 public:
23 explicit GridLine(GridLines* aParent);
25 protected:
26 virtual ~GridLine();
28 public:
29 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
30 NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(GridLine)
32 void GetNames(nsTArray<nsString>& aNames) const;
33 const nsTArray<RefPtr<nsAtom>>& Names() const { return mNames; }
35 virtual JSObject* WrapObject(JSContext* aCx,
36 JS::Handle<JSObject*> aGivenProto) override;
37 GridLines* GetParentObject() { return mParent; }
39 double Start() const;
40 double Breadth() const;
41 GridDeclaration Type() const;
42 uint32_t Number() const;
43 int32_t NegativeNumber() const;
45 void SetLineValues(const nsTArray<RefPtr<nsAtom>>& aNames, double aStart,
46 double aBreadth, uint32_t aNumber, int32_t aNegativeNumber,
47 GridDeclaration aType);
49 void SetLineNames(const nsTArray<RefPtr<nsAtom>>& aNames);
51 protected:
52 RefPtr<GridLines> mParent;
53 nsTArray<RefPtr<nsAtom>> mNames;
54 double mStart;
55 double mBreadth;
56 GridDeclaration mType;
57 uint32_t mNumber;
58 int32_t mNegativeNumber;
61 } // namespace mozilla::dom
63 #endif /* mozilla_dom_GridLine_h */