Bug 1771337 [wpt PR 34217] - Convert `popup=popup` to `popup=auto` or just `popup...
[gecko.git] / dom / grid / Grid.h
blob52cbcbed9d61d5ae31bc1964d97ccbb824eeb0a0
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_Grid_h
8 #define mozilla_dom_Grid_h
10 #include "GridArea.h"
11 #include "nsGridContainerFrame.h"
12 #include "nsISupports.h"
13 #include "nsWrapperCache.h"
15 namespace mozilla::dom {
17 class Element;
18 class GridDimension;
20 class Grid : public nsISupports, public nsWrapperCache {
21 public:
22 explicit Grid(nsISupports* aParent, nsGridContainerFrame* aFrame);
24 protected:
25 virtual ~Grid();
27 public:
28 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
29 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Grid)
31 virtual JSObject* WrapObject(JSContext* aCx,
32 JS::Handle<JSObject*> aGivenProto) override;
33 Element* GetParentObject() { return mParent; }
35 GridDimension* Rows() const;
36 GridDimension* Cols() const;
37 void GetAreas(nsTArray<RefPtr<GridArea>>& aAreas) const;
39 protected:
40 nsCOMPtr<Element> mParent;
41 RefPtr<GridDimension> mRows;
42 RefPtr<GridDimension> mCols;
43 nsTArray<RefPtr<GridArea>> mAreas;
46 } // namespace mozilla::dom
48 #endif /* mozilla_dom_Grid_h */