Bug 1472338: part 1) Add Chrome tests for the async Clipboard API. r=NeilDeakin
[gecko.git] / dom / flex / Flex.h
blob27237acb3d7988a91578d929537f426b3a86930d
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_Flex_h
8 #define mozilla_dom_Flex_h
10 #include "mozilla/dom/FlexBinding.h"
11 #include "nsISupports.h"
12 #include "nsWrapperCache.h"
14 class nsFlexContainerFrame;
16 namespace mozilla {
17 namespace dom {
19 class Element;
20 class FlexLineValues;
22 class Flex : public nsISupports, public nsWrapperCache {
23 public:
24 explicit Flex(Element* aParent, nsFlexContainerFrame* aFrame);
26 protected:
27 virtual ~Flex() = default;
29 public:
30 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
31 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Flex)
33 virtual JSObject* WrapObject(JSContext* aCx,
34 JS::Handle<JSObject*> aGivenProto) override;
35 Element* GetParentObject() { return mParent; }
37 void GetLines(nsTArray<RefPtr<FlexLineValues>>& aResult);
38 FlexPhysicalDirection MainAxisDirection() const;
39 FlexPhysicalDirection CrossAxisDirection() const;
41 protected:
42 nsCOMPtr<Element> mParent;
43 nsTArray<RefPtr<FlexLineValues>> mLines;
44 FlexPhysicalDirection mMainAxisDirection;
45 FlexPhysicalDirection mCrossAxisDirection;
48 } // namespace dom
49 } // namespace mozilla
51 #endif /* mozilla_dom_Flex_h */