nsBoxLayoutState.cpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 "nsBoxLayoutState.h"
  12. nsBoxLayoutState::nsBoxLayoutState(nsPresContext* aPresContext,
  13. nsRenderingContext* aRenderingContext,
  14. const ReflowInput* aOuterReflowInput,
  15. uint16_t aReflowDepth)
  16. : mPresContext(aPresContext)
  17. , mRenderingContext(aRenderingContext)
  18. , mOuterReflowInput(aOuterReflowInput)
  19. , mLayoutFlags(0)
  20. , mReflowDepth(aReflowDepth)
  21. , mPaintingDisabled(false)
  22. {
  23. NS_ASSERTION(mPresContext, "PresContext must be non-null");
  24. }
  25. nsBoxLayoutState::nsBoxLayoutState(const nsBoxLayoutState& aState)
  26. : mPresContext(aState.mPresContext)
  27. , mRenderingContext(aState.mRenderingContext)
  28. , mOuterReflowInput(aState.mOuterReflowInput)
  29. , mLayoutFlags(aState.mLayoutFlags)
  30. , mReflowDepth(aState.mReflowDepth + 1)
  31. , mPaintingDisabled(aState.mPaintingDisabled)
  32. {
  33. NS_ASSERTION(mPresContext, "PresContext must be non-null");
  34. }