Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/flex/Flex.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_Flex_h
8
#define mozilla_dom_Flex_h
9
10
#include "mozilla/dom/Element.h"
11
#include "nsISupports.h"
12
#include "nsWrapperCache.h"
13
14
class nsFlexContainerFrame;
15
16
namespace mozilla {
17
namespace dom {
18
19
class FlexLine;
20
21
class Flex : public nsISupports
22
           , public nsWrapperCache
23
{
24
public:
25
  explicit Flex(Element* aParent, nsFlexContainerFrame* aFrame);
26
27
protected:
28
0
  virtual ~Flex() = default;
29
30
public:
31
  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
32
  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Flex)
33
34
  virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
35
  Element* GetParentObject()
36
  {
37
    return mParent;
38
  }
39
40
  void GetLines(nsTArray<RefPtr<FlexLine>>& aResult);
41
42
protected:
43
  nsCOMPtr<Element> mParent;
44
  nsTArray<RefPtr<FlexLine>> mLines;
45
};
46
47
} // namespace dom
48
} // namespace mozilla
49
50
#endif /* mozilla_dom_Flex_h */