Tracer build fixes. (b=588021, r=dvander)
[mozilla-central.git] / layout / base / nsFrameManagerBase.h
blobb250255e42fa64e7f5a079fd780ffc607fb6b11e
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim:cindent:ts=2:et:sw=2:
4 * ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/
12 * Software distributed under the License is distributed on an "AS IS" basis,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14 * for the specific language governing rights and limitations under the
15 * License.
17 * The Original Code is mozilla.org code.
19 * The Initial Developer of the Original Code is
20 * Netscape Communications Corporation.
21 * Portions created by the Initial Developer are Copyright (C) 1998
22 * the Initial Developer. All Rights Reserved.
24 * Contributor(s):
25 * Pierre Phaneuf <pp@ludusdesign.com>
26 * Brian Ryner <bryner@brianryner.com>
28 * Alternatively, the contents of this file may be used under the terms of
29 * either of the GNU General Public License Version 2 or later (the "GPL"),
30 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31 * in which case the provisions of the GPL or the LGPL are applicable instead
32 * of those above. If you wish to allow use of your version of this file only
33 * under the terms of either the GPL or the LGPL, and not to allow others to
34 * use your version of this file under the terms of the MPL, indicate your
35 * decision by deleting the provisions above and replace them with the notice
36 * and other provisions required by the GPL or the LGPL. If you do not delete
37 * the provisions above, a recipient may use your version of this file under
38 * the terms of any one of the MPL, the GPL or the LGPL.
40 * ***** END LICENSE BLOCK *****
42 * This Original Code has been modified by IBM Corporation. Modifications made
43 * by IBM described herein are Copyright (c) International Business Machines
44 * Corporation, 2000. Modifications to Mozilla code or documentation identified
45 * per MPL Section 3.3
47 * Date Modified by Description of modification
48 * 04/20/2000 IBM Corp. OS/2 VisualAge build.
51 /* part of nsFrameManager, to work around header inclusionordering */
53 #ifndef _nsFrameManagerBase_h_
54 #define _nsFrameManagerBase_h_
56 #include "pldhash.h"
58 class nsIPresShell;
59 class nsStyleSet;
60 class nsIContent;
61 class nsPlaceholderFrame;
62 class nsIFrame;
63 class nsStyleContext;
64 class nsIAtom;
65 class nsStyleChangeList;
66 class nsILayoutHistoryState;
68 class nsFrameManagerBase
70 public:
71 PRBool IsDestroyingFrames() { return mIsDestroyingFrames; }
74 * Gets and sets the root frame (typically the viewport). The lifetime of the
75 * root frame is controlled by the frame manager. When the frame manager is
76 * destroyed, it destroys the entire frame hierarchy.
78 NS_HIDDEN_(nsIFrame*) GetRootFrame() const { return mRootFrame; }
79 NS_HIDDEN_(void) SetRootFrame(nsIFrame* aRootFrame)
81 NS_ASSERTION(!mRootFrame, "already have a root frame");
82 mRootFrame = aRootFrame;
85 protected:
86 class UndisplayedMap;
88 // weak link, because the pres shell owns us
89 nsIPresShell* mPresShell;
90 // the pres shell owns the style set
91 nsStyleSet* mStyleSet;
92 nsIFrame* mRootFrame;
93 PLDHashTable mPlaceholderMap;
94 UndisplayedMap* mUndisplayedMap;
95 PRPackedBool mIsDestroyingFrames; // The frame manager is destroying some frame(s).
98 #endif