Back to index

lightning-sunbird  0.9+nobinonly
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions
nsIFrame Class Reference

A frame in the layout model. More...

#include <nsIFrame.h>

Inheritance diagram for nsIFrame:
Inheritance graph
[legend]
Collaboration diagram for nsIFrame:
Collaboration graph
[legend]

List of all members.

Classes

struct  Cursor
 This structure holds information about a cursor. More...

Public Types

enum  { eMathML = 1 << 0, eSVG = 1 << 1, eSVGForeignObject = 1 << 2 }
 Bit-flags to pass to IsFrameOfType() More...
enum  Halignment { hAlign_Left, hAlign_Right, hAlign_Center }
enum  Valignment { vAlign_Top, vAlign_Middle, vAlign_BaseLine, vAlign_Bottom }

Public Member Functions

nsPresContextGetPresContext () const
NS_IMETHOD Init (nsPresContext *aPresContext, nsIContent *aContent, nsIFrame *aParent, nsStyleContext *aContext, nsIFrame *aPrevInFlow)=0
 Called to initialize the frame.
NS_IMETHOD Destroy (nsPresContext *aPresContext)=0
 Destroys this frame and each of its child frames (recursively calls Destroy() for each child)
virtual void RemovedAsPrimaryFrame (nsPresContext *aPresContext)
NS_IMETHOD SetInitialChildList (nsPresContext *aPresContext, nsIAtom *aListName, nsIFrame *aChildList)=0
 Called to set the initial list of frames.
NS_IMETHOD AppendFrames (nsIAtom *aListName, nsIFrame *aFrameList)=0
 This method is responsible for appending frames to the frame list.
NS_IMETHOD InsertFrames (nsIAtom *aListName, nsIFrame *aPrevFrame, nsIFrame *aFrameList)=0
 This method is responsible for inserting frames into the frame list.
NS_IMETHOD RemoveFrame (nsIAtom *aListName, nsIFrame *aOldFrame)=0
 This method is responsible for removing a frame in the frame list.
NS_IMETHOD ReplaceFrame (nsIAtom *aListName, nsIFrame *aOldFrame, nsIFrame *aNewFrame)=0
 This method is responsible for replacing the old frame with the new frame.
nsIContentGetContent () const
 Get the content object associated with this frame.
virtual nsIFrameGetContentInsertionFrame ()
 Get the frame that should be the parent for the frames of child elements.
virtual already_AddRefed
< nsIContent
GetContentInsertionNode ()
 Get the child content node whose frame should be used as the parent for the frames of child elements.
NS_IMETHOD GetOffsets (PRInt32 &start, PRInt32 &end) const =0
 Get the offsets of the frame.
virtual void AdjustOffsetsForBidi (PRInt32 aStart, PRInt32 aEnd)
 Reset the offsets when splitting frames during Bidi reordering.
nsStyleContextGetStyleContext () const
 Get the style context associated with this frame.
void SetStyleContext (nsPresContext *aPresContext, nsStyleContext *aContext)
NS_IMETHOD DidSetStyleContext (nsPresContext *aPresContext)=0
virtual const nsStyleStructGetStyleDataExternal (nsStyleStructID aSID) const =0
 Get the style data associated with this frame.
const nsStyleStructGetStyleData (nsStyleStructID aSID) const
NS_IMETHOD CalcBorderPadding (nsMargin &aBorderPadding) const =0
virtual nsStyleContextGetAdditionalStyleContext (PRInt32 aIndex) const =0
 These methods are to access any additional style contexts that the frame may be holding.
virtual void SetAdditionalStyleContext (PRInt32 aIndex, nsStyleContext *aStyleContext)=0
nsIFrameGetParent () const
 Accessor functions for geometric parent.
NS_IMETHOD SetParent (const nsIFrame *aParent)
nsRect GetRect () const
 Bounding rect of the frame.
nsPoint GetPosition () const
nsSize GetSize () const
void SetRect (const nsRect &aRect)
void SetPosition (const nsPoint &aPt)
void SetSize (const nsSize &aSize)
virtual nsIAtomGetAdditionalChildListName (PRInt32 aIndex) const =0
 Used to iterate the list of additional child list names.
virtual nsIFrameGetFirstChild (nsIAtom *aListName) const =0
 Get the first child frame from the specified child list.
nsIFrameGetNextSibling () const
 Child frames are linked together in a singly-linked list.
void SetNextSibling (nsIFrame *aNextSibling)
NS_IMETHOD Paint (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, const nsRect &aDirtyRect, nsFramePaintLayer aWhichLayer, PRUint32 aFlags=0)=0
 Paint is responsible for painting the frame.
virtual PRBool CanPaintBackground ()
 Does the frame paint its background? If not, then all or part of it will be painted by ancestors.
virtual PRBool NeedsView ()
 Does this frame type always need a view?
virtual nsresult CreateWidgetForView (nsIView *aView)
 This frame needs a view with a widget (e.g.
NS_IMETHOD HandleEvent (nsPresContext *aPresContext, nsGUIEvent *aEvent, nsEventStatus *aEventStatus)=0
 Event handling of GUI events.
NS_IMETHOD GetContentForEvent (nsPresContext *aPresContext, nsEvent *aEvent, nsIContent **aContent)=0
NS_IMETHOD GetContentAndOffsetsFromPoint (nsPresContext *aCX, const nsPoint &aPoint, nsIContent **aNewContent, PRInt32 &aContentOffset, PRInt32 &aContentOffsetEnd, PRBool &aBeginFrameContent)=0
NS_IMETHOD GetCursor (const nsPoint &aPoint, Cursor &aCursor)=0
 Get the cursor for a given frame.
NS_IMETHOD GetFrameForPoint (const nsPoint &aPoint, nsFramePaintLayer aWhichLayer, nsIFrame **aFrame)=0
 Get the frame that should receive events for a given point in the coordinate space of this frame's parent, if the frame is painted in the given paint layer.
NS_IMETHOD GetPointFromOffset (nsPresContext *inPresContext, nsIRenderingContext *inRendContext, PRInt32 inOffset, nsPoint *outPoint)=0
 Get a point (in the frame's coordinate space) given an offset into the content.
NS_IMETHOD GetChildFrameContainingOffset (PRInt32 inContentOffset, PRBool inHint, PRInt32 *outFrameContentOffset, nsIFrame **outChildFrame)=0
 Get the child frame of this frame which contains the given content offset.
nsFrameState GetStateBits () const
 Get the current frame-state value for this frame.
void AddStateBits (nsFrameState aBits)
 Update the current frame-state value for this frame.
void RemoveStateBits (nsFrameState aBits)
NS_IMETHOD CharacterDataChanged (nsPresContext *aPresContext, nsIContent *aChild, PRBool aAppend)=0
 This call is invoked when content is changed in the content tree.
NS_IMETHOD AttributeChanged (nsIContent *aChild, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType)=0
 This call is invoked when the value of a content objects's attribute is changed.
NS_IMETHOD IsSplittable (nsSplittableType &aIsSplittable) const =0
 Return how your frame can be split.
virtual nsIFrameGetPrevInFlow () const =0
 Flow member functions.
NS_IMETHOD SetPrevInFlow (nsIFrame *)=0
virtual nsIFrameGetNextInFlow () const =0
NS_IMETHOD SetNextInFlow (nsIFrame *)=0
virtual nsIFrameGetFirstInFlow () const
 Return the first frame in our current flow.
virtual nsIFrameGetLastInFlow () const
 Return the last frame in our current flow.
NS_IMETHOD WillReflow (nsPresContext *aPresContext)=0
 Pre-reflow hook.
NS_IMETHOD Reflow (nsPresContext *aPresContext, nsHTMLReflowMetrics &aReflowMetrics, const nsHTMLReflowState &aReflowState, nsReflowStatus &aStatus)=0
 The frame is given a maximum size and asked for its desired size.
NS_IMETHOD DidReflow (nsPresContext *aPresContext, const nsHTMLReflowState *aReflowState, nsDidReflowStatus aStatus)=0
 Post-reflow hook.
NS_IMETHOD CanContinueTextRun (PRBool &aContinueTextRun) const =0
 Helper method used by block reflow to identify runs of text so that proper word-breaking can be done.
NS_IMETHOD AdjustFrameSize (nscoord aExtraSpace, nscoord &aUsedSpace)=0
NS_IMETHOD TrimTrailingWhiteSpace (nsPresContext *aPresContext, nsIRenderingContext &aRC, nscoord &aDeltaWidth, PRBool &aLastCharIsJustifiable)=0
PRBool HasView () const
 Accessor functions to get/set the associated view object.
nsIViewGetView () const
virtual nsIViewGetViewExternal () const
nsresult SetView (nsIView *aView)
virtual nsIViewGetParentViewForChildFrame (nsIFrame *aFrame) const
 This view will be used to parent the views of any children.
nsIViewGetClosestView (nsPoint *aOffset=nsnull) const
 Find the closest view (on |this| or an ancestor).
nsIFrameGetAncestorWithView () const
 Find the closest ancestor (excluding |this| !) that has a view.
virtual nsIFrameGetAncestorWithViewExternal () const
nsPoint GetOffsetTo (const nsIFrame *aOther) const
 Get the offset between the coordinate systems of |this| and aOther.
virtual nsPoint GetOffsetToExternal (const nsIFrame *aOther) const
nsIntRect GetScreenRect () const
 Get the screen rect of the frame.
virtual nsIntRect GetScreenRectExternal () const
NS_IMETHOD GetOffsetFromView (nsPoint &aOffset, nsIView **aView) const =0
 Returns the offset from this frame to the closest geometric parent that has a view.
NS_IMETHOD GetOriginToViewOffset (nsPoint &aOffset, nsIView **aView) const =0
 Returns the offset from this frame's upper left corner to the upper left corner of the view returned by a call to GetView().
virtual PRBool AreAncestorViewsVisible () const
 Returns true if and only if all views, from |GetClosestView| up to the top of the view hierarchy are visible.
virtual nsIWidgetGetWindow () const
 Returns the window that contains this frame.
virtual nsIAtomGetType () const =0
 Get the "type" of the frame.
virtual PRBool IsFrameOfType (PRUint32 aFlags) const
 API for doing a quick check if a frame is of a given type.
virtual PRBool IsContainingBlock () const =0
 Is this frame a containing block for non-positioned elements?
virtual PRBool IsFloatContainingBlock () const
 Is this frame a containing block for floating elements? Note that very few frames are, so default to false.
virtual PRBool IsLeaf () const
 Is this a leaf frame? Frames that want the frame constructor to be able to construct kids for them should return false, all others should return true.
virtual nsIViewGetMouseCapturer () const
 Does this frame want to capture the mouse when the user clicks in it or its children? If so, return the view which should be targeted for mouse capture.
void Invalidate (const nsRect &aDamageRect, PRBool aImmediate=PR_FALSE) const
 Invalidate part of the frame by asking the view manager to repaint.
nsRect GetOverflowRect () const
 Computes a rect that includes this frame, all its descendant frames, this frame's outline (if any), and all descendant frames' outlines (if any).
void FinishAndStoreOverflow (nsRect *aOverflowArea, nsSize aNewSize)
 Set/unset the NS_FRAME_OUTSIDE_CHILDREN flag and store the overflow area as a frame property in the frame manager so that it can be retrieved later without reflowing the frame.
void FinishAndStoreOverflow (nsHTMLReflowMetrics *aMetrics)
NS_IMETHOD SetSelected (nsPresContext *aPresContext, nsIDOMRange *aRange, PRBool aSelected, nsSpread aSpread)=0
 Selection related calls.
NS_IMETHOD GetSelected (PRBool *aSelected) const =0
NS_IMETHOD IsSelectable (PRBool *aIsSelectable, PRUint8 *aSelectStyle) const =0
 called to discover where this frame, or a parent frame has user-select style applied, which affects that way that it is selected.
NS_IMETHOD GetSelectionController (nsPresContext *aPresContext, nsISelectionController **aSelCon)=0
 Called to retrieve the SelectionController associated with the frame.
NS_IMETHOD CaptureMouse (nsPresContext *aPresContext, PRBool aGrabMouseEvents)=0
 EndSelection related calls.
NS_IMETHOD PeekOffset (nsPresContext *aPresContext, nsPeekOffsetStruct *aPos)=0
 called to find the previous/next character, word, or line returns the actual nsIFrame and the frame offset.
NS_IMETHOD CheckVisibility (nsPresContext *aContext, PRInt32 aStartIndex, PRInt32 aEndIndex, PRBool aRecurse, PRBool *aFinished, PRBool *_retval)=0
 called to see if the children of the frame are visible from indexstart to index end.
NS_IMETHOD ReflowDirtyChild (nsIPresShell *aPresShell, nsIFrame *aChild)=0
 Called by a child frame on a parent frame to tell the parent frame that the child needs to be reflowed.
NS_IMETHOD GetParentStyleContextFrame (nsPresContext *aPresContext, nsIFrame **aProviderFrame, PRBool *aIsChild)=0
 Called to retrieve this frame's accessible.
NS_IMETHOD IsVisibleForPainting (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, PRBool aCheckVis, PRBool *aIsVisible)=0
 Determines whether a frame is visible for painting this takes into account whether it is painting a selection or printing.
virtual PRBool IsEmpty ()=0
 Determine whether the frame is logically empty, which is roughly whether the layout would be the same whether or not the frame is present.
virtual PRBool IsSelfEmpty ()=0
 Determine whether the frame is logically empty, assuming that all its children are empty.
PRBool IsGeneratedContentFrame ()
 IsGeneratedContentFrame returns whether a frame corresponds to generated content.
PRBool IsPseudoFrame (nsIContent *aParentContent)
 IsPseudoFrame returns whether a frame is a pseudo frame (eg an anonymous table-row frame created for a CSS table-cell without an enclosing table-row.
 NS_HIDDEN_ (void *) GetProperty(nsIAtom *aPropertyName
virtual NS_HIDDEN_ (void *) GetPropertyExternal(nsIAtom *aPropertyName
 NS_HIDDEN_ (nsresult) SetProperty(nsIAtom *aPropertyName
 NS_HIDDEN_ (nsresult) DeleteProperty(nsIAtom *aPropertyName) const
 NS_HIDDEN_ (void *) UnsetProperty(nsIAtom *aPropertyName
nsRectGetOverflowAreaProperty (PRBool aCreateIfNecessary=PR_FALSE)
 Create or retrieve the previously stored overflow area, if the frame does not overflow and no creation is required return nsnull.
virtual PRBool SupportsVisibilityHidden ()
 Return PR_TRUE if and only if this frame obeys visibility:hidden.
virtual PRBool IsFocusable (PRInt32 *aTabIndex=nsnull, PRBool aWithMouse=PR_FALSE)
 Check if this frame is focusable and in the current tab order.
PRBool IsBoxFrame () const
PRBool IsBoxWrapped () const
NS_IMETHOD GetPrefSize (nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)=0
NS_IMETHOD GetMinSize (nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)=0
NS_IMETHOD GetMaxSize (nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)=0
NS_IMETHOD GetFlex (nsBoxLayoutState &aBoxLayoutState, nscoord &aFlex)=0
 GetOrdinal (nsBoxLayoutState &aBoxLayoutState, PRUint32 &aOrdinal)
virtual nsSize GetMinSizeForScrollArea (nsBoxLayoutState &aBoxLayoutState)=0
 This returns the minimum size for the scroll area if this frame is being scrolled.
NS_IMETHOD GetAscent (nsBoxLayoutState &aBoxLayoutState, nscoord &aAscent)=0
NS_IMETHOD IsCollapsed (nsBoxLayoutState &aBoxLayoutState, PRBool &aCollapsed)=0
NS_IMETHOD SetBounds (nsBoxLayoutState &aBoxLayoutState, const nsRect &aRect, PRBool aRemoveOverflowArea=PR_FALSE)=0
 NS_HIDDEN_ (nsresult) Layout(nsBoxLayoutState &aBoxLayoutState)
nsresult IsDirty (PRBool &aIsDirty)
nsresult HasDirtyChildren (PRBool &aIsDirty)
NS_IMETHOD MarkDirty (nsBoxLayoutState &aState)=0
 NS_HIDDEN_ (nsresult) MarkDirtyChildren(nsBoxLayoutState &aState)
nsresult GetChildBox (nsIBox **aBox)
nsresult GetNextBox (nsIBox **aBox)
 NS_HIDDEN_ (nsresult) GetParentBox(nsIBox **aParent)
NS_IMETHOD GetBorderAndPadding (nsMargin &aBorderAndPadding)
NS_IMETHOD GetBorder (nsMargin &aBorder)=0
NS_IMETHOD GetPadding (nsMargin &aBorderAndPadding)=0
nsresult GetInset (nsMargin &aInset)
NS_IMETHOD GetMargin (nsMargin &aMargin)=0
NS_IMETHOD SetLayoutManager (nsIBoxLayout *aLayout)=0
NS_IMETHOD GetLayoutManager (nsIBoxLayout **aLayout)=0
 NS_HIDDEN_ (nsresult) GetContentRect(nsRect &aContentRect)
 NS_HIDDEN_ (nsresult) GetClientRect(nsRect &aContentRect)
NS_IMETHOD GetVAlign (Valignment &aAlign)=0
NS_IMETHOD GetHAlign (Halignment &aAlign)=0
PRBool IsHorizontal () const
nsresult GetOrientation (PRBool &aIsHorizontal)
 XXX to be removed.
PRBool IsNormalDirection () const
nsresult GetDirection (PRBool &aIsNormal)
 XXX to be removed.
 NS_HIDDEN_ (nsresult) Redraw(nsBoxLayoutState &aState
NS_IMETHOD NeedsRecalc ()=0
NS_IMETHOD RelayoutDirtyChild (nsBoxLayoutState &aState, nsIBox *aChild)=0
NS_IMETHOD RelayoutChildAtOrdinal (nsBoxLayoutState &aState, nsIBox *aChild)=0
NS_IMETHOD GetMouseThrough (PRBool &aMouseThrough)=0
NS_IMETHOD MarkChildrenStyleChange ()=0
NS_IMETHOD MarkStyleChange (nsBoxLayoutState &aState)=0
NS_IMETHOD SetIncludeOverflow (PRBool aInclude)=0
NS_IMETHOD GetOverflow (nsSize &aOverflow)=0
NS_IMETHOD ChildrenMustHaveWidgets (PRBool &aMust) const =0
NS_IMETHOD GetIndexOf (nsIBox *aChild, PRInt32 *aIndex)=0
nsPeekOffsetStruct GetExtremeCaretPosition (PRBool aStart)
 gets the first or last possible caret position within the frame

Static Public Member Functions

static PRBool AddCSSPrefSize (nsBoxLayoutState &aState, nsIBox *aBox, nsSize &aSize)
static PRBool AddCSSMinSize (nsBoxLayoutState &aState, nsIBox *aBox, nsSize &aSize)
static PRBool AddCSSMaxSize (nsBoxLayoutState &aState, nsIBox *aBox, nsSize &aSize)
static PRBool AddCSSFlex (nsBoxLayoutState &aState, nsIBox *aBox, nscoord &aFlex)
static PRBool AddCSSCollapsed (nsBoxLayoutState &aState, nsIBox *aBox, PRBool &aCollapsed)
static PRBool AddCSSOrdinal (nsBoxLayoutState &aState, nsIBox *aBox, PRUint32 &aOrdinal)

Public Attributes

nsresultaStatus = nsnull) const
virtual nsresult *aStatus const
voidaValue
void NSPropertyDtorFunc aDestructor = nsnull
void NSPropertyDtorFunc voidaDtorData = nsnull)
const nsRectaRect = nsnull
const nsRect PRBool aImmediate = PR_FALSE)

Protected Attributes

nsRect mRect
nsIContentmContent
nsStyleContextmStyleContext
nsIFramemParent
nsIFramemNextSibling
nsFrameState mState

Private Member Functions

 NS_IMETHOD_ (nsrefcnt) AddRef(void)=0
 NS_IMETHOD_ (nsrefcnt) Release(void)=0

Detailed Description

A frame in the layout model.

This interface is supported by all frame objects.

Frames can have multiple child lists: the default unnamed child list (referred to as the principal child list, and additional named child lists. There is an ordering of frames within a child list, but there is no order defined between frames in different child lists of the same parent frame.

Frames are NOT reference counted. Use the Destroy() member function to destroy a frame. The lifetime of the frame hierarchy is bounded by the lifetime of the presentation shell which owns the frames.

nsIFrame is a private Gecko interface. If you are not Gecko then you should not use it. If you're not in layout, then you won't be able to link to many of the functions defined here. Too bad.

If you're not in layout but you must call functions in here, at least restrict yourself to calling virtual methods, which won't hurt you as badly.

Definition at line 402 of file nsIFrame.h.


Class Documentation

struct nsIFrame::Cursor

This structure holds information about a cursor.

mContainer represents a loaded image that should be preferred. If it is not possible to use it, or if it is null, mCursor should be used.

Definition at line 767 of file nsIFrame.h.

Collaboration diagram for nsIFrame::Cursor:
Class Members
nsCOMPtr< imgIContainer > mContainer
PRInt32 mCursor
PRBool mHaveHotspot
float mHotspotX
float mHotspotY

Member Enumeration Documentation

anonymous enum

Bit-flags to pass to IsFrameOfType()

Enumerator:
eMathML 
eSVG 
eSVGForeignObject 

Definition at line 1082 of file nsIFrame.h.

       {
    eMathML =           1 << 0,
    eSVG =              1 << 1,
    eSVGForeignObject = 1 << 2
  };
Enumerator:
hAlign_Left 
hAlign_Right 
hAlign_Center 

Definition at line 1382 of file nsIFrame.h.

Enumerator:
vAlign_Top 
vAlign_Middle 
vAlign_BaseLine 
vAlign_Bottom 

Definition at line 1388 of file nsIFrame.h.


Member Function Documentation

static PRBool nsIFrame::AddCSSCollapsed ( nsBoxLayoutState aState,
nsIBox *  aBox,
PRBool aCollapsed 
) [static]

Here is the caller graph for this function:

static PRBool nsIFrame::AddCSSFlex ( nsBoxLayoutState aState,
nsIBox *  aBox,
nscoord aFlex 
) [static]

Here is the caller graph for this function:

static PRBool nsIFrame::AddCSSMaxSize ( nsBoxLayoutState aState,
nsIBox *  aBox,
nsSize aSize 
) [static]

Here is the caller graph for this function:

static PRBool nsIFrame::AddCSSMinSize ( nsBoxLayoutState aState,
nsIBox *  aBox,
nsSize aSize 
) [static]

Here is the caller graph for this function:

static PRBool nsIFrame::AddCSSOrdinal ( nsBoxLayoutState aState,
nsIBox *  aBox,
PRUint32 aOrdinal 
) [static]

Here is the caller graph for this function:

static PRBool nsIFrame::AddCSSPrefSize ( nsBoxLayoutState aState,
nsIBox *  aBox,
nsSize aSize 
) [static]

Here is the caller graph for this function:

Update the current frame-state value for this frame.

Definition at line 823 of file nsIFrame.h.

{ mState |= aBits; }
NS_IMETHOD nsIFrame::AdjustFrameSize ( nscoord  aExtraSpace,
nscoord aUsedSpace 
) [pure virtual]

Implemented in nsTextFrame, and nsFrame.

virtual void nsIFrame::AdjustOffsetsForBidi ( PRInt32  aStart,
PRInt32  aEnd 
) [inline, virtual]

Reset the offsets when splitting frames during Bidi reordering.

Reimplemented in nsTextFrame.

Definition at line 573 of file nsIFrame.h.

{}

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::AppendFrames ( nsIAtom aListName,
nsIFrame aFrameList 
) [pure virtual]

This method is responsible for appending frames to the frame list.

The implementation should append the frames to the specified child list and then generate a reflow command.

Parameters:
aListNamethe name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aFrameListlist of child frames to append. Each of the frames has its NS_FRAME_IS_DIRTY bit set
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_UNEXPECTED if the frame is an atomic frame, NS_OK otherwise

Implemented in nsXULScrollFrame, nsTableFrame, nsHTMLScrollFrame, nsSVGOuterSVGFrame, nsFrame, nsBoxFrame, nsMenuFrame, nsSliderFrame, nsMathMLContainerFrame, nsTableRowGroupFrame, nsTableColGroupFrame, nsTableOuterFrame, nsHTMLButtonControlFrame, nsTableCellFrame, CanvasFrame, nsSVGTextFrame, nsSVGTSpanFrame, nsFieldSetFrame, nsRootBoxFrame, nsSVGInnerSVGFrame, ViewportFrame, nsTableRowFrame, nsSVGDefsFrame, nsSVGGenericContainerFrame, and nsColumnSetFrame.

Here is the caller graph for this function:

Returns true if and only if all views, from |GetClosestView| up to the top of the view hierarchy are visible.

Definition at line 2546 of file nsFrame.cpp.

{
  for (nsIView* view = GetClosestView(); view; view = view->GetParent()) {
    if (view->GetVisibility() == nsViewVisibility_kHide) {
      return PR_FALSE;
    }
  }
  return PR_TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::AttributeChanged ( nsIContent aChild,
PRInt32  aNameSpaceID,
nsIAtom aAttribute,
PRInt32  aModType 
) [pure virtual]

This call is invoked when the value of a content objects's attribute is changed.

The first frame that maps that content is asked to deal with the change by doing whatever is appropriate.

Parameters:
aChildthe piece of content whose attribute changed
aNameSpaceIDthe namespace of the attribute
aAttributethe atom name of the attribute
aModTypeWhether or not the attribute was added, changed, or removed. The constants are defined in nsIDOMMutationEvent.h.

Implemented in nsMenuFrame, nsFrame, nsSVGOuterSVGFrame, nsMathMLContainerFrame, nsTextControlFrame, nsSliderFrame, nsMenuPopupFrame, nsBoxFrame, nsSubDocumentFrame, nsSVGTextFrame, nsMathMLmfracFrame, nsSVGInnerSVGFrame, nsGfxButtonControlFrame, nsTableCellFrame, nsLeafBoxFrame, nsSVGGenericContainerFrame, nsMathMLmoFrame, nsImageBoxFrame, nsSVGPathGeometryFrame, nsMathMLTokenFrame, nsMathMLmfencedFrame, nsMathMLmoverFrame, nsMathMLmunderFrame, nsMathMLmunderoverFrame, nsListBoxBodyFrame, nsNativeScrollbarFrame, nsResizerFrame, nsTextBoxFrame, nsScrollbarFrame, nsSplitterFrame, nsTreeColFrame, nsProgressMeterFrame, nsDeckFrame, and nsMathMLmstyleFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::CalcBorderPadding ( nsMargin aBorderPadding) const [pure virtual]

Implemented in nsFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::CanContinueTextRun ( PRBool aContinueTextRun) const [pure virtual]

Helper method used by block reflow to identify runs of text so that proper word-breaking can be done.

Parameters:
aContinueTextRunA frame should set aContinueTextRun to PR_TRUE if we can continue a "text run" through the frame. A text run is text that should be treated contiguously for line and word breaking.
Returns:
The return value is irrelevant.

Implemented in nsTextFrame, nsFrame, and nsHTMLCanvasFrame.

Here is the caller graph for this function:

virtual PRBool nsIFrame::CanPaintBackground ( ) [inline, virtual]

Does the frame paint its background? If not, then all or part of it will be painted by ancestors.

Reimplemented in nsSVGOuterSVGFrame, nsTableColGroupFrame, nsTableRowGroupFrame, nsTableOuterFrame, nsTableColFrame, nsTableRowFrame, ViewportFrame, and nsFieldSetFrame.

Definition at line 715 of file nsIFrame.h.

{ return PR_TRUE; }

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::CaptureMouse ( nsPresContext aPresContext,
PRBool  aGrabMouseEvents 
) [pure virtual]

EndSelection related calls.

Call to turn on/off mouseCapture at the view level. Needed by the ESM so it must be in the public interface.

Parameters:
aPresContextpresContext associated with the frame
aGrabMouseEventsPR_TRUE to enable capture, PR_FALSE to disable

Implemented in nsFrame.

NS_IMETHOD nsIFrame::CharacterDataChanged ( nsPresContext aPresContext,
nsIContent aChild,
PRBool  aAppend 
) [pure virtual]

This call is invoked when content is changed in the content tree.

The first frame that maps that content is asked to deal with the change by generating an incremental reflow command.

Parameters:
aPresContextthe presentation context
aContentthe content node that was changed
aAppenda hint to the frame about the change

Implemented in nsTextFrame, nsFrame, nsSVGGlyphFrame, and nsLeafBoxFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::CheckVisibility ( nsPresContext aContext,
PRInt32  aStartIndex,
PRInt32  aEndIndex,
PRBool  aRecurse,
PRBool aFinished,
PRBool _retval 
) [pure virtual]

called to see if the children of the frame are visible from indexstart to index end.

this does not change any state. returns PR_TRUE only if the indexes are valid and any of the children are visible. for textframes this index is the character index. if aStart = aEnd result will be PR_FALSE

Parameters:
aStartstart index of first child from 0-N (number of children)
aEndend index of last child from 0-N
aRecurseshould this frame talk to siblings to get to the contents other children?
aFinisheddid this frame have the aEndIndex? or is there more work to do
_retvalreturn value true or false. false = range is not rendered.

Implemented in nsTextFrame, and nsFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::ChildrenMustHaveWidgets ( PRBool aMust) const [pure virtual]

Implemented in nsBox, and nsDeckFrame.

Here is the caller graph for this function:

This frame needs a view with a widget (e.g.

because it's fixed positioned), so we call this to create the widget. If widgets for this frame type need to be of a certain type or require special initialization, that can be done here.

Definition at line 942 of file nsFrame.cpp.

{
  return aView->CreateWidget(kWidgetCID);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::Destroy ( nsPresContext aPresContext) [pure virtual]
NS_IMETHOD nsIFrame::DidReflow ( nsPresContext aPresContext,
const nsHTMLReflowState aReflowState,
nsDidReflowStatus  aStatus 
) [pure virtual]

Post-reflow hook.

After a frame is reflowed this method will be called informing the frame that this reflow process is complete, and telling the frame the status returned by the Reflow member function.

This call may be invoked many times, while NS_FRAME_IN_REFLOW is set, before it is finally called once with a NS_FRAME_REFLOW_COMPLETE value. When called with a NS_FRAME_REFLOW_COMPLETE value the NS_FRAME_IN_REFLOW bit in the frame state will be cleared.

XXX This doesn't make sense. If the frame is reflowed but not complete, then the status should be NS_FRAME_NOT_COMPLETE and not NS_FRAME_COMPLETE XXX Don't we want the semantics to dictate that we only call this once for a given reflow?

Implemented in nsFrame, nsSVGOuterSVGFrame, nsBoxFrame, nsMathMLContainerFrame, nsFormControlFrame, nsListControlFrame, and nsLeafBoxFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::DidSetStyleContext ( nsPresContext aPresContext) [pure virtual]

Implemented in nsFrame, nsSVGGradientFrame, nsSVGTextFrame, nsSVGGlyphFrame, nsSVGStopFrame, nsImageBoxFrame, nsSVGPathGeometryFrame, and nsBulletFrame.

Here is the caller graph for this function:

void nsIFrame::FinishAndStoreOverflow ( nsRect aOverflowArea,
nsSize  aNewSize 
)

Set/unset the NS_FRAME_OUTSIDE_CHILDREN flag and store the overflow area as a frame property in the frame manager so that it can be retrieved later without reflowing the frame.

Definition at line 4408 of file nsFrame.cpp.

{
  // This is now called FinishAndStoreOverflow() instead of 
  // StoreOverflow() because frame-generic ways of adding overflow
  // can happen here, e.g. CSS2 outline.
  // If we find more things other than outline that need to be added,
  // we should think about starting a new method like GetAdditionalOverflow()
  NS_ASSERTION(aNewSize.width == 0 || aNewSize.height == 0 ||
               aOverflowArea->Contains(nsRect(nsPoint(0, 0), aNewSize)),
               "Computed overflow area must contain frame bounds");

  PRBool geometricOverflow =
    aOverflowArea->x < 0 || aOverflowArea->y < 0 ||
    aOverflowArea->XMost() > aNewSize.width || aOverflowArea->YMost() > aNewSize.height;
  // Clear geometric overflow area if we clip our children
  NS_ASSERTION((GetStyleDisplay()->mOverflowY == NS_STYLE_OVERFLOW_CLIP) ==
               (GetStyleDisplay()->mOverflowX == NS_STYLE_OVERFLOW_CLIP),
               "If one overflow is clip, the other should be too");
  if (geometricOverflow &&
      GetStyleDisplay()->mOverflowX == NS_STYLE_OVERFLOW_CLIP) {
    *aOverflowArea = nsRect(nsPoint(0, 0), aNewSize);
    geometricOverflow = PR_FALSE;
  }

  PRBool hasOutline;
  nsRect outlineRect(ComputeOutlineRect(this, &hasOutline, *aOverflowArea));

  if (hasOutline || geometricOverflow) {
    // Throw out any overflow if we're -moz-hidden-unscrollable
    mState |= NS_FRAME_OUTSIDE_CHILDREN;
    nsRect* overflowArea = GetOverflowAreaProperty(PR_TRUE); 
    NS_ASSERTION(overflowArea, "should have created rect");
    *aOverflowArea = *overflowArea = outlineRect;
  } 
  else {
    if (mState & NS_FRAME_OUTSIDE_CHILDREN) {
      // remove the previously stored overflow area 
      DeleteProperty(nsLayoutAtoms::overflowAreaProperty);
    }
    mState &= ~NS_FRAME_OUTSIDE_CHILDREN;
  }   
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1156 of file nsIFrame.h.

                                                             {
    FinishAndStoreOverflow(&aMetrics->mOverflowArea, nsSize(aMetrics->width, aMetrics->height));
  }

Here is the call graph for this function:

virtual nsIAtom* nsIFrame::GetAdditionalChildListName ( PRInt32  aIndex) const [pure virtual]

Used to iterate the list of additional child list names.

Returns the atom name for the additional child list at the specified 0-based index, or a NULL pointer if there are no more named child lists.

Note that the list is only the additional named child lists and does not include the unnamed principal child list.

Implemented in nsTableFrame, nsFrame, nsMenuFrame, nsTableOuterFrame, ViewportFrame, and nsContainerFrame.

Here is the caller graph for this function:

virtual nsStyleContext* nsIFrame::GetAdditionalStyleContext ( PRInt32  aIndex) const [pure virtual]

These methods are to access any additional style contexts that the frame may be holding.

These are contexts that are children of the frame's primary context and are NOT used as style contexts for any child frames. These contexts also MUST NOT have any child contexts whatsoever. If you need to insert style contexts into the style tree, then you should create pseudo element frames to own them The indicies must be consecutive and implementations MUST return an NS_ERROR_INVALID_ARG if asked for an index that is out of range.

Implemented in nsFrame, nsHTMLButtonControlFrame, nsMathMLmfracFrame, nsGfxCheckboxControlFrame, nsMathMLmsqrtFrame, nsGfxRadioControlFrame, nsMathMLmoFrame, nsMathMLmrootFrame, and nsMathMLmfencedFrame.

Here is the caller graph for this function:

Find the closest ancestor (excluding |this| !) that has a view.

Definition at line 2374 of file nsFrame.cpp.

{
  for (nsIFrame* f = mParent; nsnull != f; f = f->GetParent()) {
    if (f->HasView()) {
      return f;
    }
  }
  return nsnull;
}

Here is the caller graph for this function:

Definition at line 2368 of file nsFrame.cpp.

{
  return GetAncestorWithView();
}

Here is the call graph for this function:

NS_IMETHOD nsIFrame::GetAscent ( nsBoxLayoutState aBoxLayoutState,
nscoord aAscent 
) [pure virtual]

Implemented in nsXULScrollFrame, nsFrame, nsBoxFrame, nsTextControlFrame, nsImageBoxFrame, nsBox, nsLeafBoxFrame, and nsTextBoxFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetBorder ( nsMargin aBorder) [pure virtual]

Implemented in nsBox.

Here is the caller graph for this function:

Reimplemented in nsGridRowLeafFrame, and nsGroupBoxFrame.

Definition at line 535 of file nsBox.cpp.

{
  aBorderAndPadding.SizeTo(0, 0, 0, 0);
  nsresult rv = GetBorder(aBorderAndPadding);
  if (NS_FAILED(rv))
    return rv;

  nsMargin padding;
  rv = GetPadding(padding);
  if (NS_FAILED(rv))
    return rv;

  aBorderAndPadding += padding;

  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsIFrame::GetChildBox ( nsIBox **  aBox) [inline]

Definition at line 1422 of file nsIFrame.h.

  {
    // box layout ends at box-wrapped frames, so don't allow these frames
    // to report child boxes.
    *aBox = IsBoxFrame() ? GetFirstChild(nsnull) : nsnull;
    return NS_OK;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetChildFrameContainingOffset ( PRInt32  inContentOffset,
PRBool  inHint,
PRInt32 outFrameContentOffset,
nsIFrame **  outChildFrame 
) [pure virtual]

Get the child frame of this frame which contains the given content offset.

outChildFrame may be this frame, or nsnull on return. outContentOffset returns the content offset relative to the start of the returned node. You can also pass a hint which tells the method to stick to the end of the first found frame or the beginning of the next in case the offset falls on a boundary.

Implemented in nsTextFrame, and nsFrame.

Here is the caller graph for this function:

nsIView * nsIFrame::GetClosestView ( nsPoint aOffset = nsnull) const

Find the closest view (on |this| or an ancestor).

If aOffset is non-null, it will be set to the offset of |this| from the returned view.

Definition at line 4339 of file nsFrame.cpp.

{
  nsPoint offset(0,0);
  for (const nsIFrame *f = this; f; f = f->GetParent()) {
    if (f->HasView()) {
      if (aOffset)
        *aOffset = offset;
      return f->GetView();
    }
    offset += f->GetPosition();
  }

  NS_NOTREACHED("No view on any parent?  How did that happen?");
  return nsnull;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsIContent* nsIFrame::GetContent ( ) const [inline]

Get the content object associated with this frame.

Does not add a reference.

Definition at line 547 of file nsIFrame.h.

{ return mContent; }
NS_IMETHOD nsIFrame::GetContentAndOffsetsFromPoint ( nsPresContext aCX,
const nsPoint aPoint,
nsIContent **  aNewContent,
PRInt32 aContentOffset,
PRInt32 aContentOffsetEnd,
PRBool aBeginFrameContent 
) [pure virtual]

Implemented in nsTextFrame, nsXULScrollFrame, nsFrame, nsHTMLScrollFrame, and BRFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetContentForEvent ( nsPresContext aPresContext,
nsEvent aEvent,
nsIContent **  aContent 
) [pure virtual]

Implemented in nsFrame, CanvasFrame, and nsHTMLCanvasFrame.

Here is the caller graph for this function:

virtual nsIFrame* nsIFrame::GetContentInsertionFrame ( ) [inline, virtual]

Get the frame that should be the parent for the frames of child elements.

Reimplemented in nsXULScrollFrame, nsHTMLScrollFrame, nsHTMLButtonControlFrame, nsTableOuterFrame, nsListControlFrame, nsTableCellFrame, nsColumnSetFrame, and nsXTFXULDisplayFrame.

Definition at line 552 of file nsIFrame.h.

{ return this; }

Here is the caller graph for this function:

Get the child content node whose frame should be used as the parent for the frames of child elements.

A frame can implement this method, instead of GetContentInsertionFrame, if its insertion point corresponds to a content node, and the frame for that node is not constructed immediately when the frame is initialized.

Reimplemented in nsXTFXULDisplayFrame.

Definition at line 561 of file nsIFrame.h.

{ return nsnull; }
NS_IMETHOD nsIFrame::GetCursor ( const nsPoint aPoint,
Cursor aCursor 
) [pure virtual]

Get the cursor for a given frame.

Implemented in nsTextFrame, nsFrame, nsHTMLFramesetBorderFrame, nsHTMLFramesetFrame, nsBoxFrame, nsTreeBodyFrame, and nsSplitterFrame.

Here is the caller graph for this function:

nsresult nsIFrame::GetDirection ( PRBool aIsNormal) [inline]

XXX to be removed.

Definition at line 1458 of file nsIFrame.h.

  { aIsNormal = IsNormalDirection(); return NS_OK; }

Here is the call graph for this function:

gets the first or last possible caret position within the frame

Parameters:
[in]aStarttrue for getting the first possible caret position false for getting the last possible caret position
Returns:
The caret position in an nsPeekOffsetStruct (the fields set are mResultContent and mContentOffset; the returned value is a 'best effort' in case errors are encountered rummaging through the frame.

Definition at line 3478 of file nsFrame.cpp.

{
  nsPeekOffsetStruct result;

  result.mResultContent = this->GetContent();
  result.mContentOffset = 0;

  nsIFrame *resultFrame = this;

  if (aStart)
    nsFrame::GetFirstLeaf(GetPresContext(), &resultFrame);
  else
    nsFrame::GetLastLeaf(GetPresContext(), &resultFrame);

  NS_ASSERTION(resultFrame,"result frame for carent positioning is Null!");

  if (!resultFrame)
    return result;

  // there should be some more validity checks here, or earlier in the code,
  // in case we get to to some 'dummy' frames at the end of the content
    
  nsIContent* content = resultFrame->GetContent();

  NS_ASSERTION(resultFrame,"result frame content for carent positioning is Null!");

  if (!content)
    return result;
  
  // special case: if this is not a textnode,
  // position the caret to the offset of its parent instead
  // (position the caret to non-text element may make the caret missing)

  if (!content->IsContentOfType(nsIContent::eTEXT)) {
    // special case in effect
    nsIContent* parent = content->GetParent();
    NS_ASSERTION(parent,"element has no parent!");
    if (parent) {
      result.mResultContent = parent;
      result.mContentOffset = parent->IndexOf(content);
      if (!aStart)
        result.mContentOffset++; // go to end of this frame
      return result;
    }
  }

  result.mResultContent = content;

  PRInt32 start, end;
  nsresult rv;
  rv = resultFrame->GetOffsets(start,end);
  if (NS_SUCCEEDED(rv)) {
    result.mContentOffset = aStart ? start : end;
  }

  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual nsIFrame* nsIFrame::GetFirstChild ( nsIAtom aListName) const [pure virtual]

Get the first child frame from the specified child list.

Parameters:
aListNamethe name of the child list. A NULL pointer for the atom name means the unnamed principal child list
Returns:
the child frame, or NULL if there is no such child
See also:
#GetAdditionalListName()

Implemented in nsTableFrame, nsFrame, nsMenuFrame, nsTableOuterFrame, ViewportFrame, and nsContainerFrame.

virtual nsIFrame* nsIFrame::GetFirstInFlow ( ) const [inline, virtual]

Return the first frame in our current flow.

Reimplemented in nsContinuingTextFrame, and nsSplittableFrame.

Definition at line 872 of file nsIFrame.h.

                                           {
    return NS_CONST_CAST(nsIFrame*, this);
  }

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetFlex ( nsBoxLayoutState aBoxLayoutState,
nscoord aFlex 
) [pure virtual]
NS_IMETHOD nsIFrame::GetFrameForPoint ( const nsPoint aPoint,
nsFramePaintLayer  aWhichLayer,
nsIFrame **  aFrame 
) [pure virtual]

Get the frame that should receive events for a given point in the coordinate space of this frame's parent, if the frame is painted in the given paint layer.

A frame should return itself if it should recieve the events. A successful return value indicates that a point was found.

Implemented in nsTableFrame, nsSVGOuterSVGFrame, nsFrame, nsSliderFrame, nsMenuPopupFrame, nsTableColGroupFrame, nsTableRowGroupFrame, nsHTMLFramesetBorderFrame, nsMenuFrame, nsHTMLFramesetFrame, nsTableOuterFrame, nsTableCellFrame, nsBoxFrame, nsTableColFrame, nsFormControlFrame, CanvasFrame, nsTableRowFrame, nsSplitterFrame, nsFieldSetFrame, nsRootBoxFrame, nsTextControlFrame, nsHTMLButtonControlFrame, nsLeafBoxFrame, nsStackFrame, nsMathMLmactionFrame, ViewportFrame, nsContainerFrame, nsDeckFrame, nsColumnSetFrame, nsTreeColFrame, nsListItemFrame, nsTitleBarFrame, and nsButtonBoxFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetHAlign ( Halignment aAlign) [pure virtual]

Implemented in nsBoxFrame, and nsBox.

NS_IMETHOD nsIFrame::GetIndexOf ( nsIBox *  aChild,
PRInt32 aIndex 
) [pure virtual]

Implemented in nsBox, and nsBoxFrame.

nsresult nsIFrame::GetInset ( nsMargin aInset) [inline]

Definition at line 1443 of file nsIFrame.h.

{ aInset.SizeTo(0, 0, 0, 0); return NS_OK; }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual nsIFrame* nsIFrame::GetLastInFlow ( ) const [inline, virtual]

Return the last frame in our current flow.

Reimplemented in nsTextFrame, and nsSplittableFrame.

Definition at line 879 of file nsIFrame.h.

                                          {
    return NS_CONST_CAST(nsIFrame*, this);
  }

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetLayoutManager ( nsIBoxLayout **  aLayout) [pure virtual]

Implemented in nsBoxFrame, and nsBox.

NS_IMETHOD nsIFrame::GetMargin ( nsMargin aMargin) [pure virtual]

Implemented in nsBox.

NS_IMETHOD nsIFrame::GetMaxSize ( nsBoxLayoutState aBoxLayoutState,
nsSize aSize 
) [pure virtual]

Implemented in nsXULScrollFrame, nsFrame, nsSliderFrame, nsBoxFrame, nsTextControlFrame, nsBox, and nsLeafBoxFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetMinSize ( nsBoxLayoutState aBoxLayoutState,
nsSize aSize 
) [pure virtual]
virtual nsSize nsIFrame::GetMinSizeForScrollArea ( nsBoxLayoutState aBoxLayoutState) [pure virtual]

This returns the minimum size for the scroll area if this frame is being scrolled.

Usually it's (0,0).

Implemented in nsListBoxBodyFrame, and nsBox.

Here is the caller graph for this function:

virtual nsIView* nsIFrame::GetMouseCapturer ( ) const [inline, virtual]

Does this frame want to capture the mouse when the user clicks in it or its children? If so, return the view which should be targeted for mouse capture.

The view need not be this frame's view, it could be the view on a child.

Reimplemented in nsXULScrollFrame, nsHTMLScrollFrame, nsSliderFrame, and nsSplitterFrame.

Definition at line 1125 of file nsIFrame.h.

{ return nsnull; }

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetMouseThrough ( PRBool aMouseThrough) [pure virtual]

Implemented in nsBoxFrame, nsLeafBoxFrame, nsBox, nsTitleBarFrame, and nsButtonBoxFrame.

Here is the caller graph for this function:

nsresult nsIFrame::GetNextBox ( nsIBox **  aBox) [inline]

Definition at line 1429 of file nsIFrame.h.

  {
    *aBox = (mParent && mParent->IsBoxFrame()) ? mNextSibling : nsnull;
    return NS_OK;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual nsIFrame* nsIFrame::GetNextInFlow ( ) const [pure virtual]

Implemented in nsTextFrame, nsFrame, and nsSplittableFrame.

nsIFrame* nsIFrame::GetNextSibling ( ) const [inline]

Child frames are linked together in a singly-linked list.

Definition at line 694 of file nsIFrame.h.

{ return mNextSibling; }
NS_IMETHOD nsIFrame::GetOffsetFromView ( nsPoint aOffset,
nsIView **  aView 
) const [pure virtual]

Returns the offset from this frame to the closest geometric parent that has a view.

Also returns the containing view or null in case of error

Implemented in nsFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetOffsets ( PRInt32 start,
PRInt32 end 
) const [pure virtual]

Get the offsets of the frame.

most will be 0,0

Implemented in nsTextFrame, and nsFrame.

Here is the caller graph for this function:

Get the offset between the coordinate systems of |this| and aOther.

Adding the return value to a point in the coordinate system of |this| will transform the point to the coordinate system of aOther.

aOther must be non-null.

This function is fastest when aOther is an ancestor of |this|.

NOTE: this actually returns the offset from aOther to |this|, but that offset is added to transform coordinates from |this| to aOther.

Definition at line 2390 of file nsFrame.cpp.

{
  NS_PRECONDITION(aOther,
                  "Must have frame for destination coordinate system!");
  // Note that if we hit a view while walking up the frame tree we need to stop
  // and switch to traversing the view tree so that we will deal with scroll
  // views properly.
  nsPoint offset(0, 0);
  const nsIFrame* f;
  for (f = this; !f->HasView() && f != aOther; f = f->GetParent()) {
    offset += f->GetPosition();
  }
  
  if (f != aOther) {
    // We found a view.  Switch to the view tree
    nsPoint toViewOffset(0, 0);
    nsIView* otherView = aOther->GetClosestView(&toViewOffset);
    offset += f->GetView()->GetOffsetTo(otherView) - toViewOffset;
  }
  
  return offset;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsPoint nsIFrame::GetOffsetToExternal ( const nsIFrame aOther) const [virtual]

Definition at line 2385 of file nsFrame.cpp.

{
  return GetOffsetTo(aOther);
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsIFrame::GetOrdinal ( nsBoxLayoutState aBoxLayoutState,
PRUint32 aOrdinal 
)

Definition at line 762 of file nsBox.cpp.

{
  aOrdinal = DEFAULT_ORDINAL_GROUP;
  nsIBox::AddCSSOrdinal(aState, this, aOrdinal);

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsIFrame::GetOrientation ( PRBool aIsHorizontal) [inline]

XXX to be removed.

Definition at line 1454 of file nsIFrame.h.

  { aIsHorizontal = IsHorizontal(); return NS_OK; }

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetOriginToViewOffset ( nsPoint aOffset,
nsIView **  aView 
) const [pure virtual]

Returns the offset from this frame's upper left corner to the upper left corner of the view returned by a call to GetView().

aOffset will contain the offset to the view or (0,0) if the frame has no view. aView will contain a pointer to the view returned by GetView(). aView is optional, that is, you may pass null if you are not interested in getting a pointer to the view.

Implemented in nsFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetOverflow ( nsSize aOverflow) [pure virtual]

Implemented in nsFrame.

Create or retrieve the previously stored overflow area, if the frame does not overflow and no creation is required return nsnull.

Parameters:
aPresContextPresContext
aCreateIfNecessarycreate a new nsRect for the overflow area
Returns:
pointer to the overflow area rectangle

Definition at line 4383 of file nsFrame.cpp.

{
  if (!((GetStateBits() & NS_FRAME_OUTSIDE_CHILDREN) || aCreateIfNecessary)) {
    return nsnull;
  }

  nsPropertyTable *propTable = GetPresContext()->PropertyTable();
  void *value = propTable->GetProperty(this,
                                       nsLayoutAtoms::overflowAreaProperty);

  if (value) {
    return (nsRect*)value;  // the property already exists
  } else if (aCreateIfNecessary) {
    // The property isn't set yet, so allocate a new rect, set the property,
    // and return the newly allocated rect
    nsRect*  overflow = new nsRect(0, 0, 0, 0);
    propTable->SetProperty(this, nsLayoutAtoms::overflowAreaProperty,
                           overflow, DestroyRectFunc, nsnull);
    return overflow;
  }

  return nsnull;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Computes a rect that includes this frame, all its descendant frames, this frame's outline (if any), and all descendant frames' outlines (if any).

This is the union of everything that might be painted by this frame subtree.

Returns:
the rect relative to this frame's origin

Definition at line 2635 of file nsFrame.cpp.

{
  // Note that in some cases the overflow area might not have been
  // updated (yet) to reflect any outline set on the frame or the area
  // of child frames. That's OK because any reflow that updates these
  // areas will invalidate the appropriate area, so any (mis)uses of
  // this method will be fixed up.
  nsRect* storedOA = NS_CONST_CAST(nsIFrame*, this)
    ->GetOverflowAreaProperty(PR_FALSE);
  if (storedOA) {
    return *storedOA;
  } else {
    return nsRect(nsPoint(0, 0), GetSize());
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetPadding ( nsMargin aBorderAndPadding) [pure virtual]

Implemented in nsXULScrollFrame, and nsBox.

Here is the caller graph for this function:

nsIFrame* nsIFrame::GetParent ( ) const [inline]

Accessor functions for geometric parent.

Definition at line 653 of file nsIFrame.h.

{ return mParent; }
NS_IMETHOD nsIFrame::GetParentStyleContextFrame ( nsPresContext aPresContext,
nsIFrame **  aProviderFrame,
PRBool aIsChild 
) [pure virtual]

Called to retrieve this frame's accessible.

If this frame implements Accessibility return a valid accessible If not return NS_ERROR_NOT_IMPLEMENTED. Note: nsAccessible must be refcountable. Do not implement directly on your frame Use a mediatior of some kind. Get the frame whose style context should be the parent of this frame's style context (i.e., provide the parent style context). This frame must either be an ancestor of this frame or a child. If this frame returns a child frame, then the child frame must be sure to return a grandparent or higher!

Parameters:
aPresContext,:PresContext
aProviderFrame,:The frame whose style context should be the parent of this frame's style context. Null is permitted, and means that this frame's style context should be the root of the style context tree.
aIsChild,:True if |aProviderFrame| is set to a child of this frame; false if it is an ancestor or null.

Implemented in nsTableFrame, nsFrame, and nsTableOuterFrame.

Here is the caller graph for this function:

nsIView * nsIFrame::GetParentViewForChildFrame ( nsIFrame aFrame) const [virtual]

This view will be used to parent the views of any children.

This allows us to insert an anonymous inner view to parent some children.

Reimplemented in nsXULScrollFrame, and nsHTMLScrollFrame.

Definition at line 2317 of file nsFrame.cpp.

{
  return GetClosestView();
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetPointFromOffset ( nsPresContext inPresContext,
nsIRenderingContext inRendContext,
PRInt32  inOffset,
nsPoint outPoint 
) [pure virtual]

Get a point (in the frame's coordinate space) given an offset into the content.

This point should be on the baseline of text with the correct horizontal offset

Implemented in nsTextFrame, and nsFrame.

Here is the caller graph for this function:

nsPoint nsIFrame::GetPosition ( ) const [inline]

Definition at line 665 of file nsIFrame.h.

{ return nsPoint(mRect.x, mRect.y); }
NS_IMETHOD nsIFrame::GetPrefSize ( nsBoxLayoutState aBoxLayoutState,
nsSize aSize 
) [pure virtual]

Definition at line 407 of file nsIFrame.h.

Here is the call graph for this function:

virtual nsIFrame* nsIFrame::GetPrevInFlow ( ) const [pure virtual]

Flow member functions.

Implemented in nsContinuingTextFrame, nsFrame, and nsSplittableFrame.

Here is the caller graph for this function:

nsRect nsIFrame::GetRect ( ) const [inline]

Bounding rect of the frame.

The values are in twips, and the origin is relative to the upper-left of the geometric parent. The size includes the content area, borders, and padding.

Note: moving or sizing the frame does not affect the view's size or position.

Definition at line 664 of file nsIFrame.h.

{ return mRect; }

Get the screen rect of the frame.

Returns:
the pixel rect of the frame in screen coordinates.

Definition at line 2419 of file nsFrame.cpp.

{
  nsIntRect retval(0,0,0,0);
  nsPoint toViewOffset(0,0);
  nsIView* view = GetClosestView(&toViewOffset);

  if (view) {
    nsPoint toWidgetOffset(0,0);
    nsIWidget* widget = view->GetNearestWidget(&toWidgetOffset);

    if (widget) {
      nsRect ourRect = mRect;
      ourRect.MoveTo(toViewOffset + toWidgetOffset);
      ourRect.ScaleRoundOut(GetPresContext()->TwipsToPixels());
      // Is it safe to pass the same rect for both args of WidgetToScreen?
      // It's not clear, so let's not...
      nsIntRect ourPxRect(ourRect.x, ourRect.y, ourRect.width, ourRect.height);
      
      widget->WidgetToScreen(ourPxRect, retval);
    }
  }

  return retval;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2414 of file nsFrame.cpp.

{
  return GetScreenRect();
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetSelected ( PRBool aSelected) const [pure virtual]

Implemented in nsFrame, and nsSVGGlyphFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::GetSelectionController ( nsPresContext aPresContext,
nsISelectionController **  aSelCon 
) [pure virtual]

Called to retrieve the SelectionController associated with the frame.

Parameters:
aSelConwill contain the selection controller associated with the frame.

Implemented in nsFrame.

Here is the caller graph for this function:

nsSize nsIFrame::GetSize ( ) const [inline]

Definition at line 666 of file nsIFrame.h.

{ return nsSize(mRect.width, mRect.height); }

Here is the call graph for this function:

Get the current frame-state value for this frame.

aResult is filled in with the state bits.

Definition at line 818 of file nsIFrame.h.

{ return mState; }

Get the style context associated with this frame.

Definition at line 579 of file nsIFrame.h.

{ return mStyleContext; }

Definition at line 606 of file nsIFrame.h.

                                                                {
#ifdef _IMPL_NS_LAYOUT
    NS_ASSERTION(mStyleContext, "No style context found!");
    return mStyleContext->GetStyleData(aSID);
#else
    return GetStyleDataExternal(aSID);
#endif
  }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual const nsStyleStruct* nsIFrame::GetStyleDataExternal ( nsStyleStructID  aSID) const [pure virtual]

Get the style data associated with this frame.

This returns a const style struct pointer that should never be modified. See |nsIStyleContext::GetStyleData| for more information.

The use of the typesafe functions below is preferred to direct use of this function.

Implemented in nsFrame.

Here is the caller graph for this function:

virtual nsIAtom* nsIFrame::GetType ( ) const [pure virtual]
NS_IMETHOD nsIFrame::GetVAlign ( Valignment aAlign) [pure virtual]

Implemented in nsBox.

Definition at line 2324 of file nsFrame.cpp.

{
  // Check the frame state bit and see if the frame has a view
  if (!(GetStateBits() & NS_FRAME_HAS_VIEW))
    return nsnull;

  // Check for a property on the frame
  nsresult rv;
  void *value = GetProperty(nsLayoutAtoms::viewProperty, &rv);

  NS_ENSURE_SUCCESS(rv, nsnull);
  NS_ASSERTION(value, "frame state bit was set but frame has no view");
  return NS_STATIC_CAST(nsIView*, value);
}

Here is the call graph for this function:

nsIView * nsIFrame::GetViewExternal ( ) const [virtual]

Definition at line 2340 of file nsFrame.cpp.

{
  return GetView();
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsIWidget * nsIFrame::GetWindow ( ) const [virtual]

Returns the window that contains this frame.

If this frame has a view and the view has a window, then this frames window is returned, otherwise this frame's geometric parent is checked recursively upwards. XXX virtual because gfx callers use it! (themes)

Definition at line 2557 of file nsFrame.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::HandleEvent ( nsPresContext aPresContext,
nsGUIEvent aEvent,
nsEventStatus aEventStatus 
) [pure virtual]

Event handling of GUI events.

Parameters:
aEventevent structure describing the type of event and rge widget where the event originated The |point| member of this is in the coordinate system of the view returned by GetOffsetFromView.
aEventStatusa return value indicating whether the event was handled and whether default processing should be done

XXX From a frame's perspective it's unclear what the effect of the event status is. Does it cause the event to continue propagating through the frame hierarchy or is it just returned to the widgets?

See also:
nsGUIEvent
nsEventStatus

Implemented in nsFrame, nsSliderFrame, nsMenuPopupFrame, nsMenuFrame, nsHTMLFramesetBorderFrame, nsHTMLFramesetFrame, nsTreeBodyFrame, CanvasFrame, nsFormControlFrame, nsSplitterFrame, nsTextControlFrame, nsRootBoxFrame, nsListControlFrame, nsHTMLButtonControlFrame, nsGfxRadioControlFrame, nsAutoRepeatBoxFrame, nsGfxButtonControlFrame, nsResizerFrame, nsScrollbarButtonFrame, nsTitleBarFrame, and nsButtonBoxFrame.

Here is the caller graph for this function:

nsresult nsIFrame::HasDirtyChildren ( PRBool aIsDirty) [inline]

Definition at line 1419 of file nsIFrame.h.

{ aIsDirty = (mState & NS_FRAME_HAS_DIRTY_CHILDREN) != 0; return NS_OK; }

Here is the caller graph for this function:

PRBool nsIFrame::HasView ( ) const [inline]

Accessor functions to get/set the associated view object.

GetView returns non-null if and only if |HasView| returns true.

Definition at line 990 of file nsIFrame.h.

{ return mState & NS_FRAME_HAS_VIEW; }

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::Init ( nsPresContext aPresContext,
nsIContent aContent,
nsIFrame aParent,
nsStyleContext aContext,
nsIFrame aPrevInFlow 
) [pure virtual]

Called to initialize the frame.

This is called immediately after creating the frame.

If the frame is a continuing frame, then aPrevInFlow indicates the previous frame (the frame that was split). You should connect the continuing frame to its prev-in-flow, e.g. by using the AppendToFlow() function

If you want a view associated with your frame, you should create the view now.

Parameters:
aContentthe content object associated with the frame
aGeometricParentthe geometric parent frame
aContentParentthe content parent frame
aContextthe style context associated with the frame
aPrevInFlowthe prev-in-flow frame
See also:
#AppendToFlow()

Implemented in nsContinuingTextFrame, nsTableFrame, nsSVGOuterSVGFrame, nsSliderFrame, nsFrame, nsMenuPopupFrame, nsBoxFrame, nsMathMLContainerFrame, nsTableRowGroupFrame, nsSubDocumentFrame, nsHTMLFramesetFrame, nsMenuFrame, nsTableColFrame, nsTreeBodyFrame, nsSVGTextFrame, nsMathMLmfracFrame, nsSVGTSpanFrame, nsMenuBarFrame, nsListControlFrame, nsHTMLButtonControlFrame, nsSVGGlyphFrame, CanvasFrame, nsSVGInnerSVGFrame, nsTableOuterFrame, nsScrollbarFrame, nsPopupSetFrame, nsMathMLmsqrtFrame, nsTableCellFrame, nsMathMLmtableOuterFrame, nsSVGDefsFrame, nsSVGGenericContainerFrame, nsSVGStopFrame, nsImageBoxFrame, nsLeafBoxFrame, nsSVGPathGeometryFrame, nsDeckFrame, nsTableColGroupFrame, nsListBoxBodyFrame, nsTableRowFrame, nsNativeScrollbarFrame, nsSplitterFrame, nsResizerFrame, nsMathMLmactionFrame, nsMathMLmrootFrame, nsTextBoxFrame, nsContainerFrame, nsMathMLTokenFrame, nsTreeColFrame, nsTitleBarFrame, and nsSplittableFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::InsertFrames ( nsIAtom aListName,
nsIFrame aPrevFrame,
nsIFrame aFrameList 
) [pure virtual]

This method is responsible for inserting frames into the frame list.

The implementation should insert the new frames into the specified child list and then generate a reflow command.

Parameters:
aListNamethe name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aPrevFramethe frame to insert frames after
aFrameListlist of child frames to insert after aPrevFrame. Each of the frames has its NS_FRAME_IS_DIRTY bit set
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_UNEXPECTED if the frame is an atomic frame, NS_OK otherwise

Implemented in nsXULScrollFrame, nsTableFrame, nsHTMLScrollFrame, nsSVGOuterSVGFrame, nsFrame, nsBoxFrame, nsMenuFrame, nsSliderFrame, nsMathMLContainerFrame, nsTableRowGroupFrame, nsTableColGroupFrame, nsTableOuterFrame, nsHTMLButtonControlFrame, nsTableCellFrame, CanvasFrame, nsSVGTextFrame, nsSVGTSpanFrame, nsFieldSetFrame, nsRootBoxFrame, nsSVGInnerSVGFrame, ViewportFrame, nsTableRowFrame, nsSVGDefsFrame, nsSVGGenericContainerFrame, and nsColumnSetFrame.

Here is the caller graph for this function:

void nsIFrame::Invalidate ( const nsRect aDamageRect,
PRBool  aImmediate = PR_FALSE 
) const

Invalidate part of the frame by asking the view manager to repaint.

aDamageRect is allowed to extend outside the frame's bounds. We'll do the right thing. But it must be within the bounds of the view enclosing this frame. We deliberately don't have an Invalidate() method that defaults to the frame's bounds. We want all callers to think about what has changed in the frame and what area might need to be repainted.

Parameters:
aDamageRectis in the frame's local coordinate space

Definition at line 2575 of file nsFrame.cpp.

{
  if (aDamageRect.IsEmpty()) {
    return;
  }

  // Don't allow invalidates to do anything when
  // painting is suppressed.
  nsIPresShell *shell = GetPresContext()->GetPresShell();
  if (shell) {
    PRBool suppressed = PR_FALSE;
    shell->IsPaintingSuppressed(&suppressed);
    if (suppressed)
      return;
  }

  nsRect damageRect(aDamageRect);

  PRUint32 flags = aImmediate ? NS_VMREFRESH_IMMEDIATE : NS_VMREFRESH_NO_SYNC;
  if (HasView()) {
    nsIView* view = GetView();
    view->GetViewManager()->UpdateView(view, damageRect, flags);
  } else {
    nsRect    rect(damageRect);
    nsPoint   offset;
  
    nsIView *view;
    GetOffsetFromView(offset, &view);
    NS_ASSERTION(view, "no view");
    rect += offset;
    view->GetViewManager()->UpdateView(view, rect, flags);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsIFrame::IsBoxFrame ( ) const [inline]

Definition at line 1378 of file nsIFrame.h.

{ return (mState & NS_FRAME_IS_BOX) != 0; }

Here is the caller graph for this function:

PRBool nsIFrame::IsBoxWrapped ( ) const [inline]

Definition at line 1379 of file nsIFrame.h.

  { return (!IsBoxFrame() && mParent && mParent->IsBoxFrame()); }

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::IsCollapsed ( nsBoxLayoutState aBoxLayoutState,
PRBool aCollapsed 
) [pure virtual]

Implemented in nsBox.

Here is the caller graph for this function:

virtual PRBool nsIFrame::IsContainingBlock ( ) const [pure virtual]

Is this frame a containing block for non-positioned elements?

Implemented in nsFrame, nsTableFrame, nsTableRowGroupFrame, CanvasFrame, nsFieldSetFrame, ViewportFrame, nsScrollbarFrame, nsTableOuterFrame, nsHTMLButtonControlFrame, nsPageFrame, and nsPageContentFrame.

Here is the caller graph for this function:

nsresult nsIFrame::IsDirty ( PRBool aIsDirty) [inline]

Definition at line 1418 of file nsIFrame.h.

{ aIsDirty = (mState & NS_FRAME_IS_DIRTY) != 0; return NS_OK; }

Here is the caller graph for this function:

virtual PRBool nsIFrame::IsEmpty ( ) [pure virtual]

Determine whether the frame is logically empty, which is roughly whether the layout would be the same whether or not the frame is present.

Placeholder frames should return true. Block frames should be considered empty whenever margins collapse through them, even though those margins are relevant. Text frames containing only whitespace that does not contribute to the height of the line should return true.

Implemented in nsTextFrame, nsFrame, and nsPlaceholderFrame.

Here is the caller graph for this function:

virtual PRBool nsIFrame::IsFloatContainingBlock ( ) const [inline, virtual]

Is this frame a containing block for floating elements? Note that very few frames are, so default to false.

Definition at line 1106 of file nsIFrame.h.

{ return PR_FALSE; }

Here is the caller graph for this function:

PRBool nsIFrame::IsFocusable ( PRInt32 aTabIndex = nsnull,
PRBool  aWithMouse = PR_FALSE 
) [virtual]

Check if this frame is focusable and in the current tab order.

Tabbable is indicated by a nonnegative tabindex & is a subset of focusable. For example, only the selected radio button in a group is in the tab order, unless the radio group has no selection in which case all of the visible, non-disabled radio buttons in the group are in the tab order. On the other hand, all of the visible, non-disabled radio buttons are always focusable via clicking or script. Also, depending on the pref accessibility.tabfocus some widgets may be focusable but removed from the tab order. This is the default on Mac OS X, where fewer items are focusable.

Parameters:
[in,optional]aTabIndex the computed tab index < 0 if not tabbable == 0 if in normal tab order > 0 can be tabbed to in the order specified by this value
[in,optional]aWithMouse, is this focus query for mouse clicking
Returns:
whether the frame is focusable via mouse, kbd or script.

Definition at line 4794 of file nsFrame.cpp.

{
  PRInt32 tabIndex = -1;
  if (aTabIndex) {
    *aTabIndex = -1; // Default for early return is not focusable
  }
  PRBool isFocusable = PR_FALSE;

  if (mContent && mContent->IsContentOfType(nsIContent::eELEMENT) &&
      AreAncestorViewsVisible()) {
    const nsStyleVisibility* vis = GetStyleVisibility();
    if (vis->mVisible != NS_STYLE_VISIBILITY_COLLAPSE &&
        vis->mVisible != NS_STYLE_VISIBILITY_HIDDEN) {
      if (mContent->IsContentOfType(nsIContent::eHTML)) {
        nsCOMPtr<nsISupports> container(GetPresContext()->GetContainer());
        nsCOMPtr<nsIEditorDocShell> editorDocShell(do_QueryInterface(container));
        if (editorDocShell) {
          PRBool isEditable;
          editorDocShell->GetEditable(&isEditable);
          if (isEditable) {
            return NS_OK;  // Editor content is not focusable
          }
        }
      }
      const nsStyleUserInterface* ui = GetStyleUserInterface();
      if (ui->mUserFocus != NS_STYLE_USER_FOCUS_IGNORE &&
          ui->mUserFocus != NS_STYLE_USER_FOCUS_NONE) {
        // Pass in default tabindex of -1 for nonfocusable and 0 for focusable
        tabIndex = 0;
      }
      isFocusable = mContent->IsFocusable(&tabIndex);
      if (!isFocusable && !aWithMouse &&
          GetType() == nsLayoutAtoms::scrollFrame &&
          mContent->IsContentOfType(nsIContent::eHTML) &&
          !mContent->IsNativeAnonymous() && mContent->GetParent() &&
          !mContent->HasAttr(kNameSpaceID_None, nsHTMLAtoms::tabindex)) {
        // Elements with scrollable view are focusable with script & tabbable
        // Otherwise you couldn't scroll them with keyboard, which is
        // an accessibility issue (e.g. Section 508 rules)
        // However, we don't make them to be focusable with the mouse,
        // because the extra focus outlines are considered unnecessarily ugly.
        // When clicked on, the selection position within the element 
        // will be enough to make them keyboard scrollable.
        nsCOMPtr<nsIScrollableFrame> scrollFrame = do_QueryInterface(this);
        if (scrollFrame) {
          nsIScrollableFrame::ScrollbarStyles styles =
            scrollFrame->GetScrollbarStyles();
          if (styles.mVertical == NS_STYLE_OVERFLOW_SCROLL ||
              styles.mVertical == NS_STYLE_OVERFLOW_AUTO ||
              styles.mHorizontal == NS_STYLE_OVERFLOW_SCROLL ||
              styles.mHorizontal == NS_STYLE_OVERFLOW_AUTO) {
            // Scroll bars will be used for overflow
            isFocusable = PR_TRUE;
            tabIndex = 0;
          }
        }
      }
    }
  }

  if (aTabIndex) {
    *aTabIndex = tabIndex;
  }
  return isFocusable;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual PRBool nsIFrame::IsFrameOfType ( PRUint32  aFlags) const [inline, virtual]

API for doing a quick check if a frame is of a given type.

Returns true if the frame matches ALL flags passed in.

Reimplemented in nsSVGOuterSVGFrame, nsSVGTextFrame, nsMathMLmtdFrame, nsSVGGlyphFrame, nsMathMLContainerFrame, nsSVGTSpanFrame, nsSVGInnerSVGFrame, nsSVGGenericContainerFrame, nsSVGPathGeometryFrame, nsMathMLmtableOuterFrame, nsSVGDefsFrame, nsSVGStopFrame, and nsSVGTextPathFrame.

Definition at line 1092 of file nsIFrame.h.

  {
    return !aFlags;
  }

Here is the caller graph for this function:

IsGeneratedContentFrame returns whether a frame corresponds to generated content.

Returns:
whether the frame correspods to generated content

Definition at line 1305 of file nsIFrame.h.

                                   {
    return (mState & NS_FRAME_GENERATED_CONTENT) != 0;
  }

Here is the caller graph for this function:

PRBool nsIFrame::IsHorizontal ( ) const [inline]

Definition at line 1453 of file nsIFrame.h.

{ return (mState & NS_STATE_IS_HORIZONTAL) != 0; }

Here is the caller graph for this function:

PRBool nsIFrame::IsLeaf ( ) const [virtual]

Is this a leaf frame? Frames that want the frame constructor to be able to construct kids for them should return false, all others should return true.

Note that returning true here does not mean that the frame can't have kids. It could still have kids created via nsIAnonymousContentCreator. Returning true indicates that "normal" (non-anonymous, XBL-bound, CSS generated content, etc) children should not be constructed.

Reimplemented in nsHTMLFramesetFrame, nsTextControlFrame, nsGfxButtonControlFrame, nsContainerFrame, and nsMathMLmspaceFrame.

Definition at line 2569 of file nsFrame.cpp.

{
  return PR_TRUE;
}

Here is the caller graph for this function:

PRBool nsIFrame::IsNormalDirection ( ) const [inline]

Definition at line 1457 of file nsIFrame.h.

{ return (mState & NS_STATE_IS_DIRECTION_NORMAL) != 0; }

Here is the caller graph for this function:

PRBool nsIFrame::IsPseudoFrame ( nsIContent aParentContent) [inline]

IsPseudoFrame returns whether a frame is a pseudo frame (eg an anonymous table-row frame created for a CSS table-cell without an enclosing table-row.

Parameters:
aParentContentthe content node corresponding to the parent frame
Returns:
whether the frame is a pseudo frame

Definition at line 1317 of file nsIFrame.h.

                                                   {
    return mContent == aParentContent;
  }

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::IsSelectable ( PRBool aIsSelectable,
PRUint8 aSelectStyle 
) const [pure virtual]

called to discover where this frame, or a parent frame has user-select style applied, which affects that way that it is selected.

Parameters:
aIsSelectableout param. Set to true if the frame can be selected (i.e. is not affected by user-select: none)
aSelectStyleout param. Returns the type of selection style found (using values defined in nsStyleConsts.h).

Implemented in nsFrame.

Here is the caller graph for this function:

virtual PRBool nsIFrame::IsSelfEmpty ( ) [pure virtual]

Determine whether the frame is logically empty, assuming that all its children are empty.

Implemented in nsTextFrame, nsFrame, and nsPlaceholderFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::IsSplittable ( nsSplittableType aIsSplittable) const [pure virtual]

Return how your frame can be split.

Implemented in nsTextFrame, nsFrame, and nsSplittableFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::IsVisibleForPainting ( nsPresContext aPresContext,
nsIRenderingContext aRenderingContext,
PRBool  aCheckVis,
PRBool aIsVisible 
) [pure virtual]

Determines whether a frame is visible for painting this takes into account whether it is painting a selection or printing.

Parameters:
aPresContextPresContext
aRenderingContextPresContext
aCheckVisindicates whether it should check for CSS visibility, PR_FALSE skips the check, PR_TRUE does the check
aIsVisiblereturn value

Implemented in nsTextFrame, and nsFrame.

Here is the caller graph for this function:

Implemented in nsMenuFrame, and nsBox.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::MarkDirty ( nsBoxLayoutState aState) [pure virtual]

Implemented in nsMenuPopupFrame, and nsBox.

Implemented in nsMenuPopupFrame, and nsBox.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::NeedsRecalc ( ) [pure virtual]
virtual PRBool nsIFrame::NeedsView ( ) [inline, virtual]

Does this frame type always need a view?

Reimplemented in nsXULScrollFrame, and nsHTMLScrollFrame.

Definition at line 720 of file nsIFrame.h.

{ return PR_FALSE; }

Here is the caller graph for this function:

virtual nsIFrame::NS_HIDDEN_ ( void ) [virtual]

Reimplemented in nsMenuFrame, nsMenuPopupFrame, nsBox, nsBox, and nsBox.

Reimplemented in nsMenuFrame, nsMenuPopupFrame, nsBox, nsBox, and nsBox.

Reimplemented in nsMenuFrame, nsMenuPopupFrame, nsBox, nsBox, and nsBox.

Reimplemented in nsMenuFrame, nsMenuPopupFrame, nsBox, nsBox, and nsBox.

Reimplemented in nsMenuFrame, nsMenuPopupFrame, nsBox, nsBox, and nsBox.

Reimplemented in nsMenuFrame, nsMenuPopupFrame, nsBox, nsBox, and nsBox.

Reimplemented in nsMenuFrame, nsMenuPopupFrame, nsBox, nsBox, and nsBox.

nsIFrame::NS_IMETHOD_ ( nsrefcnt  ) [private, pure virtual]
nsIFrame::NS_IMETHOD_ ( nsrefcnt  ) [private, pure virtual]
NS_IMETHOD nsIFrame::Paint ( nsPresContext aPresContext,
nsIRenderingContext aRenderingContext,
const nsRect aDirtyRect,
nsFramePaintLayer  aWhichLayer,
PRUint32  aFlags = 0 
) [pure virtual]
NS_IMETHOD nsIFrame::PeekOffset ( nsPresContext aPresContext,
nsPeekOffsetStruct aPos 
) [pure virtual]

called to find the previous/next character, word, or line returns the actual nsIFrame and the frame offset.

THIS DOES NOT CHANGE SELECTION STATE uses frame's begin selection state to start. if no selection on this frame will return NS_ERROR_FAILURE

Parameters:
aPOSis defined in nsIFrameSelection

Implemented in nsTextFrame, nsFrame, and BRFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::Reflow ( nsPresContext aPresContext,
nsHTMLReflowMetrics aReflowMetrics,
const nsHTMLReflowState aReflowState,
nsReflowStatus aStatus 
) [pure virtual]

The frame is given a maximum size and asked for its desired size.

This is the frame's opportunity to reflow its children.

Parameters:
aDesiredSizeout parameter where you should return the desired size and ascent/descent info. You should include any space you want for border/padding in the desired size you return.

It's okay to return a desired size that exceeds the max size if that's the smallest you can be, i.e. it's your minimum size.

maxElementSize is an optional parameter for returning your maximum element size. If may be null in which case you don't have to compute a maximum element size. The maximum element size must be less than or equal to your desired size.

For an incremental reflow you are responsible for invalidating any area within your frame that needs repainting (including borders). If your new desired size is different than your current size, then your parent frame is responsible for making sure that the difference between the two rects is repainted

Parameters:
aReflowStateinformation about your reflow including the reason for the reflow and the available space in which to lay out. Each dimension of the available space can either be constrained or unconstrained (a value of NS_UNCONSTRAINEDSIZE). If constrained you should choose a value that's less than or equal to the constrained size. If unconstrained you can choose as large a value as you like.

Note that the available space can be negative. In this case you still must return an accurate desired size. If you're a container you must always reflow at least one frame regardless of the available space

Parameters:
aStatusa return value indicating whether the frame is complete and whether the next-in-flow is dirty and needs to be reflowed

Implemented in nsTextFrame, nsTableFrame, nsXULScrollFrame, nsFrame, nsHTMLScrollFrame, nsHTMLFramesetBlankFrame, nsSVGOuterSVGFrame, nsTableRowGroupFrame, nsPageBreakFrame, nsTableColGroupFrame, nsMathMLContainerFrame, nsHTMLFramesetBorderFrame, nsHTMLFramesetFrame, nsBoxFrame, nsTableOuterFrame, nsTableCellFrame, nsFormControlFrame, nsTableColFrame, nsSubDocumentFrame, nsTableRowFrame, nsMathMLmfracFrame, CanvasFrame, nsScrollbarFrame, nsListControlFrame, nsMathMLmactionFrame, ViewportFrame, nsMathMLmsqrtFrame, nsRootBoxFrame, nsMathMLmtableOuterFrame, nsSimplePageSequenceFrame, nsNativeScrollbarFrame, nsTextControlFrame, nsFieldSetFrame, nsHTMLButtonControlFrame, nsMathMLmoFrame, BRFrame, nsMathMLmrootFrame, nsBulletFrame, nsMathMLmfencedFrame, nsMathMLTokenFrame, nsLeafBoxFrame, nsGfxButtonControlFrame, nsPlaceholderFrame, nsColumnSetFrame, nsHTMLCanvasFrame, nsLeafFrame, nsPageFrame, nsMathMLmpaddedFrame, SpacerFrame, nsMathMLmspaceFrame, and nsPageContentFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::ReflowDirtyChild ( nsIPresShell aPresShell,
nsIFrame aChild 
) [pure virtual]

Called by a child frame on a parent frame to tell the parent frame that the child needs to be reflowed.

The parent should either propagate the request to its parent frame or handle the request by generating a eReflowType_ReflowDirtyChildren reflow command.

Implemented in nsFrame, nsMathMLContainerFrame, nsBoxFrame, nsMathMLmoFrame, nsContainerFrame, and nsMathMLTokenFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::RelayoutChildAtOrdinal ( nsBoxLayoutState aState,
nsIBox *  aChild 
) [pure virtual]

Implemented in nsBoxFrame, and nsBox.

NS_IMETHOD nsIFrame::RelayoutDirtyChild ( nsBoxLayoutState aState,
nsIBox *  aChild 
) [pure virtual]

Implemented in nsMenuPopupFrame, and nsBox.

Here is the caller graph for this function:

virtual void nsIFrame::RemovedAsPrimaryFrame ( nsPresContext aPresContext) [inline, virtual]

Reimplemented in nsTextControlFrame.

Definition at line 444 of file nsIFrame.h.

{}
NS_IMETHOD nsIFrame::RemoveFrame ( nsIAtom aListName,
nsIFrame aOldFrame 
) [pure virtual]

This method is responsible for removing a frame in the frame list.

The implementation should do something with the removed frame and then generate a reflow command. The implementation is responsible for destroying aOldFrame (the caller mustn't destroy aOldFrame).

Parameters:
aListNamethe name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aOldFramethe frame to remove
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_FAILURE if the child frame is not in the specified child list, NS_ERROR_UNEXPECTED if the frame is an atomic frame, NS_OK otherwise

Implemented in nsXULScrollFrame, nsTableFrame, nsHTMLScrollFrame, nsSVGOuterSVGFrame, nsFrame, nsBoxFrame, nsMenuFrame, nsSliderFrame, nsMathMLContainerFrame, nsTableRowGroupFrame, nsSVGGradientFrame, nsTableColGroupFrame, nsTableOuterFrame, nsHTMLButtonControlFrame, nsTableCellFrame, CanvasFrame, nsSVGTextFrame, nsSVGTSpanFrame, nsFieldSetFrame, nsRootBoxFrame, nsSVGInnerSVGFrame, ViewportFrame, nsTableRowFrame, nsSVGDefsFrame, nsSVGGenericContainerFrame, and nsColumnSetFrame.

Here is the caller graph for this function:

Definition at line 824 of file nsIFrame.h.

{ mState &= ~aBits; }

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::ReplaceFrame ( nsIAtom aListName,
nsIFrame aOldFrame,
nsIFrame aNewFrame 
) [pure virtual]

This method is responsible for replacing the old frame with the new frame.

The old frame should be destroyed and the new frame inserted in its place in the specified child list.

Parameters:
aListNamethe name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aOldFramethe frame to remove
aNewFramethe frame to replace it with. The new frame has its NS_FRAME_IS_DIRTY bit set
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_FAILURE if the old child frame is not in the specified child list, NS_ERROR_UNEXPECTED if the frame is an atomic frame, NS_OK otherwise

Implemented in nsXULScrollFrame, nsHTMLScrollFrame, nsSVGOuterSVGFrame, nsFrame, nsMathMLContainerFrame, nsHTMLButtonControlFrame, nsSVGTextFrame, nsSVGTSpanFrame, nsFieldSetFrame, nsSVGInnerSVGFrame, nsSVGDefsFrame, nsSVGGenericContainerFrame, and nsContainerFrame.

Here is the caller graph for this function:

virtual void nsIFrame::SetAdditionalStyleContext ( PRInt32  aIndex,
nsStyleContext aStyleContext 
) [pure virtual]
NS_IMETHOD nsIFrame::SetBounds ( nsBoxLayoutState aBoxLayoutState,
const nsRect aRect,
PRBool  aRemoveOverflowArea = PR_FALSE 
) [pure virtual]

Implemented in nsTreeBodyFrame, nsTreeColFrame, and nsBox.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::SetIncludeOverflow ( PRBool  aInclude) [pure virtual]

Implemented in nsFrame.

NS_IMETHOD nsIFrame::SetInitialChildList ( nsPresContext aPresContext,
nsIAtom aListName,
nsIFrame aChildList 
) [pure virtual]

Called to set the initial list of frames.

This happens after the frame has been initialized.

This is only called once for a given child list, and won't be called at all for child lists with no initial list of frames.

Parameters:
aListNamethe name of the child list. A NULL pointer for the atom name means the unnamed principal child list
aChildListlist of child frames. Each of the frames has its NS_FRAME_IS_DIRTY bit set
Returns:
NS_ERROR_INVALID_ARG if there is no child list with the specified name, NS_ERROR_UNEXPECTED if the frame is an atomic frame or if the initial list of frames has already been set for that child list, NS_OK otherwise
See also:
Init()

Implemented in nsXULScrollFrame, nsTableFrame, nsHTMLScrollFrame, nsSliderFrame, nsFrame, nsBoxFrame, nsTextControlFrame, nsMenuFrame, nsMathMLContainerFrame, nsFormControlFrame, nsTableOuterFrame, nsListControlFrame, nsHTMLButtonControlFrame, nsTableColGroupFrame, nsFieldSetFrame, nsMathMLmactionFrame, ViewportFrame, nsMathMLmfencedFrame, nsContainerFrame, nsMathMLTokenFrame, nsProgressMeterFrame, nsColumnSetFrame, and nsPageFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::SetLayoutManager ( nsIBoxLayout aLayout) [pure virtual]

Implemented in nsBoxFrame, and nsBox.

Implemented in nsTextFrame, nsFrame, and nsSplittableFrame.

Here is the caller graph for this function:

void nsIFrame::SetNextSibling ( nsIFrame aNextSibling) [inline]

Definition at line 695 of file nsIFrame.h.

                                              {
    NS_ASSERTION(this != aNextSibling, "Creating a circular frame list, this is very bad."); 
    mNextSibling = aNextSibling;
  }
NS_IMETHOD nsIFrame::SetParent ( const nsIFrame aParent) [inline]

Reimplemented in nsFrame, and nsMenuFrame.

Definition at line 654 of file nsIFrame.h.

{ mParent = (nsIFrame*)aParent; return NS_OK; }

Here is the caller graph for this function:

void nsIFrame::SetPosition ( const nsPoint aPt) [inline]

Definition at line 668 of file nsIFrame.h.

{ mRect.MoveTo(aPt); }

Here is the caller graph for this function:

Implemented in nsContinuingTextFrame, nsFrame, and nsSplittableFrame.

Here is the caller graph for this function:

void nsIFrame::SetRect ( const nsRect aRect) [inline]

Definition at line 667 of file nsIFrame.h.

{ mRect = aRect; }

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::SetSelected ( nsPresContext aPresContext,
nsIDOMRange aRange,
PRBool  aSelected,
nsSpread  aSpread 
) [pure virtual]

Selection related calls.

Called to set the selection of the frame based on frame offsets. you can FORCE the frame to redraw event if aSelected == the frame selection with the last parameter. data in struct may be changed when passed in.

Parameters:
aRangeis the range that will dictate if the frames need to be redrawn null means the whole content needs to be redrawn
aSelectedis it selected?
aSpreadshould it spread the selection to flow elements around it? or go down to its children?

Implemented in nsTextFrame, nsTableFrame, nsFrame, nsTableOuterFrame, nsTableCellFrame, and nsSVGGlyphFrame.

Here is the caller graph for this function:

void nsIFrame::SetSize ( const nsSize aSize) [inline]

Definition at line 669 of file nsIFrame.h.

{ mRect.SizeTo(aSize); }

Here is the caller graph for this function:

void nsIFrame::SetStyleContext ( nsPresContext aPresContext,
nsStyleContext aContext 
) [inline]

Definition at line 580 of file nsIFrame.h.

  { 
    if (aContext != mStyleContext) {
      if (mStyleContext)
        mStyleContext->Release();
      mStyleContext = aContext;
      if (aContext) {
        aContext->AddRef();
        DidSetStyleContext(aPresContext);
      }
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 2346 of file nsFrame.cpp.

{
  if (aView) {
    aView->SetClientData(this);

    // Set a property on the frame
    nsresult rv = SetProperty(nsLayoutAtoms::viewProperty, aView, nsnull);
    NS_ENSURE_SUCCESS(rv, rv);

    // Set the frame state bit that says the frame has a view
    AddStateBits(NS_FRAME_HAS_VIEW);

    // Let all of the ancestors know they have a descendant with a view.
    for (nsIFrame* f = GetParent();
         f && !(f->GetStateBits() & NS_FRAME_HAS_CHILD_WITH_VIEW);
         f = f->GetParent())
      f->AddStateBits(NS_FRAME_HAS_CHILD_WITH_VIEW);
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual PRBool nsIFrame::SupportsVisibilityHidden ( ) [inline, virtual]

Return PR_TRUE if and only if this frame obeys visibility:hidden.

if it does not, then nsContainerFrame will hide its view even though this means children can't be made visible again.

Reimplemented in nsSubDocumentFrame.

Definition at line 1353 of file nsIFrame.h.

{ return PR_TRUE; }

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::TrimTrailingWhiteSpace ( nsPresContext aPresContext,
nsIRenderingContext aRC,
nscoord aDeltaWidth,
PRBool aLastCharIsJustifiable 
) [pure virtual]

Implemented in nsTextFrame, and nsFrame.

Here is the caller graph for this function:

NS_IMETHOD nsIFrame::WillReflow ( nsPresContext aPresContext) [pure virtual]

Pre-reflow hook.

Before a frame is reflowed this method will be called. This call will always be invoked at least once before a subsequent Reflow and DidReflow call. It may be called more than once, In general you will receive on WillReflow notification before each Reflow request.

XXX Is this really the semantics we want? Because we have the NS_FRAME_IN_REFLOW bit we can ensure we don't call it more than once...

Implemented in nsFrame.

Here is the caller graph for this function:


Member Data Documentation

Definition at line 1328 of file nsIFrame.h.

Definition at line 1329 of file nsIFrame.h.

Definition at line 1461 of file nsIFrame.h.

Definition at line 1461 of file nsIFrame.h.

Definition at line 1323 of file nsIFrame.h.

Definition at line 1327 of file nsIFrame.h.

Definition at line 1325 of file nsIFrame.h.

Definition at line 1508 of file nsIFrame.h.

Definition at line 1511 of file nsIFrame.h.

Definition at line 1510 of file nsIFrame.h.

nsRect nsIFrame::mRect [protected]

Definition at line 1507 of file nsIFrame.h.

Definition at line 1512 of file nsIFrame.h.

Definition at line 1509 of file nsIFrame.h.


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