Bug 1700051: part 36) Reduce accessibility of `SoftText::mBegin` to `private`. r...
[gecko.git] / dom / flex / FlexItemValues.h
blobc775cdbcfa3986da031786093d0615f4cf4593e7
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_FlexItemValues_h
8 #define mozilla_dom_FlexItemValues_h
10 #include "mozilla/dom/FlexBinding.h"
11 #include "nsISupports.h"
12 #include "nsWrapperCache.h"
14 struct ComputedFlexItemInfo;
16 class nsINode;
18 namespace mozilla {
19 namespace dom {
21 class DOMRectReadOnly;
23 class FlexLineValues;
25 class FlexItemValues : public nsISupports, public nsWrapperCache {
26 public:
27 explicit FlexItemValues(FlexLineValues* aParent,
28 const ComputedFlexItemInfo* aItem);
30 protected:
31 virtual ~FlexItemValues() = default;
33 public:
34 NS_DECL_CYCLE_COLLECTING_ISUPPORTS
35 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(FlexItemValues)
37 virtual JSObject* WrapObject(JSContext* aCx,
38 JS::Handle<JSObject*> aGivenProto) override;
39 FlexLineValues* GetParentObject() { return mParent; }
41 nsINode* GetNode() const;
42 DOMRectReadOnly* FrameRect() const;
43 double MainBaseSize() const;
44 double MainDeltaSize() const;
45 double MainMinSize() const;
46 double MainMaxSize() const;
47 double CrossMinSize() const;
48 double CrossMaxSize() const;
49 FlexItemClampState ClampState() const;
51 protected:
52 RefPtr<FlexLineValues> mParent;
53 RefPtr<nsINode> mNode;
54 RefPtr<DOMRectReadOnly> mFrameRect;
56 // These sizes are all CSS pixel units.
57 double mMainBaseSize;
58 double mMainDeltaSize;
59 double mMainMinSize;
60 double mMainMaxSize;
61 double mCrossMinSize;
62 double mCrossMaxSize;
63 FlexItemClampState mClampState;
66 } // namespace dom
67 } // namespace mozilla
69 #endif /* mozilla_dom_FlexItemValues_h */