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

nsCSSFrameConstructor Class Reference

#include <nsCSSFrameConstructor.h>

Inheritance diagram for nsCSSFrameConstructor:
Collaboration diagram for nsCSSFrameConstructor:

List of all members.

Classes

struct  FrameConstructionData
struct  FrameConstructionDataByInt
struct  FrameConstructionDataByTag
struct  FrameConstructionItem
class  FrameConstructionItemList
class  LazyGenerateChildrenEvent
struct  PseudoParentData
struct  RestyleData
struct  RestyleEnumerateData

Public Types

enum  RemoveFlags { REMOVE_CONTENT, REMOVE_FOR_RECONSTRUCTION }

Public Member Functions

 nsCSSFrameConstructor (nsIDocument *aDocument, nsIPresShell *aPresShell)
 ~nsCSSFrameConstructor (void)
virtual nsrefcnt AddRef (void)
virtual nsrefcnt Release (void)
nsresult ConstructRootFrame (nsIFrame **aNewFrame)
nsresult ReconstructDocElementHierarchy ()
nsresult ContentAppended (nsIContent *aContainer, PRInt32 aNewIndexInContainer)
nsresult ContentInserted (nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer, nsILayoutHistoryState *aFrameState)
nsresult ContentRemoved (nsIContent *aContainer, nsIContent *aChild, PRInt32 aIndexInContainer, RemoveFlags aFlags, PRBool *aDidReconstruct)
nsresult CharacterDataChanged (nsIContent *aContent, CharacterDataChangeInfo *aInfo)
nsresult ContentStatesChanged (nsIContent *aContent1, nsIContent *aContent2, PRInt32 aStateMask)
nsresult AddLazyChildren (nsIContent *aContent, nsLazyFrameConstructionCallback *aCallback, void *aArg, PRBool aIsSynch=0)
void NotifyDestroyingFrame (nsIFrame *aFrame)
void AttributeWillChange (nsIContent *aContent, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType)
void AttributeChanged (nsIContent *aContent, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType)
void BeginUpdate ()
void EndUpdate ()
void RecalcQuotesAndCounters ()
void WillDestroyFrameTree ()
PRUint32 GetHoverGeneration () const
nsresult ProcessRestyledFrames (nsStyleChangeList &aRestyleArray)
void RestyleForInsertOrChange (nsIContent *aContainer, nsIContent *aChild)
void RestyleForRemove (nsIContent *aContainer, nsIContent *aOldChild, PRInt32 aIndexInContainer)
void RestyleForAppend (nsIContent *aContainer, PRInt32 aNewIndexInContainer)
void ProcessPendingRestyles ()
void RebuildAllStyleData (nsChangeHint aExtraHint)
void PostRestyleEvent (nsIContent *aContent, nsReStyleHint aRestyleHint, nsChangeHint aMinChangeHint)
void PostAnimationRestyleEvent (nsIContent *aContent, nsReStyleHint aRestyleHint, nsChangeHint aMinChangeHint)
virtual void WillRefresh (mozilla::TimeStamp aTime)
void PostRebuildAllStyleDataEvent (nsChangeHint aExtraHint)
 Asynchronously clear style data from the root frame downwards and ensure it will all be rebuilt.
nsresult CreateContinuingFrame (nsPresContext *aPresContext, nsIFrame *aFrame, nsIFrame *aParentFrame, nsIFrame **aContinuingFrame, PRBool aIsFluid=1)
nsresult ReplicateFixedFrames (nsPageContentFrame *aParentFrame)
nsresult GetInsertionPoint (nsIFrame *aParentFrame, nsIContent *aChildContent, nsIFrame **aInsertionPoint, PRBool *aMultiple=0)
nsresult CreateListBoxContent (nsPresContext *aPresContext, nsIFrame *aParentFrame, nsIFrame *aPrevFrame, nsIContent *aChild, nsIFrame **aResult, PRBool aIsAppend, PRBool aIsScrollbar, nsILayoutHistoryState *aFrameState)
nsIFrame * GetRootElementFrame ()
nsIFrame * GetRootElementStyleFrame ()
nsIFrame * GetPageSequenceFrame ()
nsIFrame * GetDocElementContainingBlock ()
nsIFrame * GetAbsoluteContainingBlock (nsIFrame *aFrame)
 These two functions are used when we start frame creation from a non-root element.

Static Public Member Functions

static nsIXBLService * GetXBLService ()
static void ReleaseGlobals ()
static void GetAlternateTextFor (nsIContent *aContent, nsIAtom *aTag, nsXPIDLString &aAltText)

Static Protected Member Functions

static nsresult CreatePlaceholderFrameFor (nsIPresShell *aPresShell, nsIContent *aContent, nsIFrame *aFrame, nsStyleContext *aStyleContext, nsIFrame *aParentFrame, nsIFrame *aPrevInFlow, nsFrameState aTypeBit, nsIFrame **aPlaceholderFrame)

Protected Attributes

nsAutoRefCnt mRefCnt

Friends

struct RestyleData
class nsFrameConstructorState
class LazyGenerateChildrenEvent

Member Enumeration Documentation

Enumerator:
REMOVE_CONTENT 
REMOVE_FOR_RECONSTRUCTION 

Constructor & Destructor Documentation

nsCSSFrameConstructor::nsCSSFrameConstructor ( nsIDocument *  aDocument,
nsIPresShell *  aPresShell 
)
nsCSSFrameConstructor::~nsCSSFrameConstructor ( void   )  [inline]

Member Function Documentation

nsresult nsCSSFrameConstructor::AddLazyChildren ( nsIContent *  aContent,
nsLazyFrameConstructionCallback aCallback,
void *  aArg,
PRBool  aIsSynch = 0 
)
virtual nsrefcnt nsCSSFrameConstructor::AddRef ( void   )  [virtual]

Implements nsARefreshObserver.

void nsCSSFrameConstructor::AttributeChanged ( nsIContent *  aContent,
PRInt32  aNameSpaceID,
nsIAtom aAttribute,
PRInt32  aModType 
)
void nsCSSFrameConstructor::AttributeWillChange ( nsIContent *  aContent,
PRInt32  aNameSpaceID,
nsIAtom aAttribute,
PRInt32  aModType 
)
void nsCSSFrameConstructor::BeginUpdate (  ) 
nsresult nsCSSFrameConstructor::CharacterDataChanged ( nsIContent *  aContent,
CharacterDataChangeInfo *  aInfo 
)
nsresult nsCSSFrameConstructor::ConstructRootFrame ( nsIFrame **  aNewFrame  ) 
nsresult nsCSSFrameConstructor::ContentAppended ( nsIContent *  aContainer,
PRInt32  aNewIndexInContainer 
)
nsresult nsCSSFrameConstructor::ContentInserted ( nsIContent *  aContainer,
nsIContent *  aChild,
PRInt32  aIndexInContainer,
nsILayoutHistoryState *  aFrameState 
)
nsresult nsCSSFrameConstructor::ContentRemoved ( nsIContent *  aContainer,
nsIContent *  aChild,
PRInt32  aIndexInContainer,
RemoveFlags  aFlags,
PRBool aDidReconstruct 
)
nsresult nsCSSFrameConstructor::ContentStatesChanged ( nsIContent *  aContent1,
nsIContent *  aContent2,
PRInt32  aStateMask 
)
nsresult nsCSSFrameConstructor::CreateContinuingFrame ( nsPresContext aPresContext,
nsIFrame *  aFrame,
nsIFrame *  aParentFrame,
nsIFrame **  aContinuingFrame,
PRBool  aIsFluid = 1 
)
nsresult nsCSSFrameConstructor::CreateListBoxContent ( nsPresContext aPresContext,
nsIFrame *  aParentFrame,
nsIFrame *  aPrevFrame,
nsIContent *  aChild,
nsIFrame **  aResult,
PRBool  aIsAppend,
PRBool  aIsScrollbar,
nsILayoutHistoryState *  aFrameState 
)
static nsresult nsCSSFrameConstructor::CreatePlaceholderFrameFor ( nsIPresShell *  aPresShell,
nsIContent *  aContent,
nsIFrame *  aFrame,
nsStyleContext aStyleContext,
nsIFrame *  aParentFrame,
nsIFrame *  aPrevInFlow,
nsFrameState  aTypeBit,
nsIFrame **  aPlaceholderFrame 
) [static, protected]
void nsCSSFrameConstructor::EndUpdate (  ) 
nsIFrame* nsCSSFrameConstructor::GetAbsoluteContainingBlock ( nsIFrame *  aFrame  ) 

These two functions are used when we start frame creation from a non-root element.

They should recreate the same state that we would have arrived at if we had built frames from the root frame to aFrame. Therefore, any calls to PushFloatContainingBlock and PushAbsoluteContainingBlock during frame construction should get corresponding logic in these functions.

static void nsCSSFrameConstructor::GetAlternateTextFor ( nsIContent *  aContent,
nsIAtom aTag,
nsXPIDLString &  aAltText 
) [static]
nsIFrame* nsCSSFrameConstructor::GetDocElementContainingBlock (  )  [inline]
PRUint32 nsCSSFrameConstructor::GetHoverGeneration (  )  const [inline]
nsresult nsCSSFrameConstructor::GetInsertionPoint ( nsIFrame *  aParentFrame,
nsIContent *  aChildContent,
nsIFrame **  aInsertionPoint,
PRBool aMultiple = 0 
)
nsIFrame* nsCSSFrameConstructor::GetPageSequenceFrame (  )  [inline]
nsIFrame* nsCSSFrameConstructor::GetRootElementFrame (  )  [inline]
nsIFrame* nsCSSFrameConstructor::GetRootElementStyleFrame (  )  [inline]
static nsIXBLService* nsCSSFrameConstructor::GetXBLService (  )  [static]
void nsCSSFrameConstructor::NotifyDestroyingFrame ( nsIFrame *  aFrame  ) 
void nsCSSFrameConstructor::PostAnimationRestyleEvent ( nsIContent *  aContent,
nsReStyleHint  aRestyleHint,
nsChangeHint  aMinChangeHint 
) [inline]
void nsCSSFrameConstructor::PostRebuildAllStyleDataEvent ( nsChangeHint  aExtraHint  ) 

Asynchronously clear style data from the root frame downwards and ensure it will all be rebuilt.

This is safe to call anytime; it will schedule a restyle and take effect next time style changes are flushed. This method is used to recompute the style data when some change happens outside of any style rules, like a color preference change or a change in a system font size, or to fix things up when an optimization in the style data has become invalid. We assume that the root frame will not need to be reframed.

void nsCSSFrameConstructor::PostRestyleEvent ( nsIContent *  aContent,
nsReStyleHint  aRestyleHint,
nsChangeHint  aMinChangeHint 
) [inline]
void nsCSSFrameConstructor::ProcessPendingRestyles (  ) 
nsresult nsCSSFrameConstructor::ProcessRestyledFrames ( nsStyleChangeList aRestyleArray  ) 
void nsCSSFrameConstructor::RebuildAllStyleData ( nsChangeHint  aExtraHint  ) 
void nsCSSFrameConstructor::RecalcQuotesAndCounters (  ) 
nsresult nsCSSFrameConstructor::ReconstructDocElementHierarchy (  ) 
virtual nsrefcnt nsCSSFrameConstructor::Release ( void   )  [virtual]

Implements nsARefreshObserver.

static void nsCSSFrameConstructor::ReleaseGlobals (  )  [inline, static]
nsresult nsCSSFrameConstructor::ReplicateFixedFrames ( nsPageContentFrame *  aParentFrame  ) 
void nsCSSFrameConstructor::RestyleForAppend ( nsIContent *  aContainer,
PRInt32  aNewIndexInContainer 
)
void nsCSSFrameConstructor::RestyleForInsertOrChange ( nsIContent *  aContainer,
nsIContent *  aChild 
)
void nsCSSFrameConstructor::RestyleForRemove ( nsIContent *  aContainer,
nsIContent *  aOldChild,
PRInt32  aIndexInContainer 
)
void nsCSSFrameConstructor::WillDestroyFrameTree (  ) 
virtual void nsCSSFrameConstructor::WillRefresh ( mozilla::TimeStamp  aTime  )  [virtual]

Implements nsARefreshObserver.


Friends And Related Function Documentation

friend class LazyGenerateChildrenEvent [friend]
friend class nsFrameConstructorState [friend]
friend struct RestyleData [friend]

Member Data Documentation

nsAutoRefCnt nsCSSFrameConstructor::mRefCnt [protected]

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