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