2004-03-06 07:46:11 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim:cindent:ts=2:et:sw=2:
|
|
|
|
*
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2004-03-06 07:46:11 +03:00
|
|
|
*
|
|
|
|
* This Original Code has been modified by IBM Corporation. Modifications made
|
|
|
|
* by IBM described herein are Copyright (c) International Business Machines
|
|
|
|
* Corporation, 2000. Modifications to Mozilla code or documentation identified
|
|
|
|
* per MPL Section 3.3
|
|
|
|
*
|
|
|
|
* Date Modified by Description of modification
|
|
|
|
* 04/20/2000 IBM Corp. OS/2 VisualAge build.
|
|
|
|
*/
|
|
|
|
|
2006-03-30 09:56:38 +04:00
|
|
|
/* part of nsFrameManager, to work around header inclusionordering */
|
|
|
|
|
2004-03-06 07:46:11 +03:00
|
|
|
#ifndef _nsFrameManagerBase_h_
|
|
|
|
#define _nsFrameManagerBase_h_
|
|
|
|
|
2014-06-12 21:09:31 +04:00
|
|
|
#include "nsDebug.h"
|
2015-09-16 06:49:53 +03:00
|
|
|
#include "PLDHashTable.h"
|
2015-04-17 05:33:55 +03:00
|
|
|
#include "mozilla/Attributes.h"
|
2004-03-06 07:46:11 +03:00
|
|
|
|
2014-06-12 21:09:31 +04:00
|
|
|
class nsIFrame;
|
2004-03-06 07:46:11 +03:00
|
|
|
class nsIPresShell;
|
|
|
|
|
|
|
|
class nsFrameManagerBase
|
|
|
|
{
|
2008-12-12 11:25:16 +03:00
|
|
|
public:
|
2015-05-19 05:24:34 +03:00
|
|
|
nsFrameManagerBase();
|
2012-02-02 14:06:46 +04:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool IsDestroyingFrames() { return mIsDestroyingFrames; }
|
2008-12-12 11:25:16 +03:00
|
|
|
|
2010-03-31 16:48:04 +04:00
|
|
|
/*
|
|
|
|
* Gets and sets the root frame (typically the viewport). The lifetime of the
|
|
|
|
* root frame is controlled by the frame manager. When the frame manager is
|
|
|
|
* destroyed, it destroys the entire frame hierarchy.
|
|
|
|
*/
|
2014-06-02 16:08:21 +04:00
|
|
|
nsIFrame* GetRootFrame() const { return mRootFrame; }
|
|
|
|
void SetRootFrame(nsIFrame* aRootFrame)
|
2010-03-31 16:48:04 +04:00
|
|
|
{
|
|
|
|
NS_ASSERTION(!mRootFrame, "already have a root frame");
|
|
|
|
mRootFrame = aRootFrame;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
static uint32_t GetGlobalGenerationNumber() { return sGlobalGenerationNumber; }
|
2012-07-04 19:42:29 +04:00
|
|
|
|
2004-03-06 07:46:11 +03:00
|
|
|
protected:
|
|
|
|
class UndisplayedMap;
|
|
|
|
|
|
|
|
// weak link, because the pres shell owns us
|
2015-04-17 05:33:55 +03:00
|
|
|
nsIPresShell* MOZ_NON_OWNING_REF mPresShell;
|
2004-03-06 07:46:11 +03:00
|
|
|
nsIFrame* mRootFrame;
|
2015-05-20 02:46:17 +03:00
|
|
|
PLDHashTable mPlaceholderMap;
|
2004-03-06 07:46:11 +03:00
|
|
|
UndisplayedMap* mUndisplayedMap;
|
2014-11-20 21:24:09 +03:00
|
|
|
UndisplayedMap* mDisplayContentsMap;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mIsDestroyingFrames; // The frame manager is destroying some frame(s).
|
2012-07-04 19:42:29 +04:00
|
|
|
|
|
|
|
// The frame tree generation number
|
|
|
|
// We use this to avoid unnecessary screenshotting
|
|
|
|
// on Android. Unfortunately, this is static to match
|
|
|
|
// the single consumer which is also static. Keeping
|
|
|
|
// this the same greatly simplifies lifetime issues and
|
|
|
|
// makes sure we always using the correct number.
|
|
|
|
// A per PresContext generation number is available
|
|
|
|
// via nsPresContext::GetDOMGeneration
|
2012-08-22 19:56:38 +04:00
|
|
|
static uint32_t sGlobalGenerationNumber;
|
2004-03-06 07:46:11 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|