Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/layout/xul/tree/nsTreeColFrame.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
#include "mozilla/Attributes.h"
8
#include "nsBoxFrame.h"
9
10
class nsITreeBoxObject;
11
12
nsIFrame* NS_NewTreeColFrame(nsIPresShell* aPresShell,
13
                             ComputedStyle* aStyle);
14
15
class nsTreeColFrame final : public nsBoxFrame
16
{
17
public:
18
  NS_DECL_FRAMEARENA_HELPERS(nsTreeColFrame)
19
20
  explicit nsTreeColFrame(ComputedStyle* aStyle):
21
0
    nsBoxFrame(aStyle, kClassID) {}
22
23
  virtual void Init(nsIContent*       aContent,
24
                    nsContainerFrame* aParent,
25
                    nsIFrame*         aPrevInFlow) override;
26
27
  virtual void DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData) override;
28
29
  virtual void BuildDisplayListForChildren(nsDisplayListBuilder*   aBuilder,
30
                                           const nsDisplayListSet& aLists) override;
31
32
  virtual nsresult AttributeChanged(int32_t aNameSpaceID,
33
                                    nsAtom* aAttribute,
34
                                    int32_t aModType) override;
35
36
  virtual void SetXULBounds(nsBoxLayoutState& aBoxLayoutState, const nsRect& aRect,
37
                            bool aRemoveOverflowArea = false) override;
38
39
  friend nsIFrame* NS_NewTreeColFrame(nsIPresShell* aPresShell,
40
                                      ComputedStyle* aStyle);
41
42
protected:
43
  virtual ~nsTreeColFrame();
44
45
  /**
46
   * @return the tree box object of the tree this column belongs to, or nullptr.
47
   */
48
  nsITreeBoxObject* GetTreeBoxObject();
49
50
  /**
51
   * Helper method that gets the TreeColumns object this column belongs to
52
   * and calls InvalidateColumns() on it.
53
   */
54
  void InvalidateColumns(bool aCanWalkFrameTree = true);
55
};