Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/FlexItem.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#ifndef mozilla_dom_FlexItem_h
8
#define mozilla_dom_FlexItem_h
9
10
#include "mozilla/dom/FlexBinding.h"
11
#include "nsISupports.h"
12
#include "nsWrapperCache.h"
13
14
struct ComputedFlexItemInfo;
15
16
namespace mozilla {
17
namespace dom {
18
19
class FlexLine;
20
21
class FlexItem : public nsISupports
22
               , public nsWrapperCache
23
{
24
public:
25
  explicit FlexItem(FlexLine* aParent,
26
                    const ComputedFlexItemInfo* aItem);
27
28
protected:
29
  virtual ~FlexItem() = default;
30
31
public:
32
  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
33
  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(FlexItem)
34
35
  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
36
  FlexLine* GetParentObject()
37
0
  {
38
0
    return mParent;
39
0
  }
40
41
  nsINode* GetNode() const;
42
  double MainBaseSize() const;
43
  double MainDeltaSize() const;
44
  double MainMinSize() const;
45
  double MainMaxSize() const;
46
  double CrossMinSize() const;
47
  double CrossMaxSize() const;
48
49
protected:
50
  RefPtr<FlexLine> mParent;
51
  RefPtr<nsINode> mNode;
52
53
  // These sizes are all CSS pixel units.
54
  double mMainBaseSize;
55
  double mMainDeltaSize;
56
  double mMainMinSize;
57
  double mMainMaxSize;
58
  double mCrossMinSize;
59
  double mCrossMaxSize;
60
};
61
62
} // namespace dom
63
} // namespace mozilla
64
65
#endif /* mozilla_dom_FlexItem_h */