nsGridRow.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. //
  6. // Eric Vaughan
  7. // Netscape Communications
  8. //
  9. // See documentation in associated header file
  10. //
  11. #include "nsGridRow.h"
  12. #include "nsBoxLayoutState.h"
  13. #include "nsIFrame.h"
  14. nsGridRow::nsGridRow():mIsBogus(false),
  15. mBox(nullptr),
  16. mFlex(-1),
  17. mPref(-1),
  18. mMin(-1),
  19. mMax(-1),
  20. mTop(-1),
  21. mBottom(-1),
  22. mTopMargin(0),
  23. mBottomMargin(0)
  24. {
  25. MOZ_COUNT_CTOR(nsGridRow);
  26. }
  27. void
  28. nsGridRow::Init(nsIFrame* aBox, bool aIsBogus)
  29. {
  30. mBox = aBox;
  31. mIsBogus = aIsBogus;
  32. mFlex = -1;
  33. mPref = -1;
  34. mMin = -1;
  35. mMax = -1;
  36. mTop = -1;
  37. mBottom = -1;
  38. mTopMargin = 0;
  39. mBottomMargin = 0;
  40. }
  41. nsGridRow::~nsGridRow()
  42. {
  43. MOZ_COUNT_DTOR(nsGridRow);
  44. }
  45. bool
  46. nsGridRow::IsXULCollapsed()
  47. {
  48. return mBox && mBox->IsXULCollapsed();
  49. }