Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends

nsPresContext Class Reference

#include <nsPresContext.h>

Inheritance diagram for nsPresContext:
Collaboration diagram for nsPresContext:

List of all members.

Classes

class  cycleCollection
class  InterruptPreventer
struct  ScrollbarStyles

Public Types

enum  nsPresContextType { eContext_Galley, eContext_PrintPreview, eContext_Print, eContext_PageLayout }
enum  ImageLoadType { BACKGROUND_IMAGE, BORDER_IMAGE, IMAGE_LOAD_TYPE_COUNT }
 

The types of image load types that the pres context needs image loaders to track invalidation for.

More...

Public Member Functions

NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSIOBSERVER void * 
operator new (size_t sz) throw ()
void operator delete (void *ptr)
 nsPresContext (nsIDocument *aDocument, nsPresContextType aType)
nsresult Init (nsIDeviceContext *aDeviceContext)
 Initialize the presentation context from a particular device.
void SetShell (nsIPresShell *aShell)
 Set the presentation shell that this context is bound to.
nsPresContextType Type () const
nsIPresShell * PresShell () const
 Get the PresentationShell that this context is bound to.
nsIPresShell * GetPresShell () const
nsRootPresContextRootPresContext ()
nsIDocument * Document () const
void RebuildAllStyleData (nsChangeHint aExtraHint)
 Rebuilds all style data by throwing out the old rule tree and building a new one, and additionally applying aExtraHint (which must not contain nsChangeHint_ReconstructFrame) to the root frame.
void PostRebuildAllStyleDataEvent (nsChangeHint aExtraHint)
 Just like RebuildAllStyleData, except (1) asynchronous and (2) it doesn't rebuild the user font set.
void MediaFeatureValuesChanged (PRBool aCallerWillRebuildStyleData)
void PostMediaFeatureValuesChangedEvent ()
void HandleMediaFeatureValuesChangedEvent ()
void FlushPendingMediaFeatureValuesChanged ()
nsCompatibility CompatibilityMode () const
 Access compatibility mode for this context.
void CompatibilityModeChanged ()
 Notify the context that the document's compatibility mode has changed.
PRUint16 ImageAnimationMode () const
 Access the image animation mode for this context.
virtual void SetImageAnimationModeExternal (PRUint16 aMode)
void SetImageAnimationModeInternal (PRUint16 aMode)
void SetImageAnimationMode (PRUint16 aMode)
nsILookAndFeel * LookAndFeel ()
 Get cached look and feel service.
nsIAtomMedium ()
 Get medium of presentation.
void * AllocateFromShell (size_t aSize)
void FreeToShell (size_t aSize, void *aFreeChunk)
already_AddRefed< nsIFontMetrics > GetMetricsFor (const nsFont &aFont, PRBool aUseUserFontSet=1)
 Get the font metrics for a given font.
const nsFontGetDefaultFont (PRUint8 aFontID) const
 Get the default font corresponding to the given ID.
PRBool GetCachedBoolPref (nsPresContext_CachedBoolPrefType aPrefType) const
 Get a cached boolean pref, by its type.
PRInt32 GetCachedIntPref (nsPresContext_CachedIntPrefType aPrefType) const
 Get a cached integer pref, by its type.
PRInt32 FontScaler () const
 Access Nav's magic font scaler value.
const nscolor DefaultColor () const
 Get the default colors.
const nscolor DefaultBackgroundColor () const
const nscolor DefaultLinkColor () const
const nscolor DefaultActiveLinkColor () const
const nscolor DefaultVisitedLinkColor () const
const nscolor FocusBackgroundColor () const
const nscolor FocusTextColor () const
PRBool GetUseFocusColors () const
PRUint8 FocusRingWidth () const
PRBool GetFocusRingOnAnything () const
PRUint8 GetFocusRingStyle () const
void SetImageLoaders (nsIFrame *aTargetFrame, ImageLoadType aType, nsImageLoader *aImageLoaders)
 Set the list of image loaders that track invalidation for a specific frame and type of image.
void SetupBackgroundImageLoaders (nsIFrame *aFrame, const nsStyleBackground *aStyleBackground)
 Make an appropriate SetImageLoaders call (including potentially with null aImageLoaders) given that aFrame draws its background based on aStyleBackground.
void SetupBorderImageLoaders (nsIFrame *aFrame, const nsStyleBorder *aStyleBorder)
 Make an appropriate SetImageLoaders call (including potentially with null aImageLoaders) given that aFrame draws its border based on aStyleBorder.
void StopImagesFor (nsIFrame *aTargetFrame)
 This method is called when a frame is being destroyed to ensure that the image loads get disassociated from the prescontext.
void SetContainer (nsISupports *aContainer)
virtual already_AddRefed
< nsISupports
GetContainerExternal () const
already_AddRefed< nsISupportsGetContainerInternal () const
already_AddRefed< nsISupportsGetContainer () const
void SetLinkHandler (nsILinkHandler *aHandler)
nsILinkHandler * GetLinkHandler ()
nsRect GetVisibleArea ()
 Get the visible area associated with this presentation context.
void SetVisibleArea (const nsRect &r)
 Set the currently visible area.
PRBool IsPaginated () const
 Return true if this presentation context is a paginated context.
void SetPaginatedScrolling (PRBool aResult)
 Sets whether the presentation context can scroll for a paginated context.
PRBool HasPaginatedScrolling () const
 Return true if this presentation context can scroll for paginated context.
nsSize GetPageSize ()
 Get/set the size of a page.
void SetPageSize (nsSize aSize)
PRBool IsRootPaginatedDocument ()
 Get/set whether this document should be treated as having real pages XXX This raises the obvious question of why a document that isn't a page is paginated; there isn't a good reason except history.
void SetIsRootPaginatedDocument (PRBool aIsRootPaginatedDocument)
float GetPageScale ()
 Get/set the print scaling level; used by nsPageFrame to scale up pages.
void SetPageScale (float aScale)
float GetPrintPreviewScale ()
 Get/set the scaling facor to use when rendering the pages for print preview.
void SetPrintPreviewScale (float aScale)
nsIDeviceContext * DeviceContext ()
nsIEventStateManager * EventStateManager ()
nsIAtomGetLangGroup ()
float TextZoom ()
void SetTextZoom (float aZoom)
float GetFullZoom ()
void SetFullZoom (float aZoom)
nscoord GetAutoQualityMinFontSize ()
PRInt32 AppUnitsPerDevPixel () const
PRInt32 AppUnitsPerInch () const
nscoord DevPixelsToAppUnits (PRInt32 aPixels) const
PRInt32 AppUnitsToDevPixels (nscoord aAppUnits) const
PRInt32 CSSPixelsToDevPixels (PRInt32 aPixels)
float CSSPixelsToDevPixels (float aPixels)
PRInt32 DevPixelsToIntCSSPixels (PRInt32 aPixels)
float DevPixelsToFloatCSSPixels (PRInt32 aPixels)
nscoord GfxUnitsToAppUnits (gfxFloat aGfxUnits) const
gfxFloat AppUnitsToGfxUnits (nscoord aAppUnits) const
gfxRect AppUnitsToGfxUnits (const nsRect &aAppRect) const
nscoord TwipsToAppUnits (PRInt32 aTwips) const
nsMargin TwipsToAppUnits (const nsIntMargin &marginInTwips) const
nscoord PointsToAppUnits (float aPoints) const
nscoord RoundAppUnitsToNearestDevPixels (nscoord aAppUnits) const
void SetViewportOverflowOverride (PRUint8 aX, PRUint8 aY)
ScrollbarStyles GetViewportOverflowOverride ()
PRBool GetBackgroundImageDraw () const
 Set and get methods for controlling the background drawing.
void SetBackgroundImageDraw (PRBool aCanDraw)
PRBool GetBackgroundColorDraw () const
void SetBackgroundColorDraw (PRBool aCanDraw)
void SetIsRenderingOnlySelection (PRBool aResult)
 Render only Selection.
PRBool IsRenderingOnlySelection () const
nsITheme * GetTheme ()
void ThemeChanged ()
void SysColorChanged ()
void SetPrintSettings (nsIPrintSettings *aPrintSettings)
 Printing methods below should only be used for Medium() == print.
nsIPrintSettingsGetPrintSettings ()
nsPropertyTablePropertyTable ()
PRBool EnsureVisible ()
const nscoordGetBorderWidthTable ()
 This table maps border-width enums 'thin', 'medium', 'thick' to actual nscoord values.
PRBool IsDynamic ()
PRBool IsScreen ()
PRBool IsChrome () const
virtual PRBool HasAuthorSpecifiedRules (nsIFrame *aFrame, PRUint32 ruleTypeMask) const
PRBool UseDocumentColors () const
PRBool SupressingResizeReflow () const
virtual gfxUserFontSetGetUserFontSetExternal ()
gfxUserFontSetGetUserFontSetInternal ()
gfxUserFontSetGetUserFontSet ()
void FlushUserFontSet ()
void RebuildUserFontSet ()
void UserFontSetUpdated ()
PRBool EnsureSafeToHandOutCSSRules ()
void NotifyInvalidation (const nsRect &aRect, PRUint32 aFlags)
void NotifyInvalidateForScrolling (const nsRegion &aBlitRegion, const nsRegion &aInvalidateRegion)
void FireDOMPaintEvent ()
PRBool IsDOMPaintEventPending ()
void ClearMozAfterPaintEvents ()
PRBool IsProcessingAnimationStyleChange () const
void SetProcessingAnimationStyleChange (PRBool aProcessing)
void ReflowStarted (PRBool aInterruptible)
 Notify the prescontext that the presshell is about to reflow a reflow root.
PRBool CheckForInterrupt (nsIFrame *aFrame)
 Check for interrupts.
PRBool HasPendingInterrupt ()
 Returns true if CheckForInterrupt has returned true since the last ReflowStarted call.
nsIFrame * GetPrimaryFrameFor (nsIContent *aContent)
 If we have a presshell, and if the given content's current document is the same as our presshell's document, return the content's primary frame.

Static Public Member Functions

static PRInt32 AppUnitsPerCSSPixel ()
static nscoord CSSPixelsToAppUnits (PRInt32 aPixels)
static nscoord CSSPixelsToAppUnits (float aPixels)
static PRInt32 AppUnitsToIntCSSPixels (nscoord aAppUnits)
static float AppUnitsToFloatCSSPixels (nscoord aAppUnits)

Static Public Attributes

static cycleCollection _cycleCollectorGlobal

Protected Types

enum  {
  eDefaultFont_Variable, eDefaultFont_Fixed, eDefaultFont_Serif, eDefaultFont_SansSerif,
  eDefaultFont_Monospace, eDefaultFont_Cursive, eDefaultFont_Fantasy, eDefaultFont_COUNT
}

Protected Member Functions

void ThemeChangedInternal ()
void SysColorChangedInternal ()
void SetImgAnimations (nsIContent *aParent, PRUint16 aMode)
void GetDocumentColorPreferences ()
void PreferenceChanged (const char *aPrefName)
void UpdateAfterPreferencesChanged ()
void GetUserPreferences ()
void GetFontPreferences ()
void UpdateCharSet (const nsAFlatCString &aCharSet)
PRBool MayHavePaintEventListener ()
void NotifyInvalidateRegion (const nsRegion &aRegion, nsPoint aOffset, PRUint32 aFlags)
void HandleRebuildUserFontSet ()
PRBool HavePendingInputEvent ()
PRBool HasCachedStyleData ()
virtual ~nsPresContext ()

Static Protected Member Functions

static int PrefChangedCallback (const char *, void *)
static void PrefChangedUpdateTimerCallback (nsITimer *aTimer, void *aClosure)

Protected Attributes

nsPresContextType mType
nsIPresShell * mShell
nsCOMPtr< nsIDocument > mDocument
nsIDeviceContext * mDeviceContext
nsIEventStateManager * mEventManager
nsILookAndFeel * mLookAndFeel
nsRefPtr< nsRefreshDrivermRefreshDriver
nsRefPtr< nsTransitionManager > mTransitionManager
nsIAtommMedium
nsILinkHandler * mLinkHandler
nsIAtommLangGroup
nsRefPtrHashtable
< nsVoidPtrHashKey,
nsImageLoader > 
mImageLoaders [IMAGE_LOAD_TYPE_COUNT]
nsWeakPtr mContainer
float mTextZoom
float mFullZoom
PRInt32 mCurAppUnitsPerDevPixel
PRInt32 mAutoQualityMinFontSizePixelsPref
nsCOMPtr< nsITheme > mTheme
nsCOMPtr< nsILanguageAtomService > mLangService
nsCOMPtr< nsIPrintSettingsmPrintSettings
nsCOMPtr< nsITimermPrefChangedTimer
nsPropertyTable mPropertyTable
nsInvalidateRequestList mInvalidateRequests
nsUserFontSet * mUserFontSet
nsTArray< nsFontFaceRuleContainer > mFontFaceRules
PRInt32 mFontScaler
nscoord mMinimumFontSize
nsRect mVisibleArea
nsSize mPageSize
float mPageScale
float mPPScale
nscolor mDefaultColor
nscolor mBackgroundColor
nscolor mLinkColor
nscolor mActiveLinkColor
nscolor mVisitedLinkColor
nscolor mFocusBackgroundColor
nscolor mFocusTextColor
ScrollbarStyles mViewportStyleOverflow
PRUint8 mFocusRingWidth
PRUint16 mImageAnimationMode
PRUint16 mImageAnimationModePref
nsFont mDefaultVariableFont
nsFont mDefaultFixedFont
nsFont mDefaultSerifFont
nsFont mDefaultSansSerifFont
nsFont mDefaultMonospaceFont
nsFont mDefaultCursiveFont
nsFont mDefaultFantasyFont
nscoord mBorderWidthTable [3]
PRUint32 mInterruptChecksToSkip
mozilla::TimeStamp mReflowStartTime
unsigned mHasPendingInterrupt: 1
unsigned mInterruptsEnabled: 1
unsigned mUseDocumentFonts: 1
unsigned mUseDocumentColors: 1
unsigned mUnderlineLinks: 1
unsigned mUseFocusColors: 1
unsigned mFocusRingOnAnything: 1
unsigned mFocusRingStyle: 1
unsigned mDrawImageBackground: 1
unsigned mDrawColorBackground: 1
unsigned mNeverAnimate: 1
unsigned mIsRenderingOnlySelection: 1
unsigned mPaginated: 1
unsigned mCanPaginatedScroll: 1
unsigned mDoScaledTwips: 1
unsigned mEnableJapaneseTransform: 1
unsigned mIsRootPaginatedDocument: 1
unsigned mPrefBidiDirection: 1
unsigned mPrefScrollbarSide: 2
unsigned mPendingSysColorChanged: 1
unsigned mPendingThemeChanged: 1
unsigned mPendingMediaFeatureValuesChanged: 1
unsigned mPrefChangePendingNeedsReflow: 1
unsigned mUserFontSetDirty: 1
unsigned mGetUserFontSetCalled: 1
unsigned mPostedFlushUserFontSet: 1
unsigned mSupressResizeReflow: 1
unsigned mIsVisual: 1
unsigned mProcessingAnimationStyleChange: 1

Friends

class InterruptPreventer
class nsRunnableMethod< nsPresContext >

Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
eDefaultFont_Variable 
eDefaultFont_Fixed 
eDefaultFont_Serif 
eDefaultFont_SansSerif 
eDefaultFont_Monospace 
eDefaultFont_Cursive 
eDefaultFont_Fantasy 
eDefaultFont_COUNT 

The types of image load types that the pres context needs image loaders to track invalidation for.

Enumerator:
BACKGROUND_IMAGE 
BORDER_IMAGE 
IMAGE_LOAD_TYPE_COUNT 
Enumerator:
eContext_Galley 
eContext_PrintPreview 
eContext_Print 
eContext_PageLayout 

Constructor & Destructor Documentation

nsPresContext::nsPresContext ( nsIDocument *  aDocument,
nsPresContextType  aType 
)
virtual nsPresContext::~nsPresContext (  )  [protected, virtual]

Member Function Documentation

void* nsPresContext::AllocateFromShell ( size_t  aSize  )  [inline]
static PRInt32 nsPresContext::AppUnitsPerCSSPixel (  )  [inline, static]
PRInt32 nsPresContext::AppUnitsPerDevPixel (  )  const [inline]
PRInt32 nsPresContext::AppUnitsPerInch (  )  const [inline]
PRInt32 nsPresContext::AppUnitsToDevPixels ( nscoord  aAppUnits  )  const [inline]
static float nsPresContext::AppUnitsToFloatCSSPixels ( nscoord  aAppUnits  )  [inline, static]
gfxFloat nsPresContext::AppUnitsToGfxUnits ( nscoord  aAppUnits  )  const [inline]
gfxRect nsPresContext::AppUnitsToGfxUnits ( const nsRect aAppRect  )  const [inline]
static PRInt32 nsPresContext::AppUnitsToIntCSSPixels ( nscoord  aAppUnits  )  [inline, static]
PRBool nsPresContext::CheckForInterrupt ( nsIFrame *  aFrame  ) 

Check for interrupts.

This may return true if a pending event is detected. Once it has returned true, it will keep returning true until ReflowStarted is called. In all cases where this returns true, the passed-in frame (which should be the frame whose reflow will be interrupted if true is returned) will be passed to nsIPresShell::FrameNeedsToContinueReflow.

void nsPresContext::ClearMozAfterPaintEvents (  )  [inline]
nsCompatibility nsPresContext::CompatibilityMode (  )  const [inline]

Access compatibility mode for this context.

This is the same as our document's compatibility mode.

void nsPresContext::CompatibilityModeChanged (  ) 

Notify the context that the document's compatibility mode has changed.

static nscoord nsPresContext::CSSPixelsToAppUnits ( float  aPixels  )  [inline, static]
static nscoord nsPresContext::CSSPixelsToAppUnits ( PRInt32  aPixels  )  [inline, static]
float nsPresContext::CSSPixelsToDevPixels ( float  aPixels  )  [inline]
PRInt32 nsPresContext::CSSPixelsToDevPixels ( PRInt32  aPixels  )  [inline]
const nscolor nsPresContext::DefaultActiveLinkColor (  )  const [inline]
const nscolor nsPresContext::DefaultBackgroundColor (  )  const [inline]
const nscolor nsPresContext::DefaultColor (  )  const [inline]

Get the default colors.

const nscolor nsPresContext::DefaultLinkColor (  )  const [inline]
const nscolor nsPresContext::DefaultVisitedLinkColor (  )  const [inline]
nsIDeviceContext* nsPresContext::DeviceContext (  )  [inline]
nscoord nsPresContext::DevPixelsToAppUnits ( PRInt32  aPixels  )  const [inline]
float nsPresContext::DevPixelsToFloatCSSPixels ( PRInt32  aPixels  )  [inline]
PRInt32 nsPresContext::DevPixelsToIntCSSPixels ( PRInt32  aPixels  )  [inline]
nsIDocument* nsPresContext::Document (  )  const [inline]
PRBool nsPresContext::EnsureSafeToHandOutCSSRules (  ) 
PRBool nsPresContext::EnsureVisible (  ) 
nsIEventStateManager* nsPresContext::EventStateManager (  )  [inline]
void nsPresContext::FireDOMPaintEvent (  ) 
void nsPresContext::FlushPendingMediaFeatureValuesChanged (  )  [inline]
void nsPresContext::FlushUserFontSet (  ) 
const nscolor nsPresContext::FocusBackgroundColor (  )  const [inline]
PRUint8 nsPresContext::FocusRingWidth (  )  const [inline]
const nscolor nsPresContext::FocusTextColor (  )  const [inline]
PRInt32 nsPresContext::FontScaler (  )  const [inline]

Access Nav's magic font scaler value.

void nsPresContext::FreeToShell ( size_t  aSize,
void *  aFreeChunk 
) [inline]
nscoord nsPresContext::GetAutoQualityMinFontSize (  )  [inline]
PRBool nsPresContext::GetBackgroundColorDraw (  )  const [inline]
PRBool nsPresContext::GetBackgroundImageDraw (  )  const [inline]

Set and get methods for controlling the background drawing.

const nscoord* nsPresContext::GetBorderWidthTable (  )  [inline]

This table maps border-width enums 'thin', 'medium', 'thick' to actual nscoord values.

PRBool nsPresContext::GetCachedBoolPref ( nsPresContext_CachedBoolPrefType  aPrefType  )  const [inline]

Get a cached boolean pref, by its type.

PRInt32 nsPresContext::GetCachedIntPref ( nsPresContext_CachedIntPrefType  aPrefType  )  const [inline]

Get a cached integer pref, by its type.

already_AddRefed<nsISupports> nsPresContext::GetContainer (  )  const [inline]
virtual already_AddRefed<nsISupports> nsPresContext::GetContainerExternal (  )  const [virtual]
already_AddRefed<nsISupports> nsPresContext::GetContainerInternal (  )  const
const nsFont* nsPresContext::GetDefaultFont ( PRUint8  aFontID  )  const

Get the default font corresponding to the given ID.

This object is read-only, you must copy the font to modify it.

When aFontID is kPresContext_DefaultVariableFontID or kPresContext_DefaultFixedFontID (which equals kGenericFont_moz_fixed, which is used for the -moz-fixed generic), the nsFont returned has its name as a CSS generic family (serif or sans-serif for the former, monospace for the latter), and its size as the default font size for variable or fixed fonts for the pres context's language group.

For aFontID corresponds to a CSS Generic, the nsFont returned has its name as the name or names of the fonts in the user's preferences for the given generic and the pres context's language group, and its size set to the default variable font size.

void nsPresContext::GetDocumentColorPreferences (  )  [protected]
PRBool nsPresContext::GetFocusRingOnAnything (  )  const [inline]
PRUint8 nsPresContext::GetFocusRingStyle (  )  const [inline]
void nsPresContext::GetFontPreferences (  )  [protected]
float nsPresContext::GetFullZoom (  )  [inline]
nsIAtom* nsPresContext::GetLangGroup (  )  [inline]
nsILinkHandler* nsPresContext::GetLinkHandler (  )  [inline]
already_AddRefed<nsIFontMetrics> nsPresContext::GetMetricsFor ( const nsFont aFont,
PRBool  aUseUserFontSet = 1 
)

Get the font metrics for a given font.

If aUseUserFontSet is false, don't build or use the user font set. This is intended only for nsRuleNode::CalcLengthWithInitialFont (which is used from media query matching, which is in turn called when building the user font set).

float nsPresContext::GetPageScale (  )  [inline]

Get/set the print scaling level; used by nsPageFrame to scale up pages.

Set safe to call before reflow, get guaranteed to be set properly after reflow.

nsSize nsPresContext::GetPageSize (  )  [inline]

Get/set the size of a page.

nsIPresShell* nsPresContext::GetPresShell (  )  const [inline]
nsIFrame* nsPresContext::GetPrimaryFrameFor ( nsIContent *  aContent  )  [inline]

If we have a presshell, and if the given content's current document is the same as our presshell's document, return the content's primary frame.

Otherwise, return null. Only use this if you care about which presshell the primary frame is in.

float nsPresContext::GetPrintPreviewScale (  )  [inline]

Get/set the scaling facor to use when rendering the pages for print preview.

Only safe to get after print preview set up; safe to set anytime. This is a scaling factor for the display of the print preview. It does not affect layout. It only affects the size of the onscreen pages in print preview. XXX Temporary: see http://wiki.mozilla.org/Gecko:PrintPreview

nsIPrintSettings* nsPresContext::GetPrintSettings (  )  [inline]
nsITheme* nsPresContext::GetTheme (  ) 
PRBool nsPresContext::GetUseFocusColors (  )  const [inline]
gfxUserFontSet* nsPresContext::GetUserFontSet (  )  [inline]
virtual gfxUserFontSet* nsPresContext::GetUserFontSetExternal (  )  [virtual]
gfxUserFontSet* nsPresContext::GetUserFontSetInternal (  ) 
void nsPresContext::GetUserPreferences (  )  [protected]
ScrollbarStyles nsPresContext::GetViewportOverflowOverride (  )  [inline]
nsRect nsPresContext::GetVisibleArea (  )  [inline]

Get the visible area associated with this presentation context.

This is the size of the visible area that is used for presenting the document. The returned value is in the standard nscoord units (as scaled by the device context).

nscoord nsPresContext::GfxUnitsToAppUnits ( gfxFloat  aGfxUnits  )  const [inline]
void nsPresContext::HandleMediaFeatureValuesChangedEvent (  ) 
void nsPresContext::HandleRebuildUserFontSet (  )  [inline, protected]
virtual PRBool nsPresContext::HasAuthorSpecifiedRules ( nsIFrame *  aFrame,
PRUint32  ruleTypeMask 
) const [virtual]
PRBool nsPresContext::HasCachedStyleData (  )  [protected]
PRBool nsPresContext::HasPaginatedScrolling (  )  const [inline]

Return true if this presentation context can scroll for paginated context.

PRBool nsPresContext::HasPendingInterrupt (  )  [inline]

Returns true if CheckForInterrupt has returned true since the last ReflowStarted call.

Cannot itself trigger an interrupt check.

PRBool nsPresContext::HavePendingInputEvent (  )  [protected]
PRUint16 nsPresContext::ImageAnimationMode (  )  const [inline]

Access the image animation mode for this context.

nsresult nsPresContext::Init ( nsIDeviceContext *  aDeviceContext  ) 

Initialize the presentation context from a particular device.

PRBool nsPresContext::IsChrome (  )  const
PRBool nsPresContext::IsDOMPaintEventPending (  )  [inline]
PRBool nsPresContext::IsDynamic (  )  [inline]
PRBool nsPresContext::IsPaginated (  )  const [inline]

Return true if this presentation context is a paginated context.

PRBool nsPresContext::IsProcessingAnimationStyleChange (  )  const [inline]
PRBool nsPresContext::IsRenderingOnlySelection (  )  const [inline]
PRBool nsPresContext::IsRootPaginatedDocument (  )  [inline]

Get/set whether this document should be treated as having real pages XXX This raises the obvious question of why a document that isn't a page is paginated; there isn't a good reason except history.

PRBool nsPresContext::IsScreen (  )  [inline]
nsILookAndFeel* nsPresContext::LookAndFeel (  )  [inline]

Get cached look and feel service.

This is faster than obtaining it through the service manager.

PRBool nsPresContext::MayHavePaintEventListener (  )  [protected]
void nsPresContext::MediaFeatureValuesChanged ( PRBool  aCallerWillRebuildStyleData  ) 
nsIAtom* nsPresContext::Medium (  )  [inline]

Get medium of presentation.

void nsPresContext::NotifyInvalidateForScrolling ( const nsRegion aBlitRegion,
const nsRegion aInvalidateRegion 
)
void nsPresContext::NotifyInvalidateRegion ( const nsRegion aRegion,
nsPoint  aOffset,
PRUint32  aFlags 
) [protected]
void nsPresContext::NotifyInvalidation ( const nsRect aRect,
PRUint32  aFlags 
)
void nsPresContext::operator delete ( void *  ptr  )  [inline]
NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_NSIOBSERVER void* nsPresContext::operator new ( size_t  sz  )  throw () [inline]
nscoord nsPresContext::PointsToAppUnits ( float  aPoints  )  const [inline]
void nsPresContext::PostMediaFeatureValuesChangedEvent (  ) 
void nsPresContext::PostRebuildAllStyleDataEvent ( nsChangeHint  aExtraHint  ) 

Just like RebuildAllStyleData, except (1) asynchronous and (2) it doesn't rebuild the user font set.

static int nsPresContext::PrefChangedCallback ( const char *  ,
void *   
) [static, protected]
static void nsPresContext::PrefChangedUpdateTimerCallback ( nsITimer aTimer,
void *  aClosure 
) [static, protected]
void nsPresContext::PreferenceChanged ( const char *  aPrefName  )  [protected]
nsIPresShell* nsPresContext::PresShell (  )  const [inline]

Get the PresentationShell that this context is bound to.

nsPropertyTable* nsPresContext::PropertyTable (  )  [inline]
void nsPresContext::RebuildAllStyleData ( nsChangeHint  aExtraHint  ) 

Rebuilds all style data by throwing out the old rule tree and building a new one, and additionally applying aExtraHint (which must not contain nsChangeHint_ReconstructFrame) to the root frame.

Also rebuild the user font set.

void nsPresContext::RebuildUserFontSet (  ) 
void nsPresContext::ReflowStarted ( PRBool  aInterruptible  ) 

Notify the prescontext that the presshell is about to reflow a reflow root.

The single argument indicates whether this reflow should be interruptible. If aInterruptible is false then CheckForInterrupt and HasPendingInterrupt will always return false. If aInterruptible is true then CheckForInterrupt will return true when a pending event is detected. This is for use by the presshell only. Reflow code wanting to prevent interrupts should use InterruptPreventer.

nsRootPresContext* nsPresContext::RootPresContext (  ) 
nscoord nsPresContext::RoundAppUnitsToNearestDevPixels ( nscoord  aAppUnits  )  const [inline]
void nsPresContext::SetBackgroundColorDraw ( PRBool  aCanDraw  )  [inline]
void nsPresContext::SetBackgroundImageDraw ( PRBool  aCanDraw  )  [inline]
void nsPresContext::SetContainer ( nsISupports aContainer  ) 
void nsPresContext::SetFullZoom ( float  aZoom  ) 
void nsPresContext::SetImageAnimationMode ( PRUint16  aMode  )  [inline]
virtual void nsPresContext::SetImageAnimationModeExternal ( PRUint16  aMode  )  [virtual]
void nsPresContext::SetImageAnimationModeInternal ( PRUint16  aMode  ) 
void nsPresContext::SetImageLoaders ( nsIFrame *  aTargetFrame,
ImageLoadType  aType,
nsImageLoader *  aImageLoaders 
)

Set the list of image loaders that track invalidation for a specific frame and type of image.

This list will replace any previous list for that frame and image type (and null will remove any previous list).

void nsPresContext::SetImgAnimations ( nsIContent *  aParent,
PRUint16  aMode 
) [protected]
void nsPresContext::SetIsRenderingOnlySelection ( PRBool  aResult  )  [inline]

Render only Selection.

void nsPresContext::SetIsRootPaginatedDocument ( PRBool  aIsRootPaginatedDocument  )  [inline]
void nsPresContext::SetLinkHandler ( nsILinkHandler *  aHandler  )  [inline]
void nsPresContext::SetPageScale ( float  aScale  )  [inline]
void nsPresContext::SetPageSize ( nsSize  aSize  )  [inline]
void nsPresContext::SetPaginatedScrolling ( PRBool  aResult  ) 

Sets whether the presentation context can scroll for a paginated context.

void nsPresContext::SetPrintPreviewScale ( float  aScale  )  [inline]
void nsPresContext::SetPrintSettings ( nsIPrintSettings aPrintSettings  ) 

Printing methods below should only be used for Medium() == print.

void nsPresContext::SetProcessingAnimationStyleChange ( PRBool  aProcessing  )  [inline]
void nsPresContext::SetShell ( nsIPresShell *  aShell  ) 

Set the presentation shell that this context is bound to.

A presentation context may only be bound to a single shell.

void nsPresContext::SetTextZoom ( float  aZoom  )  [inline]
void nsPresContext::SetupBackgroundImageLoaders ( nsIFrame *  aFrame,
const nsStyleBackground aStyleBackground 
)

Make an appropriate SetImageLoaders call (including potentially with null aImageLoaders) given that aFrame draws its background based on aStyleBackground.

void nsPresContext::SetupBorderImageLoaders ( nsIFrame *  aFrame,
const nsStyleBorder aStyleBorder 
)

Make an appropriate SetImageLoaders call (including potentially with null aImageLoaders) given that aFrame draws its border based on aStyleBorder.

void nsPresContext::SetViewportOverflowOverride ( PRUint8  aX,
PRUint8  aY 
) [inline]
void nsPresContext::SetVisibleArea ( const nsRect r  )  [inline]

Set the currently visible area.

The units for r are standard nscoord units (as scaled by the device context).

void nsPresContext::StopImagesFor ( nsIFrame *  aTargetFrame  ) 

This method is called when a frame is being destroyed to ensure that the image loads get disassociated from the prescontext.

PRBool nsPresContext::SupressingResizeReflow (  )  const [inline]
void nsPresContext::SysColorChanged (  ) 
void nsPresContext::SysColorChangedInternal (  )  [protected]
float nsPresContext::TextZoom (  )  [inline]
void nsPresContext::ThemeChanged (  ) 
void nsPresContext::ThemeChangedInternal (  )  [protected]
nscoord nsPresContext::TwipsToAppUnits ( PRInt32  aTwips  )  const [inline]
nsMargin nsPresContext::TwipsToAppUnits ( const nsIntMargin marginInTwips  )  const [inline]
nsPresContextType nsPresContext::Type (  )  const [inline]
void nsPresContext::UpdateAfterPreferencesChanged (  )  [protected]
void nsPresContext::UpdateCharSet ( const nsAFlatCString aCharSet  )  [protected]
PRBool nsPresContext::UseDocumentColors (  )  const [inline]
void nsPresContext::UserFontSetUpdated (  ) 

Friends And Related Function Documentation

friend class InterruptPreventer [friend]
friend class nsRunnableMethod< nsPresContext > [friend]

Member Data Documentation

unsigned nsPresContext::mCanPaginatedScroll [protected]
nsWeakPtr nsPresContext::mContainer [protected]
nsIDeviceContext* nsPresContext::mDeviceContext [protected]
nsCOMPtr<nsIDocument> nsPresContext::mDocument [protected]
unsigned nsPresContext::mDoScaledTwips [protected]
nsIEventStateManager* nsPresContext::mEventManager [protected]
unsigned nsPresContext::mFocusRingStyle [protected]
PRUint8 nsPresContext::mFocusRingWidth [protected]
nsTArray<nsFontFaceRuleContainer> nsPresContext::mFontFaceRules [protected]
PRInt32 nsPresContext::mFontScaler [protected]
float nsPresContext::mFullZoom [protected]
PRUint16 nsPresContext::mImageAnimationMode [protected]
nsRefPtrHashtable<nsVoidPtrHashKey, nsImageLoader> nsPresContext::mImageLoaders[IMAGE_LOAD_TYPE_COUNT] [protected]
unsigned nsPresContext::mInterruptsEnabled [protected]
unsigned nsPresContext::mIsVisual [protected]
nsCOMPtr<nsILanguageAtomService> nsPresContext::mLangService [protected]
nsILinkHandler* nsPresContext::mLinkHandler [protected]
nsILookAndFeel* nsPresContext::mLookAndFeel [protected]
unsigned nsPresContext::mNeverAnimate [protected]
float nsPresContext::mPageScale [protected]
unsigned nsPresContext::mPaginated [protected]
float nsPresContext::mPPScale [protected]
unsigned nsPresContext::mPrefBidiDirection [protected]
unsigned nsPresContext::mPrefScrollbarSide [protected]
nsIPresShell* nsPresContext::mShell [protected]
float nsPresContext::mTextZoom [protected]
nsCOMPtr<nsITheme> nsPresContext::mTheme [protected]
nsRefPtr<nsTransitionManager> nsPresContext::mTransitionManager [protected]
unsigned nsPresContext::mUnderlineLinks [protected]
unsigned nsPresContext::mUseDocumentColors [protected]
unsigned nsPresContext::mUseDocumentFonts [protected]
unsigned nsPresContext::mUseFocusColors [protected]
nsUserFontSet* nsPresContext::mUserFontSet [protected]
unsigned nsPresContext::mUserFontSetDirty [protected]

The documentation for this class was generated from the following file: