1998-04-14 00:24:54 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/.
|
2000-05-15 07:36:34 +04: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
|
|
|
|
* 05/03/2000 IBM Corp. Observer related defines for reflow
|
1998-04-14 00:24:54 +04:00
|
|
|
*/
|
2006-03-30 09:56:38 +04:00
|
|
|
|
|
|
|
/* a presentation of a document, part 2 */
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
#ifndef nsIPresShell_h___
|
|
|
|
#define nsIPresShell_h___
|
|
|
|
|
2010-06-01 06:19:35 +04:00
|
|
|
#include "nsTHashtable.h"
|
|
|
|
#include "nsHashKeys.h"
|
1998-06-03 19:41:39 +04:00
|
|
|
#include "nsISupports.h"
|
2009-09-16 02:00:04 +04:00
|
|
|
#include "nsQueryFrame.h"
|
1998-04-14 00:24:54 +04:00
|
|
|
#include "nsCoord.h"
|
2006-01-26 05:29:17 +03:00
|
|
|
#include "nsColor.h"
|
2001-07-16 06:40:48 +04:00
|
|
|
#include "nsEvent.h"
|
2002-06-26 01:16:17 +04:00
|
|
|
#include "nsCompatibility.h"
|
2004-03-06 07:46:11 +03:00
|
|
|
#include "nsFrameManagerBase.h"
|
2010-09-04 00:10:46 +04:00
|
|
|
#include "nsRect.h"
|
2004-05-28 02:08:42 +04:00
|
|
|
#include "mozFlushType.h"
|
2005-08-22 05:55:34 +04:00
|
|
|
#include "nsWeakReference.h"
|
2004-01-08 01:30:53 +03:00
|
|
|
#include <stdio.h> // for FILE definition
|
2010-07-01 05:54:29 +04:00
|
|
|
#include "nsChangeHint.h"
|
2011-12-17 04:24:11 +04:00
|
|
|
#include "nsGUIEvent.h"
|
|
|
|
#include "nsInterfaceHashtable.h"
|
2012-02-08 22:42:38 +04:00
|
|
|
#include "nsEventStates.h"
|
2012-05-04 04:14:02 +04:00
|
|
|
#include "nsPresArena.h"
|
2000-04-27 11:37:12 +04:00
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
class nsIContent;
|
|
|
|
class nsIDocument;
|
|
|
|
class nsIFrame;
|
2004-08-01 03:15:21 +04:00
|
|
|
class nsPresContext;
|
2004-01-08 01:30:53 +03:00
|
|
|
class nsStyleSet;
|
1998-04-14 00:24:54 +04:00
|
|
|
class nsIViewManager;
|
2010-08-08 22:49:07 +04:00
|
|
|
class nsIView;
|
2011-04-08 05:04:40 +04:00
|
|
|
class nsRenderingContext;
|
1998-12-07 06:43:02 +03:00
|
|
|
class nsIPageSequenceFrame;
|
2002-02-20 01:49:12 +03:00
|
|
|
class nsAString;
|
2008-07-16 14:52:01 +04:00
|
|
|
class nsCaret;
|
2006-04-26 06:01:07 +04:00
|
|
|
class nsFrameSelection;
|
2004-02-24 00:29:06 +03:00
|
|
|
class nsFrameManager;
|
1999-08-31 02:38:58 +04:00
|
|
|
class nsILayoutHistoryState;
|
2000-07-14 03:00:59 +04:00
|
|
|
class nsIReflowCallback;
|
2001-07-16 06:40:48 +04:00
|
|
|
class nsIDOMNode;
|
2010-06-06 00:29:49 +04:00
|
|
|
class nsIntRegion;
|
2004-01-08 01:30:53 +03:00
|
|
|
class nsIStyleSheet;
|
2004-01-22 02:05:10 +03:00
|
|
|
class nsCSSFrameConstructor;
|
2005-08-29 19:19:13 +04:00
|
|
|
class nsISelection;
|
2006-03-22 21:36:36 +03:00
|
|
|
template<class E> class nsCOMArray;
|
2006-07-12 11:41:11 +04:00
|
|
|
class nsWeakFrame;
|
2007-02-18 13:43:12 +03:00
|
|
|
class nsIScrollableFrame;
|
2007-03-20 15:14:52 +03:00
|
|
|
class gfxASurface;
|
2007-05-23 04:11:05 +04:00
|
|
|
class gfxContext;
|
2009-06-30 11:56:40 +04:00
|
|
|
class nsIDOMEvent;
|
2009-07-04 13:30:59 +04:00
|
|
|
class nsDisplayList;
|
|
|
|
class nsDisplayListBuilder;
|
2010-07-03 10:27:09 +04:00
|
|
|
class nsPIDOMWindow;
|
2010-07-08 20:01:28 +04:00
|
|
|
struct nsPoint;
|
|
|
|
struct nsIntPoint;
|
|
|
|
struct nsIntRect;
|
2011-11-21 21:53:20 +04:00
|
|
|
class nsRegion;
|
2010-08-12 01:05:28 +04:00
|
|
|
class nsRefreshDriver;
|
|
|
|
class nsARefreshObserver;
|
2011-01-28 07:38:14 +03:00
|
|
|
#ifdef ACCESSIBILITY
|
|
|
|
class nsAccessibilityService;
|
|
|
|
#endif
|
2011-11-21 21:53:20 +04:00
|
|
|
class nsIWidget;
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2006-04-26 06:01:07 +04:00
|
|
|
typedef short SelectionType;
|
2010-06-09 09:28:14 +04:00
|
|
|
typedef PRUint64 nsFrameState;
|
2006-04-26 06:01:07 +04:00
|
|
|
|
2010-05-14 21:04:51 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class Element;
|
|
|
|
} // namespace dom
|
2010-08-06 02:11:23 +04:00
|
|
|
|
|
|
|
namespace layers{
|
|
|
|
class LayerManager;
|
|
|
|
} // namespace layers
|
2010-05-14 21:04:51 +04:00
|
|
|
} // namespace mozilla
|
|
|
|
|
2009-09-13 17:13:16 +04:00
|
|
|
// Flags to pass to SetCapturingContent
|
|
|
|
//
|
|
|
|
// when assigning capture, ignore whether capture is allowed or not
|
|
|
|
#define CAPTURE_IGNOREALLOWED 1
|
|
|
|
// true if events should be targeted at the capturing content or its children
|
|
|
|
#define CAPTURE_RETARGETTOELEMENT 2
|
2010-02-03 05:07:08 +03:00
|
|
|
// true if the current capture wants drags to be prevented
|
|
|
|
#define CAPTURE_PREVENTDRAG 4
|
2012-04-12 01:55:21 +04:00
|
|
|
// true when the mouse is pointer locked, and events are sent to locked elemnt
|
|
|
|
#define CAPTURE_POINTERLOCK 8
|
2009-09-13 17:13:16 +04:00
|
|
|
|
|
|
|
typedef struct CapturingContentInfo {
|
|
|
|
// capture should only be allowed during a mousedown event
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mAllowed;
|
2012-04-12 01:55:21 +04:00
|
|
|
bool mPointerLock;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool mRetargetToElement;
|
|
|
|
bool mPreventDrag;
|
2009-09-13 17:13:16 +04:00
|
|
|
nsIContent* mContent;
|
|
|
|
} CapturingContentInfo;
|
|
|
|
|
2012-05-09 23:53:15 +04:00
|
|
|
// d2236911-9b7c-490a-a08b-2580d5f7a6de
|
2012-05-04 04:14:02 +04:00
|
|
|
#define NS_IPRESSHELL_IID \
|
2012-05-09 23:53:15 +04:00
|
|
|
{ 0xd2236911, 0x9b7c, 0x490a, \
|
|
|
|
{ 0xa0, 0x8b, 0x25, 0x80, 0xd5, 0xf7, 0xa6, 0xde } }
|
2011-01-18 11:03:38 +03:00
|
|
|
|
2000-03-23 02:19:10 +03:00
|
|
|
// debug VerifyReflow flags
|
2012-03-20 06:09:50 +04:00
|
|
|
#define VERIFY_REFLOW_ON 0x01
|
|
|
|
#define VERIFY_REFLOW_NOISY 0x02
|
|
|
|
#define VERIFY_REFLOW_ALL 0x04
|
|
|
|
#define VERIFY_REFLOW_DUMP_COMMANDS 0x08
|
|
|
|
#define VERIFY_REFLOW_NOISY_RC 0x10
|
|
|
|
#define VERIFY_REFLOW_REALLY_NOISY_RC 0x20
|
2009-01-04 22:52:38 +03:00
|
|
|
#define VERIFY_REFLOW_DURING_RESIZE_REFLOW 0x40
|
2000-03-23 02:19:10 +03:00
|
|
|
|
2009-04-22 03:53:52 +04:00
|
|
|
#undef NOISY_INTERRUPTIBLE_REFLOW
|
|
|
|
|
2009-09-09 09:40:02 +04:00
|
|
|
enum nsRectVisibility {
|
|
|
|
nsRectVisibility_kVisible,
|
|
|
|
nsRectVisibility_kAboveViewport,
|
|
|
|
nsRectVisibility_kBelowViewport,
|
|
|
|
nsRectVisibility_kLeftOfViewport,
|
|
|
|
nsRectVisibility_kRightOfViewport
|
2010-12-22 01:35:09 +03:00
|
|
|
};
|
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
/**
|
|
|
|
* Presentation shell interface. Presentation shells are the
|
|
|
|
* controlling point for managing the presentation of a document. The
|
|
|
|
* presentation shell holds a live reference to the document, the
|
|
|
|
* presentation context, the style manager, the style set and the root
|
|
|
|
* frame. <p>
|
|
|
|
*
|
|
|
|
* When this object is Release'd, it will release the document, the
|
|
|
|
* presentation context, the style manager, the style set and the root
|
|
|
|
* frame.
|
|
|
|
*/
|
2004-08-29 08:18:27 +04:00
|
|
|
|
|
|
|
// hack to make egcs / gcc 2.95.2 happy
|
|
|
|
class nsIPresShell_base : public nsISupports
|
|
|
|
{
|
1998-04-14 00:24:54 +04:00
|
|
|
public:
|
2005-11-11 17:36:26 +03:00
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPRESSHELL_IID)
|
2004-08-29 08:18:27 +04:00
|
|
|
};
|
1999-03-03 04:51:21 +03:00
|
|
|
|
2005-11-11 17:36:26 +03:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsIPresShell_base, NS_IPRESSHELL_IID)
|
|
|
|
|
2004-08-29 08:18:27 +04:00
|
|
|
class nsIPresShell : public nsIPresShell_base
|
|
|
|
{
|
2010-08-06 02:11:23 +04:00
|
|
|
protected:
|
|
|
|
typedef mozilla::layers::LayerManager LayerManager;
|
|
|
|
|
2012-05-16 21:32:40 +04:00
|
|
|
enum eRenderFlag {
|
2012-05-04 09:00:57 +04:00
|
|
|
STATE_IGNORING_VIEWPORT_SCROLLING = 0x1
|
2010-09-04 00:10:46 +04:00
|
|
|
};
|
2012-05-16 21:32:40 +04:00
|
|
|
typedef PRUint8 RenderFlags; // for storing the above flags
|
2010-09-04 00:10:46 +04:00
|
|
|
|
2004-08-29 08:18:27 +04:00
|
|
|
public:
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(nsresult) Init(nsIDocument* aDocument,
|
|
|
|
nsPresContext* aPresContext,
|
|
|
|
nsIViewManager* aViewManager,
|
|
|
|
nsStyleSet* aStyleSet,
|
|
|
|
nsCompatibility aCompatMode) = 0;
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2001-08-01 07:15:50 +04:00
|
|
|
/**
|
|
|
|
* All callers are responsible for calling |Destroy| after calling
|
|
|
|
* |EndObservingDocument|. It needs to be separate only because form
|
|
|
|
* controls incorrectly store their data in the frames rather than the
|
|
|
|
* content model and printing calls |EndObservingDocument| multiple
|
|
|
|
* times to make form controls behave nicely when printed.
|
|
|
|
*/
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(void) Destroy() = 0;
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool IsDestroying() { return mIsDestroying; }
|
2001-08-01 07:15:50 +04:00
|
|
|
|
2012-05-04 04:14:02 +04:00
|
|
|
/**
|
|
|
|
* All frames owned by the shell are allocated from an arena. They
|
|
|
|
* are also recycled using free lists. Separate free lists are
|
|
|
|
* maintained for each frame type (aID), which must always correspond
|
|
|
|
* to the same aSize value. AllocateFrame returns zero-filled memory.
|
|
|
|
* AllocateFrame is fallible, it returns nsnull on out-of-memory.
|
|
|
|
*/
|
2012-05-09 23:53:15 +04:00
|
|
|
void* AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG
|
|
|
|
mPresArenaAllocCount++;
|
|
|
|
#endif
|
|
|
|
void* result = mFrameArena.AllocateByFrameID(aID, aSize);
|
|
|
|
|
|
|
|
if (result) {
|
|
|
|
memset(result, 0, aSize);
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FreeFrame(nsQueryFrame::FrameIID aID, void* aPtr)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG
|
|
|
|
mPresArenaAllocCount--;
|
|
|
|
#endif
|
|
|
|
if (PRESARENA_MUST_FREE_DURING_DESTROY || !mIsDestroying)
|
|
|
|
mFrameArena.FreeByFrameID(aID, aPtr);
|
|
|
|
}
|
2012-05-04 04:14:02 +04:00
|
|
|
|
|
|
|
/**
|
2012-05-04 04:14:02 +04:00
|
|
|
* This is for allocating other types of objects (not frames). Separate free
|
|
|
|
* lists are maintained for each type (aID), which must always correspond to
|
|
|
|
* the same aSize value. AllocateByObjectID returns zero-filled memory.
|
|
|
|
* AllocateByObjectID is fallible, it returns nsnull on out-of-memory.
|
|
|
|
*/
|
2012-05-09 23:53:15 +04:00
|
|
|
void* AllocateByObjectID(nsPresArena::ObjectID aID, size_t aSize)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG
|
|
|
|
mPresArenaAllocCount++;
|
|
|
|
#endif
|
|
|
|
void* result = mFrameArena.AllocateByObjectID(aID, aSize);
|
|
|
|
|
|
|
|
if (result) {
|
|
|
|
memset(result, 0, aSize);
|
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FreeByObjectID(nsPresArena::ObjectID aID, void* aPtr)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG
|
|
|
|
mPresArenaAllocCount--;
|
|
|
|
#endif
|
|
|
|
if (PRESARENA_MUST_FREE_DURING_DESTROY || !mIsDestroying)
|
|
|
|
mFrameArena.FreeByObjectID(aID, aPtr);
|
|
|
|
}
|
2012-05-04 04:14:02 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Other objects closely related to the frame tree that are allocated
|
|
|
|
* from a separate set of per-size free lists. Note that different types
|
|
|
|
* of objects that has the same size are allocated from the same list.
|
2012-05-04 04:14:02 +04:00
|
|
|
* AllocateMisc does *not* clear the memory that it returns.
|
|
|
|
* AllocateMisc is fallible, it returns nsnull on out-of-memory.
|
2012-05-04 04:14:02 +04:00
|
|
|
*
|
|
|
|
* @deprecated use AllocateByObjectID/FreeByObjectID instead
|
2012-05-04 04:14:02 +04:00
|
|
|
*/
|
2012-05-09 23:53:15 +04:00
|
|
|
void* AllocateMisc(size_t aSize)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG
|
|
|
|
mPresArenaAllocCount++;
|
|
|
|
#endif
|
|
|
|
return mFrameArena.AllocateBySize(aSize);
|
|
|
|
}
|
|
|
|
|
|
|
|
void FreeMisc(size_t aSize, void* aPtr)
|
|
|
|
{
|
|
|
|
#ifdef DEBUG
|
|
|
|
mPresArenaAllocCount--;
|
|
|
|
#endif
|
|
|
|
if (PRESARENA_MUST_FREE_DURING_DESTROY || !mIsDestroying)
|
|
|
|
mFrameArena.FreeBySize(aSize, aPtr);
|
|
|
|
}
|
2000-03-31 11:02:06 +04:00
|
|
|
|
2009-12-25 00:20:06 +03:00
|
|
|
nsIDocument* GetDocument() const { return mDocument; }
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2010-03-31 16:38:52 +04:00
|
|
|
nsPresContext* GetPresContext() const { return mPresContext; }
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2010-03-31 16:38:52 +04:00
|
|
|
nsIViewManager* GetViewManager() const { return mViewManager; }
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2004-01-08 01:30:53 +03:00
|
|
|
#ifdef _IMPL_NS_LAYOUT
|
2010-03-31 16:47:25 +04:00
|
|
|
nsStyleSet* StyleSet() const { return mStyleSet; }
|
2004-01-08 01:30:53 +03:00
|
|
|
|
2010-03-31 16:47:25 +04:00
|
|
|
nsCSSFrameConstructor* FrameConstructor() const { return mFrameConstructor; }
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2004-03-06 07:46:11 +03:00
|
|
|
nsFrameManager* FrameManager() const {
|
2012-02-02 14:06:46 +04:00
|
|
|
// reinterpret_cast is valid since nsFrameManager does not add
|
|
|
|
// any members over nsFrameManagerBase.
|
2007-07-08 11:08:04 +04:00
|
|
|
return reinterpret_cast<nsFrameManager*>
|
2012-02-02 14:06:46 +04:00
|
|
|
(const_cast<nsIPresShell*>(this)->mFrameManager);
|
2004-03-06 07:46:11 +03:00
|
|
|
}
|
2004-02-24 00:29:06 +03:00
|
|
|
|
|
|
|
#endif
|
2003-07-12 04:48:16 +04:00
|
|
|
|
2004-08-05 15:38:42 +04:00
|
|
|
/* Enable/disable author style level. Disabling author style disables the entire
|
|
|
|
* author level of the cascade, including the HTML preshint level.
|
|
|
|
*/
|
2004-08-29 07:08:44 +04:00
|
|
|
// XXX these could easily be inlined, but there is a circular #include
|
|
|
|
// problem with nsStyleSet.
|
2011-09-29 10:19:26 +04:00
|
|
|
NS_HIDDEN_(void) SetAuthorStyleDisabled(bool aDisabled);
|
|
|
|
NS_HIDDEN_(bool) GetAuthorStyleDisabled() const;
|
2004-08-05 15:38:42 +04:00
|
|
|
|
2001-12-18 01:51:39 +03:00
|
|
|
/*
|
|
|
|
* Called when stylesheets are added/removed/enabled/disabled to rebuild
|
|
|
|
* all style data for a given pres shell without necessarily reconstructing
|
2005-11-06 21:01:17 +03:00
|
|
|
* all of the frames. This will not reconstruct style synchronously; if
|
|
|
|
* you need to do that, call FlushPendingNotifications to flush out style
|
|
|
|
* reresolves.
|
|
|
|
* // XXXbz why do we have this on the interface anyway? The only consumer
|
|
|
|
* is calling AddOverrideStyleSheet/RemoveOverrideStyleSheet, and I think
|
|
|
|
* those should just handle reconstructing style data...
|
2001-12-18 01:51:39 +03:00
|
|
|
*/
|
2004-08-29 07:08:44 +04:00
|
|
|
virtual NS_HIDDEN_(void) ReconstructStyleDataExternal();
|
|
|
|
NS_HIDDEN_(void) ReconstructStyleDataInternal();
|
|
|
|
#ifdef _IMPL_NS_LAYOUT
|
|
|
|
void ReconstructStyleData() { ReconstructStyleDataInternal(); }
|
|
|
|
#else
|
|
|
|
void ReconstructStyleData() { ReconstructStyleDataExternal(); }
|
|
|
|
#endif
|
2001-12-18 01:51:39 +03:00
|
|
|
|
2000-10-11 12:33:01 +04:00
|
|
|
/** Setup all style rules required to implement preferences
|
|
|
|
* - used for background/text/link colors and link underlining
|
|
|
|
* may be extended for any prefs that are implemented via style rules
|
|
|
|
* - aForceReflow argument is used to force a full reframe to make the rules show
|
|
|
|
* (only used when the current page needs to reflect changed pref rules)
|
|
|
|
*
|
|
|
|
* - initially created for bugs 31816, 20760, 22963
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) SetPreferenceStyleRules(bool aForceReflow) = 0;
|
2000-10-11 12:33:01 +04:00
|
|
|
|
1999-07-18 06:27:19 +04:00
|
|
|
/**
|
2004-08-29 07:08:44 +04:00
|
|
|
* FrameSelection will return the Frame based selection API.
|
|
|
|
* You cannot go back and forth anymore with QI between nsIDOM sel and
|
|
|
|
* nsIFrame sel.
|
1999-07-18 06:27:19 +04:00
|
|
|
*/
|
2007-11-22 23:47:33 +03:00
|
|
|
already_AddRefed<nsFrameSelection> FrameSelection();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* ConstFrameSelection returns an object which methods are safe to use for
|
|
|
|
* example in nsIFrame code.
|
|
|
|
*/
|
2010-03-31 16:47:25 +04:00
|
|
|
const nsFrameSelection* ConstFrameSelection() const { return mSelection; }
|
2007-11-22 23:47:35 +03:00
|
|
|
|
2007-05-14 07:52:48 +04:00
|
|
|
// Make shell be a document observer. If called after Destroy() has
|
|
|
|
// been called on the shell, this will be ignored.
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(void) BeginObservingDocument() = 0;
|
1998-04-14 00:24:54 +04:00
|
|
|
|
|
|
|
// Make shell stop being a document observer
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(void) EndObservingDocument() = 0;
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2002-09-06 09:44:31 +04:00
|
|
|
/**
|
2008-12-29 18:07:36 +03:00
|
|
|
* Return whether InitialReflow() was previously called.
|
2002-09-06 09:44:31 +04:00
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
bool DidInitialReflow() const { return mDidInitialReflow; }
|
2002-09-06 09:44:31 +04:00
|
|
|
|
1998-09-10 23:32:14 +04:00
|
|
|
/**
|
|
|
|
* Perform the initial reflow. Constructs the frame for the root content
|
|
|
|
* object and then reflows the frame model into the specified width and
|
|
|
|
* height.
|
|
|
|
*
|
2007-05-14 07:52:48 +04:00
|
|
|
* The coordinates for aWidth and aHeight must be in standard nscoords.
|
|
|
|
*
|
|
|
|
* Callers of this method must hold a reference to this shell that
|
|
|
|
* is guaranteed to survive through arbitrary script execution.
|
|
|
|
* Calling InitialReflow can execute arbitrary script.
|
1998-09-10 23:32:14 +04:00
|
|
|
*/
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(nsresult) InitialReflow(nscoord aWidth, nscoord aHeight) = 0;
|
1998-09-10 23:32:14 +04:00
|
|
|
|
1998-04-14 00:24:54 +04:00
|
|
|
/**
|
|
|
|
* Reflow the frame model into a new width and height. The
|
|
|
|
* coordinates for aWidth and aHeight must be in standard nscoord's.
|
|
|
|
*/
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(nsresult) ResizeReflow(nscoord aWidth, nscoord aHeight) = 0;
|
2010-09-25 02:41:31 +04:00
|
|
|
/**
|
|
|
|
* Reflow, and also change presshell state so as to only permit
|
|
|
|
* reflowing off calls to ResizeReflowOverride() in the future.
|
|
|
|
* ResizeReflow() calls are ignored after ResizeReflowOverride().
|
|
|
|
*/
|
|
|
|
virtual NS_HIDDEN_(nsresult) ResizeReflowOverride(nscoord aWidth, nscoord aHeight) = 0;
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2011-04-01 01:33:46 +04:00
|
|
|
/**
|
|
|
|
* Returns true if ResizeReflowOverride has been called.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool GetIsViewportOverridden() = 0;
|
2011-04-01 01:33:46 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return true if the presshell expects layout flush.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool IsLayoutFlushObserver() = 0;
|
2011-04-01 01:33:46 +04:00
|
|
|
|
1998-11-06 19:16:01 +03:00
|
|
|
/**
|
|
|
|
* Reflow the frame model with a reflow reason of eReflowReason_StyleChange
|
|
|
|
*/
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(void) StyleChangeReflow() = 0;
|
1998-11-06 19:16:01 +03:00
|
|
|
|
2004-09-02 07:08:51 +04:00
|
|
|
/**
|
|
|
|
* This calls through to the frame manager to get the root frame.
|
|
|
|
*/
|
2010-03-31 16:48:04 +04:00
|
|
|
virtual NS_HIDDEN_(nsIFrame*) GetRootFrameExternal() const;
|
|
|
|
nsIFrame* GetRootFrame() const {
|
|
|
|
#ifdef _IMPL_NS_LAYOUT
|
2012-02-02 14:06:46 +04:00
|
|
|
return mFrameManager->GetRootFrame();
|
2010-03-31 16:48:04 +04:00
|
|
|
#else
|
|
|
|
return GetRootFrameExternal();
|
|
|
|
#endif
|
|
|
|
}
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2006-02-01 22:55:35 +03:00
|
|
|
/*
|
|
|
|
* Get root scroll frame from FrameManager()->GetRootFrame().
|
|
|
|
*/
|
|
|
|
nsIFrame* GetRootScrollFrame() const;
|
|
|
|
|
2007-02-18 13:43:12 +03:00
|
|
|
/*
|
|
|
|
* The same as GetRootScrollFrame, but returns an nsIScrollableFrame
|
|
|
|
*/
|
|
|
|
nsIScrollableFrame* GetRootScrollFrameAsScrollable() const;
|
|
|
|
|
2009-11-03 05:55:35 +03:00
|
|
|
/*
|
|
|
|
* The same as GetRootScrollFrame, but returns an nsIScrollableFrame.
|
|
|
|
* Can be called by code not linked into gklayout.
|
|
|
|
*/
|
|
|
|
virtual nsIScrollableFrame* GetRootScrollFrameAsScrollableExternal() const;
|
|
|
|
|
2010-03-11 08:25:29 +03:00
|
|
|
/*
|
|
|
|
* Gets nearest scrollable frame from current focused content or DOM
|
|
|
|
* selection if there is no focused content. The frame is scrollable with
|
|
|
|
* overflow:scroll or overflow:auto in some direction when aDirection is
|
|
|
|
* eEither. Otherwise, this returns a nearest frame that is scrollable in
|
|
|
|
* the specified direction.
|
|
|
|
*/
|
|
|
|
enum ScrollDirection { eHorizontal, eVertical, eEither };
|
|
|
|
nsIScrollableFrame* GetFrameToScrollAsScrollable(ScrollDirection aDirection);
|
|
|
|
|
1998-12-07 06:43:02 +03:00
|
|
|
/**
|
|
|
|
* Returns the page sequence frame associated with the frame hierarchy.
|
|
|
|
* Returns NULL if not a paginated view.
|
|
|
|
*/
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(nsIPageSequenceFrame*) GetPageSequenceFrame() const = 0;
|
1998-12-07 06:43:02 +03:00
|
|
|
|
2008-01-30 07:17:57 +03:00
|
|
|
/**
|
|
|
|
* Gets the real primary frame associated with the content object.
|
|
|
|
*
|
|
|
|
* In the case of absolutely positioned elements and floated elements,
|
|
|
|
* the real primary frame is the frame that is out of the flow and not the
|
|
|
|
* placeholder frame.
|
|
|
|
*/
|
|
|
|
virtual NS_HIDDEN_(nsIFrame*) GetRealPrimaryFrameFor(nsIContent* aContent) const = 0;
|
|
|
|
|
1998-12-29 06:38:16 +03:00
|
|
|
/**
|
1999-08-05 07:09:22 +04:00
|
|
|
* Gets the placeholder frame associated with the specified frame. This is
|
|
|
|
* a helper frame that forwards the request to the frame manager.
|
1998-12-29 06:38:16 +03:00
|
|
|
*/
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(nsIFrame*) GetPlaceholderFrameFor(nsIFrame* aFrame) const = 0;
|
1998-12-29 06:38:16 +03:00
|
|
|
|
1999-07-17 03:25:15 +04:00
|
|
|
/**
|
2007-05-06 23:16:51 +04:00
|
|
|
* Tell the pres shell that a frame needs to be marked dirty and needs
|
|
|
|
* Reflow. It's OK if this is an ancestor of the frame needing reflow as
|
|
|
|
* long as the ancestor chain between them doesn't cross a reflow root. The
|
2007-05-07 06:58:07 +04:00
|
|
|
* bit to add should be either NS_FRAME_IS_DIRTY or
|
2007-05-07 02:50:21 +04:00
|
|
|
* NS_FRAME_HAS_DIRTY_CHILDREN (but not both!).
|
1999-07-17 03:25:15 +04:00
|
|
|
*/
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 08:38:33 +03:00
|
|
|
enum IntrinsicDirty {
|
|
|
|
// XXXldb eResize should be renamed
|
|
|
|
eResize, // don't mark any intrinsic widths dirty
|
|
|
|
eTreeChange, // mark intrinsic widths dirty on aFrame and its ancestors
|
|
|
|
eStyleChange // Do eTreeChange, plus all of aFrame's descendants
|
|
|
|
};
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(void) FrameNeedsReflow(nsIFrame *aFrame,
|
|
|
|
IntrinsicDirty aIntrinsicDirty,
|
|
|
|
nsFrameState aBitToAdd) = 0;
|
Bug 300030: Move intrinsic width computation out of nsIFrame::Reflow and into its own methods on nsIFrame. Replace reflow reasons, types, and commands with dirty bits/notifications. Thanks to bzbarsky for almost all of the HTML form controls (mozilla/layout/forms) changes, and many others for help testing and patching. For detailed commit logs, see REFLOW_YYYYMMDD_BRANCH, where YYYYMMDD is one of 20061031, 20060830, 20060603, 20060302, 20060119, 20051011, 20050804, 20050429, 20050315, 20050111, and 20041213.
2006-12-08 08:38:33 +03:00
|
|
|
|
2009-04-22 03:53:52 +04:00
|
|
|
/**
|
|
|
|
* Tell the presshell that the given frame's reflow was interrupted. This
|
|
|
|
* will mark as having dirty children a path from the given frame (inclusive)
|
|
|
|
* to the nearest ancestor with a dirty subtree, or to the reflow root
|
|
|
|
* currently being reflowed if no such ancestor exists (inclusive). This is
|
|
|
|
* to be done immediately after reflow of the current reflow root completes.
|
|
|
|
* This method must only be called during reflow, and the frame it's being
|
|
|
|
* called on must be in the process of being reflowed when it's called. This
|
|
|
|
* method doesn't mark any intrinsic widths dirty and doesn't add any bits
|
|
|
|
* other than NS_FRAME_HAS_DIRTY_CHILDREN.
|
|
|
|
*/
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(void) FrameNeedsToContinueReflow(nsIFrame *aFrame) = 0;
|
2009-04-22 03:53:52 +04:00
|
|
|
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(void) CancelAllPendingReflows() = 0;
|
2000-04-17 11:13:57 +04:00
|
|
|
|
2002-10-22 10:07:52 +04:00
|
|
|
/**
|
|
|
|
* Recreates the frames for a node
|
|
|
|
*/
|
2010-03-31 16:41:54 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) RecreateFramesFor(nsIContent* aContent) = 0;
|
2000-10-17 09:07:39 +04:00
|
|
|
|
2010-05-14 21:04:51 +04:00
|
|
|
void PostRecreateFramesFor(mozilla::dom::Element* aElement);
|
2010-07-01 05:54:29 +04:00
|
|
|
void RestyleForAnimation(mozilla::dom::Element* aElement,
|
|
|
|
nsRestyleHint aHint);
|
2010-03-21 00:54:19 +03:00
|
|
|
|
2000-10-17 09:07:39 +04:00
|
|
|
/**
|
|
|
|
* Determine if it is safe to flush all pending notifications
|
2011-10-17 18:59:28 +04:00
|
|
|
* @param aIsSafeToFlush true if it is safe, false otherwise.
|
2000-10-17 09:07:39 +04:00
|
|
|
*
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual NS_HIDDEN_(bool) IsSafeToFlush() const = 0;
|
2000-10-17 09:07:39 +04:00
|
|
|
|
2000-04-17 11:13:57 +04:00
|
|
|
/**
|
2004-05-28 02:08:42 +04:00
|
|
|
* Flush pending notifications of the type specified. This method
|
|
|
|
* will not affect the content model; it'll just affect style and
|
|
|
|
* frames. Callers that actually want up-to-date presentation (other
|
|
|
|
* than the document itself) should probably be calling
|
|
|
|
* nsIDocument::FlushPendingNotifications.
|
|
|
|
*
|
|
|
|
* @param aType the type of notifications to flush
|
2000-04-17 11:13:57 +04:00
|
|
|
*/
|
2010-03-21 00:54:19 +03:00
|
|
|
virtual NS_HIDDEN_(void) FlushPendingNotifications(mozFlushType aType) = 0;
|
2000-04-17 11:13:57 +04:00
|
|
|
|
2007-03-06 00:55:23 +03:00
|
|
|
/**
|
|
|
|
* Callbacks will be called even if reflow itself fails for
|
|
|
|
* some reason.
|
|
|
|
*/
|
2010-03-31 16:41:54 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) PostReflowCallback(nsIReflowCallback* aCallback) = 0;
|
|
|
|
virtual NS_HIDDEN_(void) CancelReflowCallback(nsIReflowCallback* aCallback) = 0;
|
1998-04-14 00:24:54 +04:00
|
|
|
|
2010-03-31 16:41:54 +04:00
|
|
|
virtual NS_HIDDEN_(void) ClearFrameRefs(nsIFrame* aFrame) = 0;
|
1999-02-12 20:45:58 +03:00
|
|
|
|
1998-10-02 05:12:39 +04:00
|
|
|
/**
|
2010-08-20 23:29:01 +04:00
|
|
|
* Get a reference rendering context. This is a context that should not
|
|
|
|
* be rendered to, but is suitable for measuring text and performing
|
|
|
|
* other non-rendering operations.
|
1998-10-02 05:12:39 +04:00
|
|
|
*/
|
2011-04-08 05:04:40 +04:00
|
|
|
virtual already_AddRefed<nsRenderingContext> GetReferenceRenderingContext() = 0;
|
1998-10-02 05:12:39 +04:00
|
|
|
|
1999-02-12 08:39:33 +03:00
|
|
|
/**
|
2003-01-14 02:10:53 +03:00
|
|
|
* Informs the pres shell that the document is now at the anchor with
|
|
|
|
* the given name. If |aScroll| is true, scrolls the view of the
|
|
|
|
* document so that the anchor with the specified name is displayed at
|
|
|
|
* the top of the window. If |aAnchorName| is empty, then this informs
|
|
|
|
* the pres shell that there is no current target, and |aScroll| must
|
|
|
|
* be false.
|
1999-02-12 08:39:33 +03:00
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) GoToAnchor(const nsAString& aAnchorName, bool aScroll) = 0;
|
1999-02-12 08:39:33 +03:00
|
|
|
|
2008-02-27 13:01:17 +03:00
|
|
|
/**
|
|
|
|
* Tells the presshell to scroll again to the last anchor scrolled to by
|
|
|
|
* GoToAnchor, if any. This scroll only happens if the scroll
|
|
|
|
* position has not changed since the last GoToAnchor. This is called
|
|
|
|
* by nsDocumentViewer::LoadComplete. This clears the last anchor
|
|
|
|
* scrolled to by GoToAnchor (we don't want to keep it alive if it's
|
|
|
|
* removed from the DOM), so don't call this more than once.
|
|
|
|
*/
|
2010-03-31 16:41:54 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) ScrollToAnchor() = 0;
|
2008-02-27 13:01:17 +03:00
|
|
|
|
2012-03-20 06:09:50 +04:00
|
|
|
enum {
|
|
|
|
SCROLL_TOP = 0,
|
|
|
|
SCROLL_BOTTOM = 100,
|
|
|
|
SCROLL_LEFT = 0,
|
|
|
|
SCROLL_RIGHT = 100,
|
|
|
|
SCROLL_CENTER = 50,
|
|
|
|
SCROLL_MINIMUM = -1
|
|
|
|
};
|
|
|
|
|
|
|
|
enum WhenToScroll {
|
|
|
|
SCROLL_ALWAYS,
|
|
|
|
SCROLL_IF_NOT_VISIBLE,
|
|
|
|
SCROLL_IF_NOT_FULLY_VISIBLE
|
|
|
|
};
|
|
|
|
typedef struct ScrollAxis {
|
|
|
|
PRInt16 mWhereToScroll;
|
2012-05-16 21:32:40 +04:00
|
|
|
WhenToScroll mWhenToScroll : 16;
|
2012-03-20 06:09:50 +04:00
|
|
|
/**
|
|
|
|
* @param aWhere: Either a percentage or a special value.
|
|
|
|
* nsIPresShell defines:
|
|
|
|
* * (Default) SCROLL_MINIMUM = -1: The visible area is
|
|
|
|
* scrolled to show the entire frame. If the frame is too
|
|
|
|
* large, the top and left edges are given precedence.
|
|
|
|
* * SCROLL_TOP = 0: The frame's upper edge is aligned with the
|
|
|
|
* top edge of the visible area.
|
|
|
|
* * SCROLL_BOTTOM = 100: The frame's bottom edge is aligned
|
|
|
|
* with the bottom edge of the visible area.
|
|
|
|
* * SCROLL_LEFT = 0: The frame's left edge is aligned with the
|
|
|
|
* left edge of the visible area.
|
|
|
|
* * SCROLL_RIGHT = 100: The frame's right edge is aligned with
|
|
|
|
* the right edge of the visible area.
|
|
|
|
* * SCROLL_CENTER = 50: The frame is centered along the axis
|
|
|
|
* the ScrollAxis is used for.
|
|
|
|
*
|
|
|
|
* Other values are treated as a percentage, and the point
|
|
|
|
* "percent" down the frame is placed at the point "percent"
|
|
|
|
* down the visible area.
|
|
|
|
* @param aWhen:
|
|
|
|
* * (Default) SCROLL_IF_NOT_FULLY_VISIBLE: Move the frame only
|
|
|
|
* if it is not fully visible (including if it's not visible
|
|
|
|
* at all). Note that in this case if the frame is too large to
|
|
|
|
* fit in view, it will only be scrolled if more of it can fit
|
|
|
|
* than is already in view.
|
|
|
|
* * SCROLL_IF_NOT_VISIBLE: Move the frame only if none of it
|
|
|
|
* is visible.
|
|
|
|
* * SCROLL_ALWAYS: Move the frame regardless of its current
|
|
|
|
* visibility.
|
|
|
|
*/
|
|
|
|
ScrollAxis(PRInt16 aWhere = SCROLL_MINIMUM,
|
|
|
|
WhenToScroll aWhen = SCROLL_IF_NOT_FULLY_VISIBLE) :
|
|
|
|
mWhereToScroll(aWhere), mWhenToScroll(aWhen) {}
|
|
|
|
} ScrollAxis;
|
1999-02-19 01:51:46 +03:00
|
|
|
/**
|
2007-03-07 22:08:36 +03:00
|
|
|
* Scrolls the view of the document so that the primary frame of the content
|
2010-01-12 00:45:16 +03:00
|
|
|
* is displayed in the window. Layout is flushed before scrolling.
|
1999-07-19 22:38:02 +04:00
|
|
|
*
|
2007-03-07 22:08:36 +03:00
|
|
|
* @param aContent The content object of which primary frame should be
|
|
|
|
* scrolled into view.
|
2012-03-20 06:09:50 +04:00
|
|
|
* @param aVertical How to align the frame vertically and when to do so.
|
|
|
|
* This is a ScrollAxis of Where and When.
|
|
|
|
* @param aHorizontal How to align the frame horizontally and when to do so.
|
|
|
|
* This is a ScrollAxis of Where and When.
|
2010-10-28 20:01:37 +04:00
|
|
|
* @param aFlags If SCROLL_FIRST_ANCESTOR_ONLY is set, only the nearest
|
|
|
|
* scrollable ancestor is scrolled, otherwise all
|
|
|
|
* scrollable ancestors may be scrolled if necessary.
|
|
|
|
* If SCROLL_OVERFLOW_HIDDEN is set then we may scroll in a
|
|
|
|
* direction even if overflow:hidden is specified in that
|
|
|
|
* direction; otherwise we will not scroll in that direction
|
|
|
|
* when overflow:hidden is set for that direction.
|
2011-02-11 10:46:59 +03:00
|
|
|
* If SCROLL_NO_PARENT_FRAMES is set then we only scroll
|
|
|
|
* nodes in this document, not in any parent documents which
|
|
|
|
* contain this document in a iframe or the like.
|
2007-03-06 12:53:56 +03:00
|
|
|
*/
|
2010-03-31 16:41:54 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) ScrollContentIntoView(nsIContent* aContent,
|
2012-03-20 06:09:50 +04:00
|
|
|
ScrollAxis aVertical,
|
|
|
|
ScrollAxis aHorizontal,
|
2010-10-28 20:01:37 +04:00
|
|
|
PRUint32 aFlags) = 0;
|
2007-03-06 12:53:56 +03:00
|
|
|
|
2010-01-12 00:45:16 +03:00
|
|
|
enum {
|
|
|
|
SCROLL_FIRST_ANCESTOR_ONLY = 0x01,
|
2011-02-11 10:46:59 +03:00
|
|
|
SCROLL_OVERFLOW_HIDDEN = 0x02,
|
2011-04-11 20:39:49 +04:00
|
|
|
SCROLL_NO_PARENT_FRAMES = 0x04
|
2010-01-12 00:45:16 +03:00
|
|
|
};
|
|
|
|
/**
|
|
|
|
* Scrolls the view of the document so that the given area of a frame
|
|
|
|
* is visible, if possible. Layout is not flushed before scrolling.
|
|
|
|
*
|
|
|
|
* @param aRect relative to aFrame
|
2012-03-20 06:09:50 +04:00
|
|
|
* @param aVertical see ScrollContentIntoView and ScrollAxis
|
|
|
|
* @param aHorizontal see ScrollContentIntoView and ScrollAxis
|
2010-01-12 00:45:16 +03:00
|
|
|
* @param aFlags if SCROLL_FIRST_ANCESTOR_ONLY is set, only the
|
|
|
|
* nearest scrollable ancestor is scrolled, otherwise all
|
|
|
|
* scrollable ancestors may be scrolled if necessary
|
|
|
|
* if SCROLL_OVERFLOW_HIDDEN is set then we may scroll in a direction
|
|
|
|
* even if overflow:hidden is specified in that direction; otherwise
|
|
|
|
* we will not scroll in that direction when overflow:hidden is
|
|
|
|
* set for that direction
|
2011-02-11 10:46:59 +03:00
|
|
|
* If SCROLL_NO_PARENT_FRAMES is set then we only scroll
|
|
|
|
* nodes in this document, not in any parent documents which
|
|
|
|
* contain this document in a iframe or the like.
|
2010-01-12 00:45:16 +03:00
|
|
|
* @return true if any scrolling happened, false if no scrolling happened
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool ScrollFrameRectIntoView(nsIFrame* aFrame,
|
2012-03-20 06:09:50 +04:00
|
|
|
const nsRect& aRect,
|
|
|
|
ScrollAxis aVertical,
|
|
|
|
ScrollAxis aHorizontal,
|
|
|
|
PRUint32 aFlags) = 0;
|
2010-01-12 00:45:16 +03:00
|
|
|
|
2009-09-09 09:40:02 +04:00
|
|
|
/**
|
|
|
|
* Determine if a rectangle specified in the frame's coordinate system
|
|
|
|
* intersects the viewport "enough" to be considered visible.
|
|
|
|
* @param aFrame frame that aRect coordinates are specified relative to
|
|
|
|
* @param aRect rectangle in twips to test for visibility
|
|
|
|
* @param aMinTwips is the minimum distance in from the edge of the viewport
|
|
|
|
* that an object must be to be counted visible
|
|
|
|
* @return nsRectVisibility_kVisible if the rect is visible
|
|
|
|
* nsRectVisibility_kAboveViewport
|
|
|
|
* nsRectVisibility_kBelowViewport
|
|
|
|
* nsRectVisibility_kLeftOfViewport
|
|
|
|
* nsRectVisibility_kRightOfViewport rectangle is outside the viewport
|
|
|
|
* in the specified direction
|
|
|
|
*/
|
|
|
|
virtual nsRectVisibility GetRectVisibility(nsIFrame *aFrame,
|
2010-03-31 16:47:25 +04:00
|
|
|
const nsRect &aRect,
|
|
|
|
nscoord aMinTwips) const = 0;
|
2009-09-09 09:40:02 +04:00
|
|
|
|
2001-12-01 03:22:00 +03:00
|
|
|
/**
|
|
|
|
* Suppress notification of the frame manager that frames are
|
|
|
|
* being destroyed.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual NS_HIDDEN_(void) SetIgnoreFrameDestruction(bool aIgnore) = 0;
|
2001-12-01 03:22:00 +03:00
|
|
|
|
1999-07-17 03:25:15 +04:00
|
|
|
/**
|
|
|
|
* Notification sent by a frame informing the pres shell that it is about to
|
|
|
|
* be destroyed.
|
|
|
|
* This allows any outstanding references to the frame to be cleaned up
|
|
|
|
*/
|
2010-03-31 16:41:54 +04:00
|
|
|
virtual NS_HIDDEN_(void) NotifyDestroyingFrame(nsIFrame* aFrame) = 0;
|
1999-07-17 03:25:15 +04:00
|
|
|
|
2001-04-18 10:06:31 +04:00
|
|
|
/**
|
2002-08-02 01:36:02 +04:00
|
|
|
* Get link location.
|
2001-04-18 10:06:31 +04:00
|
|
|
*/
|
2010-03-31 16:47:25 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) GetLinkLocation(nsIDOMNode* aNode, nsAString& aLocation) const = 0;
|
2001-04-18 10:06:31 +04:00
|
|
|
|
1999-02-13 07:45:44 +03:00
|
|
|
/**
|
|
|
|
* Get the caret, if it exists. AddRefs it.
|
|
|
|
*/
|
2010-03-31 16:47:25 +04:00
|
|
|
virtual NS_HIDDEN_(already_AddRefed<nsCaret>) GetCaret() const = 0;
|
1999-08-05 00:46:16 +04:00
|
|
|
|
2006-11-07 04:35:36 +03:00
|
|
|
/**
|
|
|
|
* Invalidate the caret's current position if it's outside of its frame's
|
|
|
|
* boundaries. This function is useful if you're batching selection
|
|
|
|
* notifications and might remove the caret's frame out from under it.
|
|
|
|
*/
|
2010-03-31 16:39:31 +04:00
|
|
|
virtual NS_HIDDEN_(void) MaybeInvalidateCaretPosition() = 0;
|
2006-11-07 04:35:36 +03:00
|
|
|
|
2006-04-18 03:16:46 +04:00
|
|
|
/**
|
2007-09-23 01:06:58 +04:00
|
|
|
* Set the current caret to a new caret. To undo this, call RestoreCaret.
|
2007-09-23 01:06:58 +04:00
|
|
|
*/
|
2008-07-16 14:52:01 +04:00
|
|
|
virtual void SetCaret(nsCaret *aNewCaret) = 0;
|
2007-09-23 01:06:58 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Restore the caret to the original caret that this pres shell was created
|
|
|
|
* with.
|
|
|
|
*/
|
|
|
|
virtual void RestoreCaret() = 0;
|
2006-04-18 03:16:46 +04:00
|
|
|
|
1999-08-05 00:46:16 +04:00
|
|
|
/**
|
|
|
|
* Should the images have borders etc. Actual visual effects are determined
|
|
|
|
* by the frames. Visual effects may not effect layout, only display.
|
|
|
|
* Takes effect on next repaint, does not force a repaint itself.
|
|
|
|
*
|
2011-10-17 18:59:28 +04:00
|
|
|
* @param aInEnable if true, visual selection effects are enabled
|
|
|
|
* if false visual selection effects are disabled
|
1999-08-05 00:46:16 +04:00
|
|
|
*/
|
2001-12-18 04:29:49 +03:00
|
|
|
NS_IMETHOD SetSelectionFlags(PRInt16 aInEnable) = 0;
|
1999-08-05 00:46:16 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the current state of non text selection effects
|
2010-03-21 00:54:19 +03:00
|
|
|
* @return current state of non text selection,
|
|
|
|
* as set by SetDisplayNonTextSelection
|
1999-08-05 00:46:16 +04:00
|
|
|
*/
|
2010-03-31 16:45:08 +04:00
|
|
|
PRInt16 GetSelectionFlags() const { return mSelectionFlags; }
|
2010-03-21 00:54:19 +03:00
|
|
|
|
2006-04-26 06:01:07 +04:00
|
|
|
virtual nsISelection* GetCurrentSelection(SelectionType aType) = 0;
|
1999-05-17 04:21:18 +04:00
|
|
|
|
2000-04-24 08:41:27 +04:00
|
|
|
/**
|
|
|
|
* Interface to dispatch events via the presshell
|
2007-03-26 09:38:22 +04:00
|
|
|
* @note The caller must have a strong reference to the PresShell.
|
2000-04-24 08:41:27 +04:00
|
|
|
*/
|
2010-03-31 16:50:20 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) HandleEventWithTarget(nsEvent* aEvent,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsEventStatus* aStatus) = 0;
|
2000-04-24 08:41:27 +04:00
|
|
|
|
2000-06-29 06:02:43 +04:00
|
|
|
/**
|
|
|
|
* Dispatch event to content only (NOT full processing)
|
2007-03-26 09:38:22 +04:00
|
|
|
* @note The caller must have a strong reference to the PresShell.
|
2000-06-29 06:02:43 +04:00
|
|
|
*/
|
2010-03-31 16:50:20 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
|
|
|
nsEvent* aEvent,
|
|
|
|
nsEventStatus* aStatus) = 0;
|
2000-06-29 06:02:43 +04:00
|
|
|
|
2009-06-30 11:56:40 +04:00
|
|
|
/**
|
|
|
|
* Dispatch event to content only (NOT full processing)
|
|
|
|
* @note The caller must have a strong reference to the PresShell.
|
|
|
|
*/
|
2010-03-31 16:50:20 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) HandleDOMEventWithTarget(nsIContent* aTargetContent,
|
|
|
|
nsIDOMEvent* aEvent,
|
|
|
|
nsEventStatus* aStatus) = 0;
|
2009-06-30 11:56:40 +04:00
|
|
|
|
2000-06-24 07:58:13 +04:00
|
|
|
/**
|
|
|
|
* Gets the current target event frame from the PresShell
|
|
|
|
*/
|
2010-03-31 16:43:01 +04:00
|
|
|
virtual NS_HIDDEN_(nsIFrame*) GetEventTargetFrame() = 0;
|
2000-06-24 07:58:13 +04:00
|
|
|
|
2003-02-15 00:43:06 +03:00
|
|
|
/**
|
|
|
|
* Gets the current target event frame from the PresShell
|
|
|
|
*/
|
2010-03-31 16:43:01 +04:00
|
|
|
virtual NS_HIDDEN_(already_AddRefed<nsIContent>) GetEventTargetContent(nsEvent* aEvent) = 0;
|
2003-02-15 00:43:06 +03:00
|
|
|
|
1999-08-31 02:38:58 +04:00
|
|
|
/**
|
1999-08-31 18:35:50 +04:00
|
|
|
* Get and set the history state for the current document
|
1999-08-31 02:38:58 +04:00
|
|
|
*/
|
1999-12-06 10:44:18 +03:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) CaptureHistoryState(nsILayoutHistoryState** aLayoutHistoryState, bool aLeavingPage = false) = 0;
|
1998-07-13 23:49:20 +04:00
|
|
|
|
2000-02-09 18:48:01 +03:00
|
|
|
/**
|
|
|
|
* Determine if reflow is currently locked
|
2011-10-17 18:59:28 +04:00
|
|
|
* returns true if reflow is locked, false otherwise
|
2000-02-09 18:48:01 +03:00
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
bool IsReflowLocked() const { return mIsReflowing; }
|
2000-02-09 18:48:01 +03:00
|
|
|
|
2001-04-25 23:52:49 +04:00
|
|
|
/**
|
|
|
|
* Called to find out if painting is suppressed for this presshell. If it is suppressd,
|
|
|
|
* we don't allow the painting of any layer but the background, and we don't
|
|
|
|
* recur into our children.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
bool IsPaintingSuppressed() const { return mPaintingSuppressed; }
|
2001-04-25 23:52:49 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Unsuppress painting.
|
|
|
|
*/
|
2010-03-31 16:43:49 +04:00
|
|
|
virtual NS_HIDDEN_(void) UnsuppressPainting() = 0;
|
2001-04-25 23:52:49 +04:00
|
|
|
|
2002-09-21 05:03:38 +04:00
|
|
|
/**
|
|
|
|
* Called to disable nsITheme support in a specific presshell.
|
|
|
|
*/
|
2010-04-11 00:15:22 +04:00
|
|
|
void DisableThemeSupport()
|
|
|
|
{
|
|
|
|
// Doesn't have to be dynamic. Just set the bool.
|
2011-10-17 18:59:28 +04:00
|
|
|
mIsThemeSupportDisabled = true;
|
2010-04-11 00:15:22 +04:00
|
|
|
}
|
2002-09-21 05:03:38 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates whether theme support is enabled.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
bool IsThemeSupportEnabled() const { return !mIsThemeSupportDisabled; }
|
2002-09-21 05:03:38 +04:00
|
|
|
|
2004-01-08 01:30:53 +03:00
|
|
|
/**
|
|
|
|
* Get the set of agent style sheets for this presentation
|
|
|
|
*/
|
|
|
|
virtual nsresult GetAgentStyleSheets(nsCOMArray<nsIStyleSheet>& aSheets) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Replace the set of agent style sheets
|
|
|
|
*/
|
|
|
|
virtual nsresult SetAgentStyleSheets(const nsCOMArray<nsIStyleSheet>& aSheets) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add an override style sheet for this presentation
|
|
|
|
*/
|
|
|
|
virtual nsresult AddOverrideStyleSheet(nsIStyleSheet *aSheet) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Remove an override style sheet
|
|
|
|
*/
|
|
|
|
virtual nsresult RemoveOverrideStyleSheet(nsIStyleSheet *aSheet) = 0;
|
|
|
|
|
2004-01-22 02:05:10 +03:00
|
|
|
/**
|
|
|
|
* Reconstruct frames for all elements in the document
|
|
|
|
*/
|
|
|
|
virtual nsresult ReconstructFrames() = 0;
|
|
|
|
|
2012-02-08 22:42:38 +04:00
|
|
|
/**
|
|
|
|
* Notify that a content node's state has changed
|
|
|
|
*/
|
|
|
|
virtual void ContentStateChanged(nsIDocument* aDocument,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsEventStates aStateMask) = 0;
|
|
|
|
|
2007-09-05 12:00:40 +04:00
|
|
|
/**
|
|
|
|
* Given aFrame, the root frame of a stacking context, find its descendant
|
|
|
|
* frame under the point aPt that receives a mouse event at that location,
|
|
|
|
* or nsnull if there is no such frame.
|
|
|
|
* @param aPt the point, relative to the frame origin
|
|
|
|
*/
|
|
|
|
virtual nsIFrame* GetFrameForPoint(nsIFrame* aFrame, nsPoint aPt) = 0;
|
|
|
|
|
1998-07-13 23:49:20 +04:00
|
|
|
/**
|
|
|
|
* See if reflow verification is enabled. To enable reflow verification add
|
|
|
|
* "verifyreflow:1" to your NSPR_LOG_MODULES environment variable
|
|
|
|
* (any non-zero debug level will work). Or, call SetVerifyReflowEnable
|
2011-10-17 18:59:28 +04:00
|
|
|
* with true.
|
1998-07-13 23:49:20 +04:00
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool GetVerifyReflowEnable();
|
1998-07-13 23:49:20 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the verify-reflow enable flag.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
static void SetVerifyReflowEnable(bool aEnabled);
|
1999-08-31 02:38:58 +04:00
|
|
|
|
2008-01-22 10:39:06 +03:00
|
|
|
virtual nsIFrame* GetAbsoluteContainingBlock(nsIFrame* aFrame);
|
|
|
|
|
2000-04-21 18:59:47 +04:00
|
|
|
#ifdef MOZ_REFLOW_PERF
|
2010-03-31 16:45:32 +04:00
|
|
|
virtual NS_HIDDEN_(void) DumpReflows() = 0;
|
|
|
|
virtual NS_HIDDEN_(void) CountReflows(const char * aName, nsIFrame * aFrame) = 0;
|
|
|
|
virtual NS_HIDDEN_(void) PaintCount(const char * aName,
|
2011-04-08 05:04:40 +04:00
|
|
|
nsRenderingContext* aRenderingContext,
|
2010-03-31 16:45:32 +04:00
|
|
|
nsPresContext * aPresContext,
|
|
|
|
nsIFrame * aFrame,
|
2011-04-08 05:04:40 +04:00
|
|
|
const nsPoint& aOffset,
|
2010-03-31 16:45:32 +04:00
|
|
|
PRUint32 aColor) = 0;
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual NS_HIDDEN_(void) SetPaintFrameCount(bool aOn) = 0;
|
|
|
|
virtual bool IsPaintingFrameCounts() = 0;
|
2000-04-21 18:59:47 +04:00
|
|
|
#endif
|
|
|
|
|
2004-01-08 01:30:53 +03:00
|
|
|
#ifdef DEBUG
|
|
|
|
// Debugging hooks
|
|
|
|
virtual void ListStyleContexts(nsIFrame *aRootFrame, FILE *out,
|
|
|
|
PRInt32 aIndent = 0) = 0;
|
|
|
|
|
|
|
|
virtual void ListStyleSheets(FILE *out, PRInt32 aIndent = 0) = 0;
|
2005-11-06 21:01:17 +03:00
|
|
|
virtual void VerifyStyleTree() = 0;
|
2004-01-08 01:30:53 +03:00
|
|
|
#endif
|
|
|
|
|
2011-01-28 07:38:14 +03:00
|
|
|
#ifdef ACCESSIBILITY
|
2011-07-19 12:30:19 +04:00
|
|
|
/**
|
|
|
|
* Return true if accessibility is active.
|
|
|
|
*/
|
|
|
|
static bool IsAccessibilityActive();
|
|
|
|
|
2011-01-28 07:38:14 +03:00
|
|
|
/**
|
|
|
|
* Return accessibility service if accessibility is active.
|
|
|
|
*/
|
|
|
|
static nsAccessibilityService* AccService();
|
|
|
|
#endif
|
|
|
|
|
2005-05-05 00:22:32 +04:00
|
|
|
/**
|
|
|
|
* Stop all active elements (plugins and the caret) in this presentation and
|
2005-07-01 11:12:02 +04:00
|
|
|
* in the presentations of subdocuments. Resets painting to a suppressed state.
|
2005-05-05 00:22:32 +04:00
|
|
|
* XXX this should include image animations
|
|
|
|
*/
|
|
|
|
virtual void Freeze() = 0;
|
2011-09-29 10:19:26 +04:00
|
|
|
bool IsFrozen() { return mFrozen; }
|
2005-05-05 00:22:32 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Restarts active elements (plugins) in this presentation and in the
|
2005-07-01 11:12:02 +04:00
|
|
|
* presentations of subdocuments, then do a full invalidate of the content area.
|
2005-05-05 00:22:32 +04:00
|
|
|
*/
|
2005-07-19 21:07:40 +04:00
|
|
|
virtual void Thaw() = 0;
|
2005-05-05 00:22:32 +04:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual void FireOrClearDelayedEvents(bool aFireEvents) = 0;
|
2009-03-03 23:11:14 +03:00
|
|
|
|
2005-08-22 05:55:34 +04:00
|
|
|
/**
|
|
|
|
* When this shell is disconnected from its containing docshell, we
|
|
|
|
* lose our container pointer. However, we'd still like to be able to target
|
|
|
|
* user events at the docshell's parent. This pointer allows us to do that.
|
|
|
|
* It should not be used for any other purpose.
|
|
|
|
*/
|
2005-08-22 23:46:25 +04:00
|
|
|
void SetForwardingContainer(nsWeakPtr aContainer)
|
|
|
|
{
|
|
|
|
mForwardingContainer = aContainer;
|
|
|
|
}
|
2006-01-26 05:29:17 +03:00
|
|
|
|
|
|
|
/**
|
2007-05-23 04:11:05 +04:00
|
|
|
* Render the document into an arbitrary gfxContext
|
|
|
|
* Designed for getting a picture of a document or a piece of a document
|
|
|
|
* Note that callers will generally want to call FlushPendingNotifications
|
|
|
|
* to get an up-to-date view of the document
|
2006-01-26 05:29:17 +03:00
|
|
|
* @param aRect is the region to capture into the offscreen buffer, in the
|
|
|
|
* root frame's coordinate system (if aIgnoreViewportScrolling is false)
|
|
|
|
* or in the root scrolled frame's coordinate system
|
2007-11-08 07:43:36 +03:00
|
|
|
* (if aIgnoreViewportScrolling is true). The coordinates are in appunits.
|
2008-12-12 13:50:31 +03:00
|
|
|
* @param aFlags see below;
|
|
|
|
* set RENDER_IS_UNTRUSTED if the contents may be passed to malicious
|
2006-01-26 05:29:17 +03:00
|
|
|
* agents. E.g. we might choose not to paint the contents of sensitive widgets
|
|
|
|
* such as the file name in a file upload widget, and we might choose not
|
|
|
|
* to paint themes.
|
2008-12-12 13:50:31 +03:00
|
|
|
* set RENDER_IGNORE_VIEWPORT_SCROLLING to ignore
|
|
|
|
* clipping/scrolling/scrollbar painting due to scrolling in the viewport
|
|
|
|
* set RENDER_CARET to draw the caret if one would be visible
|
|
|
|
* (by default the caret is never drawn)
|
2010-03-01 11:03:49 +03:00
|
|
|
* set RENDER_USE_LAYER_MANAGER to force rendering to go through
|
|
|
|
* the layer manager for the window. This may be unexpectedly slow
|
|
|
|
* (if the layer manager must read back data from the GPU) or low-quality
|
|
|
|
* (if the layer manager reads back pixel data and scales it
|
|
|
|
* instead of rendering using the appropriate scaling). It may also
|
|
|
|
* slow everything down if the area rendered does not correspond to the
|
|
|
|
* normal visible area of the window.
|
2010-07-27 01:20:45 +04:00
|
|
|
* set RENDER_ASYNC_DECODE_IMAGES to avoid having images synchronously
|
|
|
|
* decoded during rendering.
|
|
|
|
* (by default images decode synchronously with RenderDocument)
|
2010-09-04 00:10:46 +04:00
|
|
|
* set RENDER_DOCUMENT_RELATIVE to interpret |aRect| relative to the
|
|
|
|
* document instead of the CSS viewport
|
2006-01-26 05:29:17 +03:00
|
|
|
* @param aBackgroundColor a background color to render onto
|
2007-11-08 07:43:36 +03:00
|
|
|
* @param aRenderedContext the gfxContext to render to. We render so that
|
|
|
|
* one CSS pixel in the source document is rendered to one unit in the current
|
|
|
|
* transform.
|
2007-05-23 04:11:05 +04:00
|
|
|
*/
|
2008-12-12 13:50:31 +03:00
|
|
|
enum {
|
|
|
|
RENDER_IS_UNTRUSTED = 0x01,
|
|
|
|
RENDER_IGNORE_VIEWPORT_SCROLLING = 0x02,
|
2010-03-01 11:03:49 +03:00
|
|
|
RENDER_CARET = 0x04,
|
2010-07-27 01:20:45 +04:00
|
|
|
RENDER_USE_WIDGET_LAYERS = 0x08,
|
2010-09-04 00:10:46 +04:00
|
|
|
RENDER_ASYNC_DECODE_IMAGES = 0x10,
|
|
|
|
RENDER_DOCUMENT_RELATIVE = 0x20
|
2008-12-12 13:50:31 +03:00
|
|
|
};
|
2010-03-31 16:45:32 +04:00
|
|
|
virtual NS_HIDDEN_(nsresult) RenderDocument(const nsRect& aRect, PRUint32 aFlags,
|
|
|
|
nscolor aBackgroundColor,
|
|
|
|
gfxContext* aRenderedContext) = 0;
|
2005-08-22 05:55:34 +04:00
|
|
|
|
2007-03-20 15:14:52 +03:00
|
|
|
/**
|
|
|
|
* Renders a node aNode to a surface and returns it. The aRegion may be used
|
2010-06-06 00:29:49 +04:00
|
|
|
* to clip the rendering. This region is measured in CSS pixels from the
|
2007-03-20 15:14:52 +03:00
|
|
|
* edge of the presshell area. The aPoint, aScreenRect and aSurface
|
|
|
|
* arguments function in a similar manner as RenderSelection.
|
|
|
|
*/
|
|
|
|
virtual already_AddRefed<gfxASurface> RenderNode(nsIDOMNode* aNode,
|
2010-06-06 00:29:49 +04:00
|
|
|
nsIntRegion* aRegion,
|
2009-01-15 06:27:09 +03:00
|
|
|
nsIntPoint& aPoint,
|
|
|
|
nsIntRect* aScreenRect) = 0;
|
2007-03-20 15:14:52 +03:00
|
|
|
|
2009-07-04 13:30:59 +04:00
|
|
|
/**
|
2007-03-20 15:14:52 +03:00
|
|
|
* Renders a selection to a surface and returns it. This method is primarily
|
|
|
|
* intended to create the drag feedback when dragging a selection.
|
|
|
|
*
|
|
|
|
* aScreenRect will be filled in with the bounding rectangle of the
|
|
|
|
* selection area on screen.
|
|
|
|
*
|
|
|
|
* If the area of the selection is large, the image will be scaled down.
|
|
|
|
* The argument aPoint is used in this case as a reference point when
|
|
|
|
* determining the new screen rectangle after scaling. Typically, this
|
|
|
|
* will be the mouse position, so that the screen rectangle is positioned
|
|
|
|
* such that the mouse is over the same point in the scaled image as in
|
|
|
|
* the original. When scaling does not occur, the mouse point isn't used
|
|
|
|
* as the position can be determined from the displayed frames.
|
|
|
|
*/
|
|
|
|
virtual already_AddRefed<gfxASurface> RenderSelection(nsISelection* aSelection,
|
2009-01-15 06:27:09 +03:00
|
|
|
nsIntPoint& aPoint,
|
|
|
|
nsIntRect* aScreenRect) = 0;
|
2007-03-20 15:14:52 +03:00
|
|
|
|
2009-11-16 17:03:53 +03:00
|
|
|
void AddWeakFrameInternal(nsWeakFrame* aWeakFrame);
|
|
|
|
virtual void AddWeakFrameExternal(nsWeakFrame* aWeakFrame);
|
|
|
|
|
|
|
|
void AddWeakFrame(nsWeakFrame* aWeakFrame)
|
|
|
|
{
|
|
|
|
#ifdef _IMPL_NS_LAYOUT
|
|
|
|
AddWeakFrameInternal(aWeakFrame);
|
|
|
|
#else
|
|
|
|
AddWeakFrameExternal(aWeakFrame);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void RemoveWeakFrameInternal(nsWeakFrame* aWeakFrame);
|
|
|
|
virtual void RemoveWeakFrameExternal(nsWeakFrame* aWeakFrame);
|
|
|
|
|
|
|
|
void RemoveWeakFrame(nsWeakFrame* aWeakFrame)
|
|
|
|
{
|
|
|
|
#ifdef _IMPL_NS_LAYOUT
|
|
|
|
RemoveWeakFrameInternal(aWeakFrame);
|
|
|
|
#else
|
|
|
|
RemoveWeakFrameExternal(aWeakFrame);
|
|
|
|
#endif
|
|
|
|
}
|
2007-02-20 23:22:19 +03:00
|
|
|
|
|
|
|
#ifdef NS_DEBUG
|
|
|
|
nsIFrame* GetDrawEventTargetFrame() { return mDrawEventTargetFrame; }
|
|
|
|
#endif
|
|
|
|
|
2009-02-12 13:44:38 +03:00
|
|
|
/**
|
|
|
|
* Stop or restart non synthetic test mouse event handling on *all*
|
|
|
|
* presShells.
|
|
|
|
*
|
2009-02-23 04:10:23 +03:00
|
|
|
* @param aDisable If true, disable all non synthetic test mouse
|
|
|
|
* events on all presShells. Otherwise, enable them.
|
2009-02-12 13:44:38 +03:00
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual NS_HIDDEN_(void) DisableNonTestMouseEvents(bool aDisable) = 0;
|
2009-02-12 13:44:38 +03:00
|
|
|
|
2009-07-04 13:30:59 +04:00
|
|
|
/**
|
|
|
|
* Record the background color of the most recently drawn canvas. This color
|
|
|
|
* is composited on top of the user's default background color and then used
|
|
|
|
* to draw the background color of the canvas. See PresShell::Paint,
|
|
|
|
* PresShell::PaintDefaultBackground, and nsDocShell::SetupNewViewer;
|
|
|
|
* bug 488242, bug 476557 and other bugs mentioned there.
|
2009-02-23 04:10:23 +03:00
|
|
|
*/
|
|
|
|
void SetCanvasBackground(nscolor aColor) { mCanvasBackgroundColor = aColor; }
|
|
|
|
nscolor GetCanvasBackground() { return mCanvasBackgroundColor; }
|
|
|
|
|
2009-07-04 13:30:59 +04:00
|
|
|
/**
|
|
|
|
* Use the current frame tree (if it exists) to update the background
|
|
|
|
* color of the most recently drawn canvas.
|
2009-04-25 12:19:23 +04:00
|
|
|
*/
|
|
|
|
virtual void UpdateCanvasBackground() = 0;
|
|
|
|
|
2009-07-04 13:30:59 +04:00
|
|
|
/**
|
2011-04-01 01:33:46 +04:00
|
|
|
* Add a solid color item to the bottom of aList with frame aFrame and bounds
|
|
|
|
* aBounds. Checks first if this needs to be done by checking if aFrame is a
|
|
|
|
* canvas frame (if the FORCE_DRAW flag is passed then this check is skipped).
|
|
|
|
* aBackstopColor is composed behind the background color of the canvas, it is
|
2011-05-13 20:40:46 +04:00
|
|
|
* transparent by default.
|
2009-07-04 13:30:59 +04:00
|
|
|
*/
|
2011-04-01 01:33:46 +04:00
|
|
|
enum {
|
2011-05-13 20:40:46 +04:00
|
|
|
FORCE_DRAW = 0x01
|
2011-04-01 01:33:46 +04:00
|
|
|
};
|
2009-07-04 13:30:59 +04:00
|
|
|
virtual nsresult AddCanvasBackgroundColorItem(nsDisplayListBuilder& aBuilder,
|
|
|
|
nsDisplayList& aList,
|
|
|
|
nsIFrame* aFrame,
|
2010-07-16 01:07:52 +04:00
|
|
|
const nsRect& aBounds,
|
2009-12-01 11:49:53 +03:00
|
|
|
nscolor aBackstopColor = NS_RGBA(0,0,0,0),
|
2011-04-01 01:33:46 +04:00
|
|
|
PRUint32 aFlags = 0) = 0;
|
|
|
|
|
2009-07-04 13:30:59 +04:00
|
|
|
|
2010-08-08 22:49:07 +04:00
|
|
|
/**
|
|
|
|
* Add a solid color item to the bottom of aList with frame aFrame and
|
|
|
|
* bounds aBounds representing the dark grey background behind the page of a
|
|
|
|
* print preview presentation.
|
|
|
|
*/
|
|
|
|
virtual nsresult AddPrintPreviewBackgroundItem(nsDisplayListBuilder& aBuilder,
|
|
|
|
nsDisplayList& aList,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
const nsRect& aBounds) = 0;
|
|
|
|
|
2010-08-08 22:49:07 +04:00
|
|
|
/**
|
|
|
|
* Computes the backstop color for the view: transparent if in a transparent
|
|
|
|
* widget, otherwise the PresContext default background color. This color is
|
|
|
|
* only visible if the contents of the view as a whole are translucent.
|
|
|
|
*/
|
|
|
|
virtual nscolor ComputeBackstopColor(nsIView* aDisplayRoot) = 0;
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
void ObserveNativeAnonMutationsForPrint(bool aObserve)
|
2009-04-22 13:35:45 +04:00
|
|
|
{
|
|
|
|
mObservesMutationsForPrint = aObserve;
|
|
|
|
}
|
2011-09-29 10:19:26 +04:00
|
|
|
bool ObservesNativeAnonMutationsForPrint()
|
2009-04-22 13:35:45 +04:00
|
|
|
{
|
|
|
|
return mObservesMutationsForPrint;
|
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual nsresult SetIsActive(bool aIsActive) = 0;
|
2010-08-05 19:27:52 +04:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool IsActive()
|
2010-08-05 19:27:52 +04:00
|
|
|
{
|
|
|
|
return mIsActive;
|
|
|
|
}
|
|
|
|
|
2009-09-13 17:13:16 +04:00
|
|
|
// mouse capturing
|
|
|
|
|
|
|
|
static CapturingContentInfo gCaptureInfo;
|
|
|
|
|
2011-12-17 04:24:11 +04:00
|
|
|
static nsInterfaceHashtable<nsUint32HashKey, nsIDOMTouch> gCaptureTouchList;
|
|
|
|
static bool gPreventMouseEvents;
|
|
|
|
|
2009-09-13 17:13:16 +04:00
|
|
|
/**
|
|
|
|
* When capturing content is set, it traps all mouse events and retargets
|
|
|
|
* them at this content node. If capturing is not allowed
|
|
|
|
* (gCaptureInfo.mAllowed is false), then capturing is not set. However, if
|
|
|
|
* the CAPTURE_IGNOREALLOWED flag is set, the allowed state is ignored and
|
|
|
|
* capturing is set regardless. To disable capture, pass null for the value
|
|
|
|
* of aContent.
|
|
|
|
*
|
|
|
|
* If CAPTURE_RETARGETTOELEMENT is set, all mouse events are targeted at
|
|
|
|
* aContent only. Otherwise, mouse events are targeted at aContent or its
|
|
|
|
* descendants. That is, descendants of aContent receive mouse events as
|
|
|
|
* they normally would, but mouse events outside of aContent are retargeted
|
|
|
|
* to aContent.
|
2010-02-03 05:07:08 +03:00
|
|
|
*
|
|
|
|
* If CAPTURE_PREVENTDRAG is set then drags are prevented from starting while
|
|
|
|
* this capture is active.
|
2012-04-12 01:55:21 +04:00
|
|
|
*
|
|
|
|
* If CAPTURE_POINTERLOCK is set, similar to CAPTURE_RETARGETTOELEMENT, then
|
|
|
|
* events are targeted at aContent, but capturing is held more strongly (i.e.,
|
|
|
|
* calls to SetCapturingContent won't unlock unless CAPTURE_POINTERLOCK is
|
|
|
|
* set again).
|
2009-09-13 17:13:16 +04:00
|
|
|
*/
|
|
|
|
static void SetCapturingContent(nsIContent* aContent, PRUint8 aFlags);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the active content currently capturing the mouse if any.
|
|
|
|
*/
|
|
|
|
static nsIContent* GetCapturingContent()
|
|
|
|
{
|
|
|
|
return gCaptureInfo.mContent;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Allow or disallow mouse capturing.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
static void AllowMouseCapture(bool aAllowed)
|
2009-09-13 17:13:16 +04:00
|
|
|
{
|
|
|
|
gCaptureInfo.mAllowed = aAllowed;
|
|
|
|
}
|
|
|
|
|
2010-02-03 05:07:08 +03:00
|
|
|
/**
|
|
|
|
* Returns true if there is an active mouse capture that wants to prevent
|
|
|
|
* drags.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
static bool IsMouseCapturePreventingDrag()
|
2010-02-03 05:07:08 +03:00
|
|
|
{
|
|
|
|
return gCaptureInfo.mPreventDrag && gCaptureInfo.mContent;
|
|
|
|
}
|
|
|
|
|
2010-05-13 04:56:08 +04:00
|
|
|
/**
|
|
|
|
* Keep track of how many times this presshell has been rendered to
|
|
|
|
* a window.
|
|
|
|
*/
|
|
|
|
PRUint64 GetPaintCount() { return mPaintCount; }
|
|
|
|
void IncrementPaintCount() { ++mPaintCount; }
|
|
|
|
|
2010-07-03 10:27:09 +04:00
|
|
|
/**
|
|
|
|
* Get the root DOM window of this presShell.
|
|
|
|
*/
|
|
|
|
virtual already_AddRefed<nsPIDOMWindow> GetRootWindow() = 0;
|
|
|
|
|
2010-08-06 02:11:23 +04:00
|
|
|
/**
|
|
|
|
* Get the layer manager for the widget of the root view, if it has
|
|
|
|
* one.
|
|
|
|
*/
|
|
|
|
virtual LayerManager* GetLayerManager() = 0;
|
|
|
|
|
2010-09-04 00:10:46 +04:00
|
|
|
/**
|
|
|
|
* Track whether we're ignoring viewport scrolling for the purposes
|
|
|
|
* of painting. If we are ignoring, then layers aren't clipped to
|
|
|
|
* the CSS viewport and scrollbars aren't drawn.
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual void SetIgnoreViewportScrolling(bool aIgnore) = 0;
|
|
|
|
bool IgnoringViewportScrolling() const
|
2010-09-04 00:10:46 +04:00
|
|
|
{ return mRenderFlags & STATE_IGNORING_VIEWPORT_SCROLLING; }
|
|
|
|
|
2010-09-04 00:10:46 +04:00
|
|
|
/**
|
|
|
|
* Set a "resolution" for the document, which if not 1.0 will
|
|
|
|
* allocate more or fewer pixels for rescalable content by a factor
|
|
|
|
* of |resolution| in both dimensions. Return NS_OK iff the
|
|
|
|
* resolution bounds are sane, and the resolution of this was
|
|
|
|
* actually updated.
|
|
|
|
*
|
|
|
|
* The resolution defaults to 1.0.
|
|
|
|
*/
|
|
|
|
virtual nsresult SetResolution(float aXResolution, float aYResolution) = 0;
|
|
|
|
float GetXResolution() { return mXResolution; }
|
|
|
|
float GetYResolution() { return mYResolution; }
|
|
|
|
|
2012-03-12 19:50:11 +04:00
|
|
|
/**
|
|
|
|
* Set the isFirstPaint flag.
|
|
|
|
*/
|
|
|
|
void SetIsFirstPaint(bool aIsFirstPaint) { mIsFirstPaint = aIsFirstPaint; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the isFirstPaint flag.
|
|
|
|
*/
|
|
|
|
bool GetIsFirstPaint() const { return mIsFirstPaint; }
|
|
|
|
|
2010-09-14 04:51:52 +04:00
|
|
|
/**
|
|
|
|
* Dispatch a mouse move event based on the most recent mouse position if
|
|
|
|
* this PresShell is visible. This is used when the contents of the page
|
|
|
|
* moved (aFromScroll is false) or scrolled (aFromScroll is true).
|
|
|
|
*/
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual void SynthesizeMouseMove(bool aFromScroll) = 0;
|
2010-09-14 04:51:52 +04:00
|
|
|
|
2011-11-21 21:53:20 +04:00
|
|
|
virtual void Paint(nsIView* aViewToPaint, nsIWidget* aWidget,
|
|
|
|
const nsRegion& aDirtyRegion, const nsIntRegion& aIntDirtyRegion,
|
2012-01-28 07:36:23 +04:00
|
|
|
bool aWillSendDidPaint) = 0;
|
2011-11-21 21:53:20 +04:00
|
|
|
virtual nsresult HandleEvent(nsIFrame* aFrame,
|
|
|
|
nsGUIEvent* aEvent,
|
|
|
|
bool aDontRetargetEvents,
|
|
|
|
nsEventStatus* aEventStatus) = 0;
|
|
|
|
virtual bool ShouldIgnoreInvalidation() = 0;
|
2012-01-28 07:36:23 +04:00
|
|
|
/**
|
|
|
|
* Notify that the NS_WILL_PAINT event was received. Fires on every
|
|
|
|
* visible presshell in the document tree.
|
|
|
|
*/
|
2011-11-21 21:53:20 +04:00
|
|
|
virtual void WillPaint(bool aWillSendDidPaint) = 0;
|
2012-01-28 07:36:23 +04:00
|
|
|
/**
|
|
|
|
* Notify that the NS_DID_PAINT event was received. Only fires on the
|
|
|
|
* root pres shell.
|
|
|
|
*/
|
2011-11-21 21:53:20 +04:00
|
|
|
virtual void DidPaint() = 0;
|
2011-12-24 07:52:22 +04:00
|
|
|
virtual void ScheduleViewManagerFlush() = 0;
|
2011-11-21 21:53:20 +04:00
|
|
|
virtual void ClearMouseCaptureOnView(nsIView* aView) = 0;
|
|
|
|
virtual bool IsVisible() = 0;
|
|
|
|
virtual void DispatchSynthMouseMove(nsGUIEvent *aEvent, bool aFlushOnHoverChange) = 0;
|
|
|
|
|
2012-02-21 19:10:11 +04:00
|
|
|
virtual void SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
|
|
|
|
size_t *aArenasSize,
|
|
|
|
size_t *aStyleSetsSize,
|
2012-05-08 00:09:11 +04:00
|
|
|
size_t *aTextRunsSize,
|
|
|
|
size_t *aPresContextSize) const = 0;
|
2012-02-21 19:10:11 +04:00
|
|
|
|
2010-06-15 00:06:49 +04:00
|
|
|
/**
|
|
|
|
* Refresh observer management.
|
|
|
|
*/
|
|
|
|
protected:
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool AddRefreshObserverExternal(nsARefreshObserver* aObserver,
|
2010-06-15 00:06:49 +04:00
|
|
|
mozFlushType aFlushType);
|
2011-09-29 10:19:26 +04:00
|
|
|
bool AddRefreshObserverInternal(nsARefreshObserver* aObserver,
|
2010-06-15 00:06:49 +04:00
|
|
|
mozFlushType aFlushType);
|
2011-09-29 10:19:26 +04:00
|
|
|
virtual bool RemoveRefreshObserverExternal(nsARefreshObserver* aObserver,
|
2010-06-15 00:06:49 +04:00
|
|
|
mozFlushType aFlushType);
|
2011-09-29 10:19:26 +04:00
|
|
|
bool RemoveRefreshObserverInternal(nsARefreshObserver* aObserver,
|
2010-06-15 00:06:49 +04:00
|
|
|
mozFlushType aFlushType);
|
|
|
|
public:
|
2011-09-29 10:19:26 +04:00
|
|
|
bool AddRefreshObserver(nsARefreshObserver* aObserver,
|
2010-06-15 00:06:49 +04:00
|
|
|
mozFlushType aFlushType) {
|
|
|
|
#ifdef _IMPL_NS_LAYOUT
|
|
|
|
return AddRefreshObserverInternal(aObserver, aFlushType);
|
|
|
|
#else
|
|
|
|
return AddRefreshObserverExternal(aObserver, aFlushType);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool RemoveRefreshObserver(nsARefreshObserver* aObserver,
|
2010-06-15 00:06:49 +04:00
|
|
|
mozFlushType aFlushType) {
|
|
|
|
#ifdef _IMPL_NS_LAYOUT
|
|
|
|
return RemoveRefreshObserverInternal(aObserver, aFlushType);
|
|
|
|
#else
|
|
|
|
return RemoveRefreshObserverExternal(aObserver, aFlushType);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2010-06-01 06:19:35 +04:00
|
|
|
/**
|
|
|
|
* Initialize and shut down static variables.
|
|
|
|
*/
|
|
|
|
static void InitializeStatics();
|
|
|
|
static void ReleaseStatics();
|
|
|
|
|
2011-10-25 22:20:13 +04:00
|
|
|
// If a frame in the subtree rooted at aFrame is capturing the mouse then
|
|
|
|
// clears that capture.
|
|
|
|
static void ClearMouseCapture(nsIFrame* aFrame);
|
|
|
|
|
2012-04-24 22:52:35 +04:00
|
|
|
void SetScrollPositionClampingScrollPortSize(nscoord aWidth, nscoord aHeight);
|
|
|
|
bool IsScrollPositionClampingScrollPortSizeSet() {
|
|
|
|
return mScrollPositionClampingScrollPortSizeSet;
|
|
|
|
}
|
|
|
|
nsSize GetScrollPositionClampingScrollPortSize() {
|
|
|
|
NS_ASSERTION(mScrollPositionClampingScrollPortSizeSet, "asking for scroll port when its not set?");
|
|
|
|
return mScrollPositionClampingScrollPortSize;
|
|
|
|
}
|
|
|
|
|
2003-06-19 22:16:53 +04:00
|
|
|
protected:
|
2010-08-12 01:05:27 +04:00
|
|
|
friend class nsRefreshDriver;
|
|
|
|
|
2003-06-19 22:16:53 +04:00
|
|
|
// IMPORTANT: The ownership implicit in the following member variables
|
|
|
|
// has been explicitly checked. If you add any members to this class,
|
|
|
|
// please make the ownership explicit (pinkerton, scc).
|
|
|
|
|
2012-05-16 21:32:40 +04:00
|
|
|
// These are the same Document and PresContext owned by the DocViewer.
|
2003-06-19 22:16:53 +04:00
|
|
|
// we must share ownership.
|
|
|
|
nsIDocument* mDocument; // [STRONG]
|
2004-08-29 07:08:44 +04:00
|
|
|
nsPresContext* mPresContext; // [STRONG]
|
2004-01-08 22:23:12 +03:00
|
|
|
nsStyleSet* mStyleSet; // [OWNS]
|
2010-08-12 01:05:27 +04:00
|
|
|
nsCSSFrameConstructor* mFrameConstructor; // [OWNS]
|
2003-06-19 22:16:53 +04:00
|
|
|
nsIViewManager* mViewManager; // [WEAK] docViewer owns it so I don't have to
|
2012-05-09 23:53:15 +04:00
|
|
|
nsPresArena mFrameArena;
|
2006-04-26 06:01:07 +04:00
|
|
|
nsFrameSelection* mSelection;
|
2012-02-02 14:06:46 +04:00
|
|
|
// Pointer into mFrameConstructor - this is purely so that FrameManager() and
|
|
|
|
// GetRootFrame() can be inlined:
|
|
|
|
nsFrameManagerBase* mFrameManager;
|
2005-08-22 05:55:34 +04:00
|
|
|
nsWeakPtr mForwardingContainer;
|
2004-08-29 07:08:44 +04:00
|
|
|
|
2007-02-20 23:22:19 +03:00
|
|
|
#ifdef NS_DEBUG
|
|
|
|
nsIFrame* mDrawEventTargetFrame;
|
2012-05-09 23:53:15 +04:00
|
|
|
// Ensure that every allocation from the PresArena is eventually freed.
|
|
|
|
PRUint32 mPresArenaAllocCount;
|
2007-02-20 23:22:19 +03:00
|
|
|
#endif
|
|
|
|
|
2012-05-16 21:32:40 +04:00
|
|
|
// Count of the number of times this presshell has been painted to a window.
|
2010-05-13 04:56:08 +04:00
|
|
|
PRUint64 mPaintCount;
|
|
|
|
|
2012-05-16 21:32:40 +04:00
|
|
|
nsSize mScrollPositionClampingScrollPortSize;
|
2012-04-24 22:52:35 +04:00
|
|
|
|
2006-07-12 11:41:11 +04:00
|
|
|
// A list of weak frames. This is a pointer to the last item in the list.
|
|
|
|
nsWeakFrame* mWeakFrames;
|
2009-02-23 04:10:23 +03:00
|
|
|
|
|
|
|
// Most recent canvas background color.
|
|
|
|
nscolor mCanvasBackgroundColor;
|
2010-06-01 06:19:35 +04:00
|
|
|
|
2012-05-16 21:32:40 +04:00
|
|
|
// Used to force allocation and rendering of proportionally more or
|
|
|
|
// less pixels in the given dimension.
|
|
|
|
float mXResolution;
|
|
|
|
float mYResolution;
|
|
|
|
|
|
|
|
PRInt16 mSelectionFlags;
|
|
|
|
|
2010-09-04 00:10:46 +04:00
|
|
|
// Flags controlling how our document is rendered. These persist
|
|
|
|
// between paints and so are tied with retained layer pixels.
|
|
|
|
// PresShell flushes retained layers when the rendering state
|
|
|
|
// changes in a way that prevents us from being able to (usefully)
|
|
|
|
// re-use old pixels.
|
2012-05-16 21:32:40 +04:00
|
|
|
RenderFlags mRenderFlags;
|
2010-09-04 00:10:46 +04:00
|
|
|
|
2012-05-16 21:32:40 +04:00
|
|
|
bool mStylesHaveChanged : 1;
|
|
|
|
bool mDidInitialReflow : 1;
|
|
|
|
bool mIsDestroying : 1;
|
|
|
|
bool mIsReflowing : 1;
|
2010-09-04 00:10:46 +04:00
|
|
|
|
2012-05-16 21:32:40 +04:00
|
|
|
// For all documents we initially lock down painting.
|
|
|
|
bool mPaintingSuppressed : 1;
|
|
|
|
|
|
|
|
// Whether or not form controls should use nsITheme in this shell.
|
|
|
|
bool mIsThemeSupportDisabled : 1;
|
|
|
|
|
|
|
|
bool mIsActive : 1;
|
|
|
|
bool mFrozen : 1;
|
|
|
|
bool mIsFirstPaint : 1;
|
|
|
|
bool mObservesMutationsForPrint : 1;
|
|
|
|
|
|
|
|
// If true, we have a reflow scheduled. Guaranteed to be false if
|
|
|
|
// mReflowContinueTimer is non-null.
|
|
|
|
bool mReflowScheduled : 1;
|
|
|
|
|
|
|
|
bool mSuppressInterruptibleReflows : 1;
|
|
|
|
bool mScrollPositionClampingScrollPortSizeSet : 1;
|
2012-04-24 22:52:35 +04:00
|
|
|
|
2012-05-16 21:32:40 +04:00
|
|
|
static nsIContent* gKeyDownTarget;
|
1998-04-14 00:24:54 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new empty presentation shell. Upon success, call Init
|
|
|
|
* before attempting to use the shell.
|
|
|
|
*/
|
2003-03-05 18:08:41 +03:00
|
|
|
nsresult
|
|
|
|
NS_NewPresShell(nsIPresShell** aInstancePtrResult);
|
1998-04-14 00:24:54 +04:00
|
|
|
|
|
|
|
#endif /* nsIPresShell_h___ */
|