#include <nsPresContext.h>
Inheritance diagram for nsPresContext:
Collaboration diagram for nsPresContext: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... | |
| typedef mozilla::FramePropertyTable | FramePropertyTable |
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 |
| nsRootPresContext * | GetRootPresContext () |
| Return the presentation context for the root of the view manager hierarchy that contains this presentation context, or nsnull if it can't be found (e.g. | |
| virtual PRBool | IsRoot () |
| 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. | |
| nsIAtom * | Medium () |
| 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 nsFont * | GetDefaultFont (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< nsISupports > | GetContainerInternal () const |
| already_AddRefed< nsISupports > | GetContainer () 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 () |
| nsIAtom * | GetLanguageFromCharset () |
| float | TextZoom () |
| void | SetTextZoom (float aZoom) |
| float | GetFullZoom () |
| void | SetFullZoom (float aZoom) |
| nscoord | GetAutoQualityMinFontSize () |
| PRInt32 | AppUnitsPerDevPixel () 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 | 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) |
| PRUint32 | GetBidiMemoryUsed () |
| void | SetIsRenderingOnlySelection (PRBool aResult) |
| Render only Selection. | |
| PRBool | IsRenderingOnlySelection () const |
| PRBool | IsTopLevelWindowInactive () |
| nsITheme * | GetTheme () |
| void | ThemeChanged () |
| void | SysColorChanged () |
| void | SetPrintSettings (nsIPrintSettings *aPrintSettings) |
| Printing methods below should only be used for Medium() == print. | |
| nsIPrintSettings * | GetPrintSettings () |
| FramePropertyTable * | PropertyTable () |
| PRBool | EnsureVisible () |
| const nscoord * | GetBorderWidthTable () |
| This table maps border-width enums 'thin', 'medium', 'thick' to actual nscoord values. | |
| PRBool | IsDynamic () |
| PRBool | IsScreen () |
| PRBool | IsChrome () const |
| virtual void | InvalidateIsChromeCacheExternal () |
| void | InvalidateIsChromeCacheInternal () |
| void | InvalidateIsChromeCache () |
| virtual PRBool | HasAuthorSpecifiedRules (nsIFrame *aFrame, PRUint32 ruleTypeMask) const |
| PRBool | UseDocumentColors () const |
| PRBool | SupressingResizeReflow () const |
| virtual gfxUserFontSet * | GetUserFontSetExternal () |
| gfxUserFontSet * | GetUserFontSetInternal () |
| gfxUserFontSet * | GetUserFontSet () |
| void | FlushUserFontSet () |
| void | RebuildUserFontSet () |
| void | UserFontSetUpdated () |
| PRBool | EnsureSafeToHandOutCSSRules () |
| void | NotifyInvalidation (const nsRect &aRect, PRUint32 aFlags) |
| void | NotifyDidPaintForSubtree () |
| void | FireDOMPaintEvent () |
| PRBool | IsDOMPaintEventPending () |
| void | ClearMozAfterPaintEvents () |
| PRBool | IsProcessingRestyles () const |
| void | SetProcessingRestyles (PRBool aProcessing) |
| 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. | |
| void | NotifyDestroyingFrame (nsIFrame *aFrame) |
| void | ForgetUpdatePluginGeometryFrame (nsIFrame *aFrame) |
| void | SetContainsUpdatePluginGeometryFrame (PRBool aValue) |
| PRBool | MayHaveFixedBackgroundFrames () |
| void | SetHasFixedBackgroundFrame () |
| PRUint32 | EstimateMemoryUsed () |
| PRBool | IsRootContentDocument () |
Static Public Member Functions | |
| static PRInt32 | AppUnitsPerCSSPixel () |
| static PRInt32 | AppUnitsPerCSSInch () |
| static nscoord | CSSPixelsToAppUnits (PRInt32 aPixels) |
| static nscoord | CSSPixelsToAppUnits (float aPixels) |
| static PRInt32 | AppUnitsToIntCSSPixels (nscoord aAppUnits) |
| static float | AppUnitsToFloatCSSPixels (nscoord aAppUnits) |
| static nscoord | CSSTwipsToAppUnits (float aTwips) |
| static nsMargin | CSSTwipsToAppUnits (const nsIntMargin &marginInTwips) |
| static nscoord | CSSPointsToAppUnits (float aPoints) |
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 | HandleRebuildUserFontSet () |
| PRBool | HavePendingInputEvent () |
| PRBool | HasCachedStyleData () |
| PRBool | IsChromeSlow () const |
| 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< nsRefreshDriver > | mRefreshDriver |
| nsRefPtr< nsTransitionManager > | mTransitionManager |
| nsIAtom * | mMedium |
| nsILinkHandler * | mLinkHandler |
| nsIAtom * | mLanguage |
| 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< nsIPrintSettings > | mPrintSettings |
| nsCOMPtr< nsITimer > | mPrefChangedTimer |
| FramePropertyTable | 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 | mSendAfterPaintToContent: 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 | mMayHaveFixedBackgroundFrames: 1 |
| unsigned | mUserFontSetDirty: 1 |
| unsigned | mGetUserFontSetCalled: 1 |
| unsigned | mPostedFlushUserFontSet: 1 |
| unsigned | mSupressResizeReflow: 1 |
| unsigned | mIsVisual: 1 |
| unsigned | mProcessingRestyles: 1 |
| unsigned | mProcessingAnimationStyleChange: 1 |
| unsigned | mContainsUpdatePluginGeometryFrame: 1 |
| unsigned | mFireAfterPaintEvents: 1 |
| unsigned | mIsChromeIsCached: 1 |
| unsigned | mIsChrome: 1 |
Friends | |
| class | InterruptPreventer |
| class | nsRunnableMethod< nsPresContext > |
anonymous enum [protected] |
| nsPresContext::nsPresContext | ( | nsIDocument * | aDocument, | |
| nsPresContextType | aType | |||
| ) |
| virtual nsPresContext::~nsPresContext | ( | ) | [protected, virtual] |
| void* nsPresContext::AllocateFromShell | ( | size_t | aSize | ) | [inline] |
| static PRInt32 nsPresContext::AppUnitsPerCSSInch | ( | ) | [inline, static] |
| static PRInt32 nsPresContext::AppUnitsPerCSSPixel | ( | ) | [inline, static] |
| PRInt32 nsPresContext::AppUnitsPerDevPixel | ( | ) | const [inline] |
| PRInt32 nsPresContext::AppUnitsToDevPixels | ( | nscoord | aAppUnits | ) | const [inline] |
| static float nsPresContext::AppUnitsToFloatCSSPixels | ( | nscoord | aAppUnits | ) | [inline, static] |
| 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 | ( | PRInt32 | aPixels | ) | [inline, static] |
| static nscoord nsPresContext::CSSPixelsToAppUnits | ( | float | aPixels | ) | [inline, static] |
| PRInt32 nsPresContext::CSSPixelsToDevPixels | ( | PRInt32 | aPixels | ) | [inline] |
| float nsPresContext::CSSPixelsToDevPixels | ( | float | aPixels | ) | [inline] |
| static nscoord nsPresContext::CSSPointsToAppUnits | ( | float | aPoints | ) | [inline, static] |
| static nscoord nsPresContext::CSSTwipsToAppUnits | ( | float | aTwips | ) | [inline, static] |
| static nsMargin nsPresContext::CSSTwipsToAppUnits | ( | const nsIntMargin & | marginInTwips | ) | [inline, static] |
| 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 | ( | ) |
| PRUint32 nsPresContext::EstimateMemoryUsed | ( | ) | [inline] |
| 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::ForgetUpdatePluginGeometryFrame | ( | nsIFrame * | aFrame | ) | [inline] |
| 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.
| PRUint32 nsPresContext::GetBidiMemoryUsed | ( | ) | [inline] |
| 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::GetLanguageFromCharset | ( | ) | [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] |
| nsRootPresContext* nsPresContext::GetRootPresContext | ( | ) |
Return the presentation context for the root of the view manager hierarchy that contains this presentation context, or nsnull if it can't be found (e.g.
it's detached).
| 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).
| 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.
| void nsPresContext::InvalidateIsChromeCache | ( | ) | [inline] |
| virtual void nsPresContext::InvalidateIsChromeCacheExternal | ( | ) | [virtual] |
| void nsPresContext::InvalidateIsChromeCacheInternal | ( | ) | [inline] |
| PRBool nsPresContext::IsChrome | ( | ) | const [inline] |
| PRBool nsPresContext::IsChromeSlow | ( | ) | const [protected] |
| 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::IsProcessingRestyles | ( | ) | const [inline] |
| PRBool nsPresContext::IsRenderingOnlySelection | ( | ) | const [inline] |
| virtual PRBool nsPresContext::IsRoot | ( | ) | [inline, virtual] |
Reimplemented in nsRootPresContext.
| PRBool nsPresContext::IsRootContentDocument | ( | ) |
| 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] |
| PRBool nsPresContext::IsTopLevelWindowInactive | ( | ) |
| nsILookAndFeel* nsPresContext::LookAndFeel | ( | ) | [inline] |
Get cached look and feel service.
This is faster than obtaining it through the service manager.
| PRBool nsPresContext::MayHaveFixedBackgroundFrames | ( | ) | [inline] |
| PRBool nsPresContext::MayHavePaintEventListener | ( | ) | [protected] |
| void nsPresContext::MediaFeatureValuesChanged | ( | PRBool | aCallerWillRebuildStyleData | ) |
| nsIAtom* nsPresContext::Medium | ( | ) | [inline] |
Get medium of presentation.
| void nsPresContext::NotifyDestroyingFrame | ( | nsIFrame * | aFrame | ) | [inline] |
| void nsPresContext::NotifyDidPaintForSubtree | ( | ) |
| 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] |
| 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.
| FramePropertyTable* 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.
| void nsPresContext::SetBackgroundColorDraw | ( | PRBool | aCanDraw | ) | [inline] |
| void nsPresContext::SetBackgroundImageDraw | ( | PRBool | aCanDraw | ) | [inline] |
| void nsPresContext::SetContainer | ( | nsISupports * | aContainer | ) |
| void nsPresContext::SetContainsUpdatePluginGeometryFrame | ( | PRBool | aValue | ) | [inline] |
| void nsPresContext::SetFullZoom | ( | float | aZoom | ) |
| void nsPresContext::SetHasFixedBackgroundFrame | ( | ) | [inline] |
| 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::SetProcessingRestyles | ( | 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] |
| nsPresContextType nsPresContext::Type | ( | ) | const [inline] |
| void nsPresContext::UpdateAfterPreferencesChanged | ( | ) | [protected] |
| void nsPresContext::UpdateCharSet | ( | const nsAFlatCString & | aCharSet | ) | [protected] |
| PRBool nsPresContext::UseDocumentColors | ( | ) | const [inline] |
| void nsPresContext::UserFontSetUpdated | ( | ) |
friend class InterruptPreventer [friend] |
friend class nsRunnableMethod< nsPresContext > [friend] |
nscolor nsPresContext::mActiveLinkColor [protected] |
PRInt32 nsPresContext::mAutoQualityMinFontSizePixelsPref [protected] |
nscolor nsPresContext::mBackgroundColor [protected] |
nscoord nsPresContext::mBorderWidthTable[3] [protected] |
unsigned nsPresContext::mCanPaginatedScroll [protected] |
nsWeakPtr nsPresContext::mContainer [protected] |
unsigned nsPresContext::mContainsUpdatePluginGeometryFrame [protected] |
PRInt32 nsPresContext::mCurAppUnitsPerDevPixel [protected] |
nscolor nsPresContext::mDefaultColor [protected] |
nsFont nsPresContext::mDefaultCursiveFont [protected] |
nsFont nsPresContext::mDefaultFantasyFont [protected] |
nsFont nsPresContext::mDefaultFixedFont [protected] |
nsFont nsPresContext::mDefaultMonospaceFont [protected] |
nsFont nsPresContext::mDefaultSansSerifFont [protected] |
nsFont nsPresContext::mDefaultSerifFont [protected] |
nsFont nsPresContext::mDefaultVariableFont [protected] |
nsIDeviceContext* nsPresContext::mDeviceContext [protected] |
nsCOMPtr<nsIDocument> nsPresContext::mDocument [protected] |
unsigned nsPresContext::mDoScaledTwips [protected] |
unsigned nsPresContext::mDrawColorBackground [protected] |
unsigned nsPresContext::mDrawImageBackground [protected] |
unsigned nsPresContext::mEnableJapaneseTransform [protected] |
nsIEventStateManager* nsPresContext::mEventManager [protected] |
unsigned nsPresContext::mFireAfterPaintEvents [protected] |
nscolor nsPresContext::mFocusBackgroundColor [protected] |
unsigned nsPresContext::mFocusRingOnAnything [protected] |
unsigned nsPresContext::mFocusRingStyle [protected] |
PRUint8 nsPresContext::mFocusRingWidth [protected] |
nscolor nsPresContext::mFocusTextColor [protected] |
nsTArray<nsFontFaceRuleContainer> nsPresContext::mFontFaceRules [protected] |
PRInt32 nsPresContext::mFontScaler [protected] |
float nsPresContext::mFullZoom [protected] |
unsigned nsPresContext::mGetUserFontSetCalled [protected] |
unsigned nsPresContext::mHasPendingInterrupt [protected] |
PRUint16 nsPresContext::mImageAnimationMode [protected] |
PRUint16 nsPresContext::mImageAnimationModePref [protected] |
nsRefPtrHashtable<nsVoidPtrHashKey, nsImageLoader> nsPresContext::mImageLoaders[IMAGE_LOAD_TYPE_COUNT] [protected] |
PRUint32 nsPresContext::mInterruptChecksToSkip [protected] |
unsigned nsPresContext::mInterruptsEnabled [protected] |
unsigned nsPresContext::mIsChrome [mutable, protected] |
unsigned nsPresContext::mIsChromeIsCached [mutable, protected] |
unsigned nsPresContext::mIsRenderingOnlySelection [protected] |
unsigned nsPresContext::mIsRootPaginatedDocument [protected] |
unsigned nsPresContext::mIsVisual [protected] |
nsCOMPtr<nsILanguageAtomService> nsPresContext::mLangService [protected] |
nsIAtom* nsPresContext::mLanguage [protected] |
nscolor nsPresContext::mLinkColor [protected] |
nsILinkHandler* nsPresContext::mLinkHandler [protected] |
nsILookAndFeel* nsPresContext::mLookAndFeel [protected] |
unsigned nsPresContext::mMayHaveFixedBackgroundFrames [protected] |
nsIAtom* nsPresContext::mMedium [protected] |
nscoord nsPresContext::mMinimumFontSize [protected] |
unsigned nsPresContext::mNeverAnimate [protected] |
float nsPresContext::mPageScale [protected] |
nsSize nsPresContext::mPageSize [protected] |
unsigned nsPresContext::mPaginated [protected] |
unsigned nsPresContext::mPendingMediaFeatureValuesChanged [protected] |
unsigned nsPresContext::mPendingSysColorChanged [protected] |
unsigned nsPresContext::mPendingThemeChanged [protected] |
unsigned nsPresContext::mPostedFlushUserFontSet [protected] |
float nsPresContext::mPPScale [protected] |
unsigned nsPresContext::mPrefBidiDirection [protected] |
nsCOMPtr<nsITimer> nsPresContext::mPrefChangedTimer [protected] |
unsigned nsPresContext::mPrefChangePendingNeedsReflow [protected] |
unsigned nsPresContext::mPrefScrollbarSide [protected] |
nsCOMPtr<nsIPrintSettings> nsPresContext::mPrintSettings [protected] |
unsigned nsPresContext::mProcessingAnimationStyleChange [protected] |
unsigned nsPresContext::mProcessingRestyles [protected] |
FramePropertyTable nsPresContext::mPropertyTable [protected] |
mozilla::TimeStamp nsPresContext::mReflowStartTime [protected] |
nsRefPtr<nsRefreshDriver> nsPresContext::mRefreshDriver [protected] |
unsigned nsPresContext::mSendAfterPaintToContent [protected] |
nsIPresShell* nsPresContext::mShell [protected] |
unsigned nsPresContext::mSupressResizeReflow [protected] |
float nsPresContext::mTextZoom [protected] |
nsCOMPtr<nsITheme> nsPresContext::mTheme [protected] |
nsRefPtr<nsTransitionManager> nsPresContext::mTransitionManager [protected] |
nsPresContextType nsPresContext::mType [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] |
ScrollbarStyles nsPresContext::mViewportStyleOverflow [protected] |
nsRect nsPresContext::mVisibleArea [protected] |
nscolor nsPresContext::mVisitedLinkColor [protected] |
1.7.1