Bug 1772053 - Enable dynamic code disable mitigations only on Windows 10 1703+ r...
[gecko.git] / dom / flex / Flex.h
blob25d54c506985353813781fd67fe1e99a604622c5
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::dom {
18 class Element;
19 class FlexLineValues;
21 class Flex : public nsISupports, public nsWrapperCache {
22 public:
23 explicit Flex(Element* aParent, nsFlexContainerFrame* aFrame);
25 protected:
26 virtual ~Flex() = default;
28 public:
29 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
30 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Flex)
32 virtual JSObject* WrapObject(JSContext* aCx,
33 JS::Handle<JSObject*> aGivenProto) override;
34 Element* GetParentObject() { return mParent; }
36 void GetLines(nsTArray<RefPtr<FlexLineValues>>& aResult);
37 FlexPhysicalDirection MainAxisDirection() const;
38 FlexPhysicalDirection CrossAxisDirection() const;
40 protected:
41 nsCOMPtr<Element> mParent;
42 nsTArray<RefPtr<FlexLineValues>> mLines;
43 FlexPhysicalDirection mMainAxisDirection;
44 FlexPhysicalDirection mCrossAxisDirection;
47 } // namespace mozilla::dom
49 #endif /* mozilla_dom_Flex_h */