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 // Eric Vaughan
9 // Netscape Communications
10 //
11 // See documentation in associated header file
12 //
13
14 #include "nsGridRow.h"
15 #include "nsBoxLayoutState.h"
16 #include "nsIFrame.h"
17
nsGridRow()18 nsGridRow::nsGridRow()
19 : mIsBogus(false),
20 mBox(nullptr),
21 mFlex(-1),
22 mPref(-1),
23 mMin(-1),
24 mMax(-1),
25 mTop(-1),
26 mBottom(-1),
27 mTopMargin(0),
28 mBottomMargin(0)
29
30 {
31 MOZ_COUNT_CTOR(nsGridRow);
32 }
33
Init(nsIFrame * aBox,bool aIsBogus)34 void nsGridRow::Init(nsIFrame* aBox, bool aIsBogus) {
35 mBox = aBox;
36 mIsBogus = aIsBogus;
37 mFlex = -1;
38 mPref = -1;
39 mMin = -1;
40 mMax = -1;
41 mTop = -1;
42 mBottom = -1;
43 mTopMargin = 0;
44 mBottomMargin = 0;
45 }
46
~nsGridRow()47 nsGridRow::~nsGridRow() { MOZ_COUNT_DTOR(nsGridRow); }
48
IsXULCollapsed()49 bool nsGridRow::IsXULCollapsed() { return mBox && mBox->IsXULCollapsed(); }
50