Bug 1614879 [wpt PR 21750] - Set request mode for beacon request with non-cors-safeli...
[gecko.git] / dom / flex / FlexLineValues.h
blobec8625d6b27a25c98aa77d125e967a68ba534c26
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_FlexLineValues_h
8 #define mozilla_dom_FlexLineValues_h
10 #include "mozilla/dom/FlexBinding.h"
11 #include "nsISupports.h"
12 #include "nsWrapperCache.h"
14 struct ComputedFlexLineInfo;
16 namespace mozilla {
17 namespace dom {
19 class Flex;
20 class FlexItemValues;
22 class FlexLineValues : public nsISupports, public nsWrapperCache {
23 public:
24 explicit FlexLineValues(Flex* aParent, const ComputedFlexLineInfo* aLine);
26 protected:
27 virtual ~FlexLineValues() = default;
29 public:
30 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
31 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(FlexLineValues)
33 virtual JSObject* WrapObject(JSContext* aCx,
34 JS::Handle<JSObject*> aGivenProto) override;
35 Flex* GetParentObject() { return mParent; }
37 FlexLineGrowthState GrowthState() const;
38 double CrossStart() const;
39 double CrossSize() const;
40 double FirstBaselineOffset() const;
41 double LastBaselineOffset() const;
43 void GetItems(nsTArray<RefPtr<FlexItemValues>>& aResult);
45 protected:
46 RefPtr<Flex> mParent;
48 FlexLineGrowthState mGrowthState;
49 double mCrossStart;
50 double mCrossSize;
51 double mFirstBaselineOffset;
52 double mLastBaselineOffset;
54 nsTArray<RefPtr<FlexItemValues>> mItems;
57 } // namespace dom
58 } // namespace mozilla
60 #endif /* mozilla_dom_FlexLineValues_h */