Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/layout/xul/grid/nsGridRowGroupLayout.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
/**
8
9
  Author:
10
  Eric D Vaughan
11
12
**/
13
14
#ifndef nsGridRowGroupLayout_h___
15
#define nsGridRowGroupLayout_h___
16
17
#include "mozilla/Attributes.h"
18
#include "nsGridRowLayout.h"
19
20
/**
21
 * The nsBoxLayout implementation for nsGridRowGroupFrame.
22
 */
23
class nsGridRowGroupLayout : public nsGridRowLayout
24
{
25
public:
26
27
  friend already_AddRefed<nsBoxLayout> NS_NewGridRowGroupLayout();
28
29
0
  virtual nsGridRowGroupLayout* CastToRowGroupLayout() override { return this; }
30
  virtual nsSize GetXULMinSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override;
31
  virtual nsSize GetXULPrefSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override;
32
  virtual nsSize GetXULMaxSize(nsIFrame* aBox, nsBoxLayoutState& aBoxLayoutState) override;
33
  virtual void CountRowsColumns(nsIFrame* aBox, int32_t& aRowCount, int32_t& aComputedColumnCount) override;
34
  virtual void DirtyRows(nsIFrame* aBox, nsBoxLayoutState& aState) override;
35
  virtual int32_t BuildRows(nsIFrame* aBox, nsGridRow* aRows) override;
36
  virtual nsMargin GetTotalMargin(nsIFrame* aBox, bool aIsHorizontal) override;
37
0
  virtual int32_t GetRowCount() override { return mRowCount; }
38
0
  virtual Type GetType() override { return eRowGroup; }
39
40
protected:
41
  nsGridRowGroupLayout();
42
  virtual ~nsGridRowGroupLayout();
43
44
  virtual void ChildAddedOrRemoved(nsIFrame* aBox, nsBoxLayoutState& aState) override;
45
  static void AddWidth(nsSize& aSize, nscoord aSize2, bool aIsHorizontal);
46
47
private:
48
  int32_t mRowCount;
49
};
50
51
#endif
52