Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/layout/xul/nsPopupSetFrame.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 nsPopupSetFrame_h__
8
#define nsPopupSetFrame_h__
9
10
#include "mozilla/Attributes.h"
11
#include "nsAtom.h"
12
#include "nsBoxFrame.h"
13
14
nsIFrame* NS_NewPopupSetFrame(nsIPresShell* aPresShell, mozilla::ComputedStyle* aStyle);
15
16
class nsPopupSetFrame final : public nsBoxFrame
17
{
18
public:
19
  NS_DECL_FRAMEARENA_HELPERS(nsPopupSetFrame)
20
21
  explicit nsPopupSetFrame(ComputedStyle* aStyle)
22
    : nsBoxFrame(aStyle, kClassID)
23
0
  {}
24
25
0
  ~nsPopupSetFrame() {}
26
27
  virtual void Init(nsIContent*       aContent,
28
                    nsContainerFrame* aParent,
29
                    nsIFrame*         aPrevInFlow) override;
30
31
  virtual void SetInitialChildList(ChildListID  aListID,
32
                                    nsFrameList& aChildList) override;
33
  virtual void AppendFrames(ChildListID     aListID,
34
                            nsFrameList&    aFrameList) override;
35
  virtual void RemoveFrame(ChildListID     aListID,
36
                           nsIFrame*       aOldFrame) override;
37
  virtual void InsertFrames(ChildListID     aListID,
38
                            nsIFrame*       aPrevFrame,
39
                            nsFrameList&    aFrameList) override;
40
41
  virtual const nsFrameList& GetChildList(ChildListID aList) const override;
42
  virtual void GetChildLists(nsTArray<ChildList>* aLists) const override;
43
44
  NS_IMETHOD DoXULLayout(nsBoxLayoutState& aBoxLayoutState) override;
45
46
  // Used to destroy our popup frames.
47
  virtual void DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData) override;
48
49
#ifdef DEBUG_FRAME_DUMP
50
  virtual nsresult GetFrameName(nsAString& aResult) const override
51
  {
52
      return MakeFrameName(NS_LITERAL_STRING("PopupSet"), aResult);
53
  }
54
#endif
55
56
protected:
57
  void AddPopupFrameList(nsFrameList& aPopupFrameList);
58
  void RemovePopupFrame(nsIFrame* aPopup);
59
60
  nsFrameList mPopupList;
61
};
62
63
#endif