Back to index

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

#include <nsMathMLmactionFrame.h>

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

List of all members.

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

NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD 
Init (nsPresContext *aPresContext, nsIContent *aContent, nsIFrame *aParent, nsStyleContext *aContext, nsIFrame *aPrevInFlow)
 Called to initialize the frame.
NS_IMETHOD SetInitialChildList (nsPresContext *aPresContext, nsIAtom *aListName, nsIFrame *aChildList)
 Called to set the initial list of frames.
NS_IMETHOD GetFrameForPoint (const nsPoint &aPoint, nsFramePaintLayer aWhichLayer, nsIFrame **aFrame)
 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 Paint (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, const nsRect &aDirtyRect, nsFramePaintLayer aWhichLayer, PRUint32 aFlags=0)
 Paint is responsible for painting the frame.
NS_IMETHOD Place (nsIRenderingContext &aRenderingContext, PRBool aPlaceOrigin, nsHTMLReflowMetrics &aDesiredSize)
NS_IMETHOD Reflow (nsPresContext *aPresContext, nsHTMLReflowMetrics &aDesiredSize, const nsHTMLReflowState &aReflowState, nsReflowStatus &aStatus)
 The frame is given a maximum size and asked for its desired size.
NS_IMETHOD MouseDown (nsIDOMEvent *aMouseEvent)
 Processes a mouse down event.
NS_IMETHOD MouseUp (nsIDOMEvent *aMouseEvent)
 Processes a mouse up event.
NS_IMETHOD MouseClick (nsIDOMEvent *aMouseEvent)
 Processes a mouse click event.
NS_IMETHOD MouseDblClick (nsIDOMEvent *aMouseEvent)
 Processes a mouse click event.
NS_IMETHOD MouseOver (nsIDOMEvent *aMouseEvent)
 Processes a mouse enter event.
NS_IMETHOD MouseOut (nsIDOMEvent *aMouseEvent)
 Processes a mouse leave event.
NS_IMETHOD HandleEvent (nsIDOMEvent *aEvent)
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD 
Stretch (nsIRenderingContext &aRenderingContext, nsStretchDirection aStretchDirection, nsBoundingMetrics &aContainerSize, nsHTMLReflowMetrics &aDesiredStretchSize)
NS_IMETHOD UpdatePresentationDataFromChildAt (PRInt32 aFirstIndex, PRInt32 aLastIndex, PRInt32 aScriptLevelIncrement, PRUint32 aFlagsValues, PRUint32 aFlagsToUpdate)
NS_IMETHOD ReResolveScriptStyle (PRInt32 aParentScriptLevel)
virtual PRBool IsFrameOfType (PRUint32 aFlags) const
 API for doing a quick check if a frame is of a given type.
NS_IMETHOD AppendFrames (nsIAtom *aListName, nsIFrame *aFrameList)
 This method is responsible for appending frames to the frame list.
NS_IMETHOD InsertFrames (nsIAtom *aListName, nsIFrame *aPrevFrame, nsIFrame *aFrameList)
 This method is responsible for inserting frames into the frame list.
NS_IMETHOD RemoveFrame (nsIAtom *aListName, nsIFrame *aOldFrame)
 This method is responsible for removing a frame in the frame list.
NS_IMETHOD ReplaceFrame (nsIAtom *aListName, nsIFrame *aOldFrame, nsIFrame *aNewFrame)
 This method is responsible for replacing the old frame with the new frame.
NS_IMETHODIMP ReflowDirtyChild (nsIPresShell *aPresShell, nsIFrame *aChild)
 Called by a child frame on a parent frame to tell the parent frame that the child needs to be reflowed.
NS_IMETHOD DidReflow (nsPresContext *aPresContext, const nsHTMLReflowState *aReflowState, nsDidReflowStatus aStatus)
 Post-reflow hook.
NS_IMETHOD AttributeChanged (nsIContent *aChild, PRInt32 aNameSpaceID, nsIAtom *aAttribute, PRInt32 aModType)
 This call is invoked when the value of a content objects's attribute is changed.
virtual nsresult ChildListChanged (PRInt32 aModType)
virtual void GetPreferredStretchSize (nsIRenderingContext &aRenderingContext, PRUint32 aOptions, nsStretchDirection aStretchDirection, nsBoundingMetrics &aPreferredStretchSize)
virtual nsresult ReflowError (nsIRenderingContext &aRenderingContext, nsHTMLReflowMetrics &aDesiredSize)
virtual nsresult PaintError (nsIRenderingContext &aRenderingContext, const nsRect &aDirtyRect, nsFramePaintLayer aWhichLayer)
nsresult ReflowChild (nsIFrame *aKidFrame, nsPresContext *aPresContext, nsHTMLReflowMetrics &aDesiredSize, const nsHTMLReflowState &aReflowState, nsReflowStatus &aStatus)
nsresult ReflowChild (nsIFrame *aKidFrame, nsPresContext *aPresContext, nsHTMLReflowMetrics &aDesiredSize, const nsHTMLReflowState &aReflowState, nscoord aX, nscoord aY, PRUint32 aFlags, nsReflowStatus &aStatus)
 Invokes the WillReflow() function, positions the frame and its view (if requested), and then calls Reflow().
nsresult ReflowForeignChild (nsIFrame *aKidFrame, nsPresContext *aPresContext, nsHTMLReflowMetrics &aDesiredSize, const nsHTMLReflowState &aReflowState, nsReflowStatus &aStatus)
virtual nscoord FixInterFrameSpacing (nsHTMLReflowMetrics &aDesiredSize)
virtual nsresult FinalizeReflow (nsIRenderingContext &aRenderingContext, nsHTMLReflowMetrics &aDesiredSize)
virtual nsIFrameGetFirstChild (nsIAtom *aListName) const
 Get the first child frame from the specified child list.
virtual nsIAtomGetAdditionalChildListName (PRInt32 aIndex) const
 Used to iterate the list of additional child list names.
NS_IMETHOD Destroy (nsPresContext *aPresContext)
 Destroys this frame and each of its child frames (recursively calls Destroy() for each child)
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 void DeleteNextInFlowChild (nsPresContext *aPresContext, nsIFrame *aNextInFlow)
 Remove and delete aNextInFlow and its next-in-flows.
NS_IMETHOD IsSplittable (nsSplittableType &aIsSplittable) const
 Return how your frame can be split.
virtual nsIFrameGetPrevInFlow () const
 Flow member functions.
NS_IMETHOD SetPrevInFlow (nsIFrame *)
virtual nsIFrameGetNextInFlow () const
NS_IMETHOD SetNextInFlow (nsIFrame *)
virtual nsIFrameGetFirstInFlow () const
 Return the first frame in our current flow.
virtual nsIFrameGetLastInFlow () const
 Return the last frame in our current flow.
voidoperator new (size_t sz, nsIPresShell *aPresShell) CPP_THROW_NEW
void operator delete (void *aPtr, size_t sz)
virtual PRBool ComputesOwnOverflowArea ()
NS_IMETHOD QueryInterface (const nsIID &aIID, void **aInstancePtr)
NS_IMETHOD QueryInterface (REFNSIID aIID, void **aInstancePtr)
NS_IMETHOD CalcBorderPadding (nsMargin &aBorderPadding) const
virtual nsStyleContextGetAdditionalStyleContext (PRInt32 aIndex) const
 These methods are to access any additional style contexts that the frame may be holding.
virtual void SetAdditionalStyleContext (PRInt32 aIndex, nsStyleContext *aStyleContext)
NS_IMETHOD SetParent (const nsIFrame *aParent)
NS_IMETHOD HandleEvent (nsPresContext *aPresContext, nsGUIEvent *aEvent, nsEventStatus *aEventStatus)
 Event handling of GUI events.
NS_IMETHOD GetContentForEvent (nsPresContext *aPresContext, nsEvent *aEvent, nsIContent **aContent)
NS_IMETHOD GetCursor (const nsPoint &aPoint, nsIFrame::Cursor &aCursor)
 Get the cursor for a given frame.
NS_IMETHOD GetPointFromOffset (nsPresContext *inPresContext, nsIRenderingContext *inRendContext, PRInt32 inOffset, nsPoint *outPoint)
 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)
 Get the child frame of this frame which contains the given content offset.
NS_IMETHOD CharacterDataChanged (nsPresContext *aPresContext, nsIContent *aChild, PRBool aAppend)
 This call is invoked when content is changed in the content tree.
NS_IMETHOD GetOffsetFromView (nsPoint &aOffset, nsIView **aView) const
 Returns the offset from this frame to the closest geometric parent that has a view.
NS_IMETHOD GetOriginToViewOffset (nsPoint &aOffset, nsIView **aView) const
 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 nsIAtomGetType () const
 Get the "type" of the frame.
virtual PRBool IsContainingBlock () const
 Is this frame a containing block for non-positioned elements?
NS_IMETHOD SetSelected (nsPresContext *aPresContext, nsIDOMRange *aRange, PRBool aSelected, nsSpread aSpread)
 Selection related calls.
NS_IMETHOD GetSelected (PRBool *aSelected) const
NS_IMETHOD IsSelectable (PRBool *aIsSelectable, PRUint8 *aSelectStyle) const
 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)
 Called to retrieve the SelectionController associated with the frame.
NS_IMETHOD PeekOffset (nsPresContext *aPresContext, nsPeekOffsetStruct *aPos)
 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)
 called to see if the children of the frame are visible from indexstart to index end.
NS_IMETHOD PeekOffsetParagraph (nsPresContext *aPresContext, nsPeekOffsetStruct *aPos)
NS_IMETHOD GetOffsets (PRInt32 &aStart, PRInt32 &aEnd) const
 Get the offsets of the frame.
NS_IMETHOD GetParentStyleContextFrame (nsPresContext *aPresContext, nsIFrame **aProviderFrame, PRBool *aIsChild)
 Called to retrieve this frame's accessible.
NS_IMETHOD IsVisibleForPainting (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, PRBool aCheckVis, PRBool *aIsVisible)
 Determines whether a frame is visible for painting this takes into account whether it is painting a selection or printing.
virtual PRBool IsEmpty ()
 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 ()
 Determine whether the frame is logically empty, assuming that all its children are empty.
NS_IMETHOD WillReflow (nsPresContext *aPresContext)
 Pre-reflow hook.
NS_IMETHOD CanContinueTextRun (PRBool &aContinueTextRun) const
 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)
NS_IMETHOD TrimTrailingWhiteSpace (nsPresContext *aPresContext, nsIRenderingContext &aRC, nscoord &aDeltaWidth, PRBool &aLastCharIsJustifiable)
NS_IMETHOD HandlePress (nsPresContext *aPresContext, nsGUIEvent *aEvent, nsEventStatus *aEventStatus)
 Handles the Mouse Press Event for the frame.
NS_IMETHOD HandleMultiplePress (nsPresContext *aPresContext, nsGUIEvent *aEvent, nsEventStatus *aEventStatus)
 Multiple Mouse Press -- line or paragraph selection -- for the frame.
NS_IMETHOD HandleDrag (nsPresContext *aPresContext, nsGUIEvent *aEvent, nsEventStatus *aEventStatus)
NS_IMETHOD HandleRelease (nsPresContext *aPresContext, nsGUIEvent *aEvent, nsEventStatus *aEventStatus)
NS_IMETHOD GetContentAndOffsetsFromPoint (nsPresContext *aCX, const nsPoint &aPoint, nsIContent **aNewContent, PRInt32 &aContentOffset, PRInt32 &aContentOffsetEnd, PRBool &aBeginFrameContent)
NS_IMETHOD PeekBackwardAndForward (nsSelectionAmount aAmountBack, nsSelectionAmount aAmountForward, PRInt32 aStartPos, nsPresContext *aPresContext, PRBool aJumpLines)
NS_IMETHOD GetPrefSize (nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)
NS_IMETHOD GetMinSize (nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)
NS_IMETHOD GetMaxSize (nsBoxLayoutState &aBoxLayoutState, nsSize &aSize)
NS_IMETHOD GetFlex (nsBoxLayoutState &aBoxLayoutState, nscoord &aFlex)
NS_IMETHOD GetAscent (nsBoxLayoutState &aBoxLayoutState, nscoord &aAscent)
NS_IMETHOD SetIncludeOverflow (PRBool aInclude)
NS_IMETHOD GetOverflow (nsSize &aOverflow)
NS_IMETHOD NeedsRecalc ()
void CheckInvalidateSizeChange (nsPresContext *aPresContext, nsHTMLReflowMetrics &aDesiredSize, const nsHTMLReflowState &aReflowState)
 Helper method to invalidate portions of a standard container frame if the reflow state indicates that the size has changed (specifically border, background and outline).
PRBool IsFrameTreeTooDeep (const nsHTMLReflowState &aReflowState, nsHTMLReflowMetrics &aMetrics)
nsresult DoGetParentStyleContextFrame (nsPresContext *aPresContext, nsIFrame **aProviderFrame, PRBool *aIsChild)
void ConsiderChildOverflow (nsRect &aOverflowArea, nsIFrame *aChildFrame)
NS_IMETHOD CaptureMouse (nsPresContext *aPresContext, PRBool aGrabMouseEvents)
 EndSelection related calls.
PRBool IsMouseCaptured (nsPresContext *aPresContext)
virtual const nsStyleStructGetStyleDataExternal (nsStyleStructID aSID) const
 Get the style data associated with this frame.
 NS_IMETHOD_ (nsrefcnt) AddRef()
virtual nsSize GetMinSizeForScrollArea (nsBoxLayoutState &aBoxLayoutState)
 This returns the minimum size for the scroll area if this frame is being scrolled.
NS_IMETHOD IsCollapsed (nsBoxLayoutState &aBoxLayoutState, PRBool &aCollapsed)
NS_IMETHOD SetBounds (nsBoxLayoutState &aBoxLayoutState, const nsRect &aRect, PRBool aRemoveOverflowArea=PR_FALSE)
NS_IMETHOD MarkDirty (nsBoxLayoutState &aState)
NS_IMETHOD GetBorder (nsMargin &aBorderAndPadding)
NS_IMETHOD GetPadding (nsMargin &aBorderAndPadding)
NS_IMETHOD GetMargin (nsMargin &aMargin)
NS_IMETHOD SetLayoutManager (nsIBoxLayout *aLayout)
NS_IMETHOD GetLayoutManager (nsIBoxLayout **aLayout)
NS_IMETHOD GetVAlign (Valignment &aAlign)
NS_IMETHOD GetHAlign (Halignment &aAlign)
NS_IMETHOD RelayoutDirtyChild (nsBoxLayoutState &aState, nsIBox *aChild)
NS_IMETHOD RelayoutChildAtOrdinal (nsBoxLayoutState &aState, nsIBox *aChild)
NS_IMETHOD GetMouseThrough (PRBool &aMouseThrough)
NS_IMETHOD MarkChildrenStyleChange ()
NS_IMETHOD MarkStyleChange (nsBoxLayoutState &aState)
NS_IMETHOD ChildrenMustHaveWidgets (PRBool &aMust) const
 Hack for deck who requires that all its children has widgets.
NS_IMETHOD GetIndexOf (nsIBox *aChild, PRInt32 *aIndex)
virtual PRBool DoesClipChildren ()
 Returns PR_TRUE if this box clips its children, e.g., if this box is an sc rollbox.
 NS_HIDDEN_ (nsresult) SyncLayout(nsBoxLayoutState &aBoxLayoutState)
 NS_HIDDEN_ (void *) GetProperty(nsIAtom *aPropertyName
 NS_HIDDEN_ (nsresult) DeleteProperty(nsIAtom *aPropertyName) const
PRBool DoesNeedRecalc (const nsSize &aSize)
PRBool DoesNeedRecalc (nscoord aCoord)
void SizeNeedsRecalc (nsSize &aSize)
void CoordNeedsRecalc (nscoord &aCoord)
void AddBorderAndPadding (nsSize &aSize)
void AddInset (nsSize &aSize)
void AddMargin (nsSize &aSize)
nsPresContextGetPresContext () const
virtual void RemovedAsPrimaryFrame (nsPresContext *aPresContext)
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.
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)
const nsStyleStructGetStyleData (nsStyleStructID aSID) const
nsIFrameGetParent () const
 Accessor functions for geometric parent.
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)
nsIFrameGetNextSibling () const
 Child frames are linked together in a singly-linked list.
void SetNextSibling (nsIFrame *aNextSibling)
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.
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)
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
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 PRBool IsFloatContainingBlock () const
 Is this frame a containing block for floating elements? Note that very few frames are, so default to false.
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)
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.
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
 GetOrdinal (nsBoxLayoutState &aBoxLayoutState, PRUint32 &aOrdinal)
nsresult IsDirty (PRBool &aIsDirty)
nsresult HasDirtyChildren (PRBool &aIsDirty)
nsresult GetChildBox (nsIBox **aBox)
nsresult GetNextBox (nsIBox **aBox)
NS_IMETHOD GetBorderAndPadding (nsMargin &aBorderAndPadding)
nsresult GetInset (nsMargin &aInset)
PRBool IsHorizontal () const
nsresult GetOrientation (PRBool &aIsHorizontal)
 XXX to be removed.
PRBool IsNormalDirection () const
nsresult GetDirection (PRBool &aIsNormal)
 XXX to be removed.
nsPeekOffsetStruct GetExtremeCaretPosition (PRBool aStart)
 gets the first or last possible caret position within the frame
NS_IMETHOD GetBoundingMetrics (nsBoundingMetrics &aBoundingMetrics)
NS_IMETHOD SetBoundingMetrics (const nsBoundingMetrics &aBoundingMetrics)
NS_IMETHOD GetReference (nsPoint &aReference)
NS_IMETHOD SetReference (const nsPoint &aReference)
virtual eMathMLFrameType GetMathMLFrameType ()
NS_IMETHOD GetEmbellishData (nsEmbellishData &aEmbellishData)
NS_IMETHOD SetEmbellishData (const nsEmbellishData &aEmbellishData)
NS_IMETHOD GetPresentationData (nsPresentationData &aPresentationData)
NS_IMETHOD SetPresentationData (const nsPresentationData &aPresentationData)
NS_IMETHOD InheritAutomaticData (nsIFrame *aParent)
NS_IMETHOD TransmitAutomaticData ()
NS_IMETHOD UpdatePresentationData (PRInt32 aScriptLevelIncrement, PRUint32 aFlagsValues, PRUint32 aFlagsToUpdate)
void handleEvent (in nsIDOMEvent event)
 This method is called whenever an event occurs of the type for which the EventListener interface was registered.

Static Public Member Functions

static void GetReflowAndBoundingMetricsFor (nsIFrame *aFrame, nsHTMLReflowMetrics &aReflowMetrics, nsBoundingMetrics &aBoundingMetrics, eMathMLFrameType *aMathMLFrameType=nsnull)
static void PropagateScriptStyleFor (nsIFrame *aFrame, PRInt32 aParentScriptLevel)
static void PropagatePresentationDataFor (nsIFrame *aFrame, PRInt32 aScriptLevelIncrement, PRUint32 aFlagsValues, PRUint32 aFlagsToUpdate)
static void PropagatePresentationDataFromChildAt (nsIFrame *aParentFrame, PRInt32 aFirstChildIndex, PRInt32 aLastChildIndex, PRInt32 aScriptLevelIncrement, PRUint32 aFlagsValues, PRUint32 aFlagsToUpdate)
static void RebuildAutomaticDataForChildren (nsIFrame *aParentFrame)
static nsresult ReLayoutChildren (nsIFrame *aParentFrame)
static nsresult CreateNextInFlow (nsPresContext *aPresContext, nsIFrame *aOuterFrame, nsIFrame *aFrame, nsIFrame *&aNextInFlowResult)
 Helper method to create next-in-flows if necessary.
static nsresult CreateViewForFrame (nsIFrame *aFrame, nsIFrame *aContentParentFrame, PRBool aForce)
 Helper method to wrap views around frames.
static nsresult ReparentFrameView (nsPresContext *aPresContext, nsIFrame *aChildFrame, nsIFrame *aOldParentFrame, nsIFrame *aNewParentFrame)
static nsresult ReparentFrameViewList (nsPresContext *aPresContext, nsIFrame *aChildFrameList, nsIFrame *aOldParentFrame, nsIFrame *aNewParentFrame)
static PRInt32 LengthOf (nsIFrame *aFrameList)
static void PositionFrameView (nsIFrame *aKidFrame)
 Position the view associated with |aKidFrame|, if there is one.
static void SyncFrameViewAfterReflow (nsPresContext *aPresContext, nsIFrame *aFrame, nsIView *aView, const nsRect *aCombinedArea, PRUint32 aFlags=0)
static void SyncFrameViewAfterSizeChange (nsPresContext *aPresContext, nsIFrame *aFrame, nsStyleContext *aStyleContext, nsIView *aView, PRUint32 aFlags=0)
static void SyncFrameViewProperties (nsPresContext *aPresContext, nsIFrame *aFrame, nsStyleContext *aStyleContext, nsIView *aView, PRUint32 aFlags=0)
static PRBool FrameNeedsView (nsIFrame *aFrame)
static nsresult FinishReflowChild (nsIFrame *aKidFrame, nsPresContext *aPresContext, const nsHTMLReflowState *aReflowState, nsHTMLReflowMetrics &aDesiredSize, nscoord aX, nscoord aY, PRUint32 aFlags)
 The second half of frame reflow.
static void PositionChildViews (nsIFrame *aFrame)
 Position the views of |aFrame|'s descendants.
static void RemoveFromFlow (nsIFrame *aFrame)
static void BreakFromPrevFlow (nsIFrame *aFrame)
static nsresult GetNextPrevLineFromeBlockFrame (nsPresContext *aPresContext, nsPeekOffsetStruct *aPos, nsIFrame *aBlockFrame, PRInt32 aLineStart, PRInt8 aOutSideLimit)
static nsIFrameCorrectStyleParentFrame (nsIFrame *aProspectiveParent, nsIAtom *aChildPseudo)
 Adjust the given parent frame to the right style context parent frame for the child, given the pseudo-type of the prospective child.
static void GetLastLeaf (nsPresContext *aPresContext, nsIFrame **aFrame)
static void GetFirstLeaf (nsPresContext *aPresContext, nsIFrame **aFrame)
static void Shutdown ()
static void AddBorderAndPadding (nsIBox *aBox, nsSize &aSize)
static void AddInset (nsIBox *aBox, nsSize &aSize)
static void AddMargin (nsIBox *aChild, nsSize &aSize)
static void AddMargin (nsSize &aSize, const nsMargin &aMargin)
static void BoundsCheckMinMax (nsSize &aMinSize, nsSize &aMaxSize)
static void BoundsCheck (nsSize &aMinSize, nsSize &aPrefSize, nsSize &aMaxSize)
static void BoundsCheck (nscoord &aMinSize, nscoord &aPrefSize, nscoord &aMaxSize)
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)
static void ResolveMathMLCharStyle (nsPresContext *aPresContext, nsIContent *aContent, nsStyleContext *aParenStyleContext, nsMathMLChar *aMathMLChar, PRBool aIsMutableChar)
static void GetEmbellishDataFrom (nsIFrame *aFrame, nsEmbellishData &aEmbellishData)
static void GetPresentationDataFrom (nsIFrame *aFrame, nsPresentationData &aPresentationData, PRBool aClimbTree=PR_TRUE)
static nsresult GetAttribute (nsIContent *aContent, nsIFrame *aMathMLmstyleFrame, nsIAtom *aAttributeAtom, nsString &aValue)
static PRBool ParseNumericValue (nsString &aString, nsCSSValue &aCSSValue)
static nscoord CalcLength (nsPresContext *aPresContext, nsStyleContext *aStyleContext, const nsCSSValue &aCSSValue)
static PRBool ParseNamedSpaceValue (nsIFrame *aMathMLmstyleFrame, nsString &aString, nsCSSValue &aCSSValue)
static eMathMLFrameType GetMathMLFrameTypeFor (nsIFrame *aFrame)
static void GetItalicCorrection (nsBoundingMetrics &aBoundingMetrics, nscoord &aItalicCorrection)
static void GetItalicCorrection (nsBoundingMetrics &aBoundingMetrics, nscoord &aLeftItalicCorrection, nscoord &aRightItalicCorrection)
static void GetSubDropFromChild (nsIFrame *aChild, nscoord &aSubDrop)
static void GetSupDropFromChild (nsIFrame *aChild, nscoord &aSupDrop)
static void GetSkewCorrectionFromChild (nsIFrame *aChild, nscoord &aSkewCorrection)
static void GetSubScriptShifts (nsIFontMetrics *fm, nscoord &aSubScriptShift1, nscoord &aSubScriptShift2)
static void GetSupScriptShifts (nsIFontMetrics *fm, nscoord &aSupScriptShift1, nscoord &aSupScriptShift2, nscoord &aSupScriptShift3)
static void GetSubDrop (nsIFontMetrics *fm, nscoord &aSubDrop)
static void GetSupDrop (nsIFontMetrics *fm, nscoord &aSupDrop)
static void GetNumeratorShifts (nsIFontMetrics *fm, nscoord &numShift1, nscoord &numShift2, nscoord &numShift3)
static void GetDenominatorShifts (nsIFontMetrics *fm, nscoord &denShift1, nscoord &denShift2)
static void GetEmHeight (nsIFontMetrics *fm, nscoord &emHeight)
static void GetAxisHeight (nsIFontMetrics *fm, nscoord &axisHeight)
static void GetAxisHeight (nsIRenderingContext &aRenderingContext, nsIFontMetrics *aFontMetrics, nscoord &aAxisHeight)
static void GetBigOpSpacings (nsIFontMetrics *fm, nscoord &bigOpSpacing1, nscoord &bigOpSpacing2, nscoord &bigOpSpacing3, nscoord &bigOpSpacing4, nscoord &bigOpSpacing5)
static void GetRuleThickness (nsIFontMetrics *fm, nscoord &ruleThickness)
static void GetRuleThickness (nsIRenderingContext &aRenderingContext, nsIFontMetrics *aFontMetrics, nscoord &aRuleThickness)
static PRInt32 MapAttributesIntoCSS (nsPresContext *aPresContext, nsIContent *aContent)
static PRInt32 MapAttributesIntoCSS (nsPresContext *aPresContext, nsIFrame *aFrame)

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 Types

enum  eMouseThrough { unset, never, always }

Protected Member Functions

 nsMathMLmactionFrame ()
virtual ~nsMathMLmactionFrame ()
virtual PRIntn GetSkipSides () const
void PaintSelf (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, const nsRect &aDirtyRect)
void PaintSelf (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, const nsRect &aDirtyRect, PRIntn aSkipSides=0, PRBool aUsePrintBackgroundSettings=PR_TRUE)
 To be called by |Paint| of this class or derived classes to paint the background, border, and outline, when in the correct layer to do so.
void PaintDecorationsAndChildren (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, const nsRect &aDirtyRect, nsFramePaintLayer aWhichLayer, PRBool aIsBlock, PRUint32 aFlags=0)
 To be called instead of |PaintChildren| by frames that paint text decorations (block and inline frames).
void PaintTextDecorations (nsIRenderingContext &aRenderingContext, nsIFontMetrics *aFontMetrics, PRUint8 aDecoration, nscolor aColor)
 Helper function to paint text decorations for this frame.
void GetTextDecorations (nsPresContext *aPresContext, PRBool aIsBlock, PRUint8 &aDecorations, nscolor &aUnderColor, nscolor &aOverColor, nscolor &aStrikeColor)
 Fetch the text decorations for this frame.
virtual void PaintTextDecorationLines (nsIRenderingContext &aRenderingContext, nscolor aColor, nscoord aOffset, nscoord aAscent, nscoord aSize)
 Function that does the actual drawing of the textdecoration.
nsresult GetFrameForPointUsing (const nsPoint &aPoint, nsIAtom *aList, nsFramePaintLayer aWhichLayer, PRBool aConsiderSelf, nsIFrame **aFrame)
virtual void PaintChildren (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, const nsRect &aDirtyRect, nsFramePaintLayer aWhichLayer, PRUint32 aFlags=0)
virtual void PaintChild (nsPresContext *aPresContext, nsIRenderingContext &aRenderingContext, const nsRect &aDirtyRect, nsIFrame *aFrame, nsFramePaintLayer aWhichLayer, PRUint32 aFlags=0)
nsIFrameGetOverflowFrames (nsPresContext *aPresContext, PRBool aRemoveProperty) const
 Get the frames on the overflow list.
nsresult SetOverflowFrames (nsPresContext *aPresContext, nsIFrame *aOverflowFrames)
 Set the overflow list.
PRBool MoveOverflowToChildList (nsPresContext *aPresContext)
 Moves any frames on both the prev-in-flow's overflow list and the receiver's overflow to the receiver's child list.
void PushChildren (nsPresContext *aPresContext, nsIFrame *aFromChild, nsIFrame *aPrevSibling)
 Push aFromChild and its next siblings to the next-in-flow.
PRInt16 DisplaySelection (nsPresContext *aPresContext, PRBool isOkToTurnOn=PR_FALSE)
NS_IMETHOD GetFrameFromDirection (nsPresContext *aPresContext, nsPeekOffsetStruct *aPos)
NS_IMETHOD DidSetStyleContext (nsPresContext *aPresContext)
nsresult GetSelectionForVisCheck (nsPresContext *aPresContext, nsISelection **aSelection)
NS_IMETHOD GetDataForTableSelection (nsIFrameSelection *aFrameSelection, nsIPresShell *aPresShell, nsMouseEvent *aMouseEvent, nsIContent **aParentContent, PRInt32 *aContentOffset, PRInt32 *aTarget)
virtual PRBool ParentDisablesSelection () const
void SetOverflowClipRect (nsIRenderingContext &aRenderingContext)
NS_IMETHOD DoLayout (nsBoxLayoutState &aBoxLayoutState)
virtual PRBool HasStyleChange ()
virtual void SetStyleChangeFlag (PRBool aDirty)
virtual PRBool GetWasCollapsed (nsBoxLayoutState &aState)
virtual void SetWasCollapsed (nsBoxLayoutState &aState, PRBool aWas)
void InitBoxMetrics (PRBool aClear)
nsBoxLayoutMetricsBoxMetrics () const
void FireDOMEvent (const nsAString &aDOMEventName, nsIContent *aContent=nsnull)
 NS_IMETHOD_ (nsrefcnt) AddRef(void)
 NS_IMETHOD_ (nsrefcnt) Release(void)
 NS_HIDDEN_ (nsresult) BeginLayout(nsBoxLayoutState &aState)
 NS_HIDDEN_ (nsresult) EndLayout(nsBoxLayoutState &aState)
virtual PRBool GetDefaultFlex (PRInt32 &aFlex)
virtual void GetLayoutFlags (PRUint32 &aFlags)

Static Protected Member Functions

static PRInt32 GetLineNumber (nsIFrame *aFrame)
static void FillCursorInformationFromStyle (const nsStyleUserInterface *ui, nsIFrame::Cursor &aCursor)

Protected Attributes

nsFrameList mFrames
nsIFramemPrevInFlow
nsIFramemNextInFlow
nsRect mRect
nsIContentmContent
nsStyleContextmStyleContext
nsIFramemParent
nsIFramemNextSibling
nsFrameState mState
nsPresentationData mPresentationData
nsEmbellishData mEmbellishData
nsBoundingMetrics mBoundingMetrics
nsPoint mReference

Static Protected Attributes

static PRBool gGotTheme = PR_FALSE
static nsIThemegTheme = nsnull

Private Member Functions

nsIFrameGetSelectedFrame ()

Static Private Member Functions

static nsresult ShowStatus (nsPresContext *aPresContext, nsString &aStatusMsg)

Private Attributes

nsPresContextmPresContext
PRInt32 mActionType
PRInt32 mChildCount
PRInt32 mSelection
nsIFramemSelectedFrame
nsString mRestyle
PRBool mWasRestyled

Friends

nsresult NS_NewMathMLmactionFrame (nsIPresShell *aPresShell, nsIFrame **aNewFrame)
nsresult NS_NewEmptyFrame (nsIPresShell *aShell, nsIFrame **aInstancePtrResult)
 Create a new "empty" frame that maps a given piece of content into a 0,0 area.
class nsIFrame

Detailed Description

Definition at line 56 of file nsMathMLmactionFrame.h.


Member Enumeration Documentation

anonymous enum [inherited]

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
  };
enum nsBox::eMouseThrough [protected, inherited]
Enumerator:
unset 
never 
always 

Definition at line 168 of file nsBox.h.

                     {
    unset,
    never,
    always
  };
enum nsIFrame::Halignment [inherited]
Enumerator:
hAlign_Left 
hAlign_Right 
hAlign_Center 

Definition at line 1382 of file nsIFrame.h.

enum nsIFrame::Valignment [inherited]
Enumerator:
vAlign_Top 
vAlign_Middle 
vAlign_BaseLine 
vAlign_Bottom 

Definition at line 1388 of file nsIFrame.h.


Constructor & Destructor Documentation

Definition at line 94 of file nsMathMLmactionFrame.cpp.

{
}

Definition at line 98 of file nsMathMLmactionFrame.cpp.

{
  // unregister us as a mouse event listener ...
//  printf("maction:%p unregistering as mouse event listener ...\n", this);
  nsCOMPtr<nsIDOMEventReceiver> receiver(do_QueryInterface(mContent));
  receiver->RemoveEventListenerByIID(this, NS_GET_IID(nsIDOMMouseListener));
}

Here is the call graph for this function:


Member Function Documentation

void nsBox::AddBorderAndPadding ( nsSize aSize) [inherited]

Definition at line 1203 of file nsBox.cpp.

{
  AddBorderAndPadding(this, aSize);
}

Here is the caller graph for this function:

void nsBox::AddBorderAndPadding ( nsIBox *  aBox,
nsSize aSize 
) [static, inherited]

Definition at line 1215 of file nsBox.cpp.

{
  nsMargin borderPadding(0,0,0,0);
  aBox->GetBorderAndPadding(borderPadding);
  AddMargin(aSize, borderPadding);
}

Here is the call graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the caller graph for this function:

void nsBox::AddInset ( nsSize aSize) [inline, inherited]

Definition at line 124 of file nsBox.h.

{ AddInset(this, aSize); }

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsBox::AddInset ( nsIBox *  aBox,
nsSize aSize 
) [inline, static, inherited]

Definition at line 131 of file nsBox.h.

{}
void nsBox::AddMargin ( nsSize aSize) [inherited]

Definition at line 1209 of file nsBox.cpp.

{
  AddMargin(this, aSize);
}

Here is the caller graph for this function:

void nsBox::AddMargin ( nsIBox *  aChild,
nsSize aSize 
) [static, inherited]

Definition at line 1223 of file nsBox.cpp.

{
  nsMargin margin(0,0,0,0);
  aChild->GetMargin(margin);
  AddMargin(aSize, margin);
}

Here is the call graph for this function:

void nsBox::AddMargin ( nsSize aSize,
const nsMargin aMargin 
) [static, inherited]

Definition at line 1231 of file nsBox.cpp.

{
  if (aSize.width != NS_INTRINSICSIZE)
    aSize.width += aMargin.left + aMargin.right;

  if (aSize.height != NS_INTRINSICSIZE)
     aSize.height += aMargin.top + aMargin.bottom;
}
void nsIFrame::AddStateBits ( nsFrameState  aBits) [inline, inherited]

Update the current frame-state value for this frame.

Definition at line 823 of file nsIFrame.h.

{ mState |= aBits; }
NS_IMETHODIMP nsFrame::AdjustFrameSize ( nscoord  aExtraSpace,
nscoord aUsedSpace 
) [virtual, inherited]

Implements nsIFrame.

Reimplemented in nsTextFrame.

Definition at line 2246 of file nsFrame.cpp.

{
  aUsedSpace = 0;
  return NS_OK;
}
virtual void nsIFrame::AdjustOffsetsForBidi ( PRInt32  aStart,
PRInt32  aEnd 
) [inline, virtual, inherited]

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_IMETHODIMP nsMathMLContainerFrame::AppendFrames ( nsIAtom aListName,
nsIFrame aFrameList 
) [virtual, inherited]

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

Reimplemented from nsFrame.

Definition at line 899 of file nsMathMLContainerFrame.cpp.

{
  if (aListName) {
    return NS_ERROR_INVALID_ARG;
  }
  if (aFrameList) {
    mFrames.AppendFrames(this, aFrameList);
    return ChildListChanged(nsIDOMMutationEvent::ADDITION);
  }
  return NS_OK;
}

Here is the call graph for this function:

PRBool nsIFrame::AreAncestorViewsVisible ( ) const [virtual, inherited]

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_IMETHODIMP nsMathMLContainerFrame::AttributeChanged ( nsIContent aChild,
PRInt32  aNameSpaceID,
nsIAtom aAttribute,
PRInt32  aModType 
) [virtual, inherited]

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.

Reimplemented from nsFrame.

Reimplemented in nsMathMLmfracFrame, nsMathMLmoFrame, nsMathMLTokenFrame, nsMathMLmfencedFrame, nsMathMLmoverFrame, nsMathMLmunderFrame, nsMathMLmunderoverFrame, and nsMathMLmstyleFrame.

Definition at line 955 of file nsMathMLContainerFrame.cpp.

{
  if (aAttribute == nsMathMLAtoms::mathcolor_      ||
      aAttribute == nsMathMLAtoms::color_          ||
      aAttribute == nsMathMLAtoms::mathsize_       ||
      aAttribute == nsMathMLAtoms::fontsize_       ||
      aAttribute == nsMathMLAtoms::fontfamily_     ||
      aAttribute == nsMathMLAtoms::mathbackground_ ||
      aAttribute == nsMathMLAtoms::background_) {
    MapAttributesIntoCSS(GetPresContext(), this);
  }

  return ReflowDirtyChild(GetPresContext()->PresShell(), nsnull);
}

Here is the call graph for this function:

void nsBox::BoundsCheck ( nsSize aMinSize,
nsSize aPrefSize,
nsSize aMaxSize 
) [static, inherited]

Definition at line 1275 of file nsBox.cpp.

{
   BoundsCheck(aMinSize.width, aPrefSize.width, aMaxSize.width);
   BoundsCheck(aMinSize.height, aPrefSize.height, aMaxSize.height);
}

Here is the caller graph for this function:

void nsBox::BoundsCheck ( nscoord aMinSize,
nscoord aPrefSize,
nscoord aMaxSize 
) [static, inherited]

Definition at line 1251 of file nsBox.cpp.

{
   if (aMax < aMin)
       aMax = aMin;

   if (aPref > aMax)
       aPref = aMax;

   if (aPref < aMin)
       aPref = aMin;
}
void nsBox::BoundsCheckMinMax ( nsSize aMinSize,
nsSize aMaxSize 
) [static, inherited]

Definition at line 1264 of file nsBox.cpp.

{
  if (aMaxSize.width < aMinSize.width) {
    aMaxSize.width = aMinSize.width;
  }

  if (aMaxSize.height < aMinSize.height)
    aMaxSize.height = aMinSize.height;
}

Here is the caller graph for this function:

nsBoxLayoutMetrics * nsFrame::BoxMetrics ( ) const [protected, inherited]

Definition at line 5770 of file nsFrame.cpp.

{
  nsBoxLayoutMetrics* metrics =
    NS_STATIC_CAST(nsBoxLayoutMetrics*, GetProperty(nsLayoutAtoms::boxMetricsProperty));
  NS_ASSERTION(metrics, "A box layout method was called but InitBoxMetrics was never called");
  return metrics;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsSplittableFrame::BreakFromPrevFlow ( nsIFrame aFrame) [static, inherited]

Definition at line 144 of file nsSplittableFrame.cpp.

{
  nsIFrame* prevInFlow = aFrame->GetPrevInFlow();
  if (prevInFlow) {
    prevInFlow->SetNextInFlow(nsnull);
    aFrame->SetPrevInFlow(nsnull);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsFrame::CalcBorderPadding ( nsMargin aBorderPadding) const [virtual, inherited]

Implements nsIFrame.

Definition at line 686 of file nsFrame.cpp.

                                                                        {
  NS_ASSERTION(mStyleContext!=nsnull,"null style context");
  if (mStyleContext) {
    nsStyleBorderPadding bpad;
    mStyleContext->GetBorderPaddingFor(bpad);
    if (!bpad.GetBorderPadding(aBorderPadding)) {
      const nsStylePadding* paddingStyle = GetStylePadding();
      paddingStyle->CalcPaddingFor(this, aBorderPadding);
      const nsStyleBorder* borderStyle = GetStyleBorder();
      aBorderPadding += borderStyle->GetBorder();
    }
    return NS_OK;
  }
  return NS_ERROR_FAILURE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nscoord nsMathMLFrame::CalcLength ( nsPresContext aPresContext,
nsStyleContext aStyleContext,
const nsCSSValue aCSSValue 
) [static, inherited]

Definition at line 418 of file nsMathMLFrame.cpp.

{
  NS_ASSERTION(aCSSValue.IsLengthUnit(), "not a length unit");

  if (aCSSValue.IsFixedLengthUnit()) {
    return aCSSValue.GetLengthTwips();
  }

  nsCSSUnit unit = aCSSValue.GetUnit();

  if (eCSSUnit_Pixel == unit) {
    return NSFloatPixelsToTwips(aCSSValue.GetFloatValue(),
                                aPresContext->ScaledPixelsToTwips());
  }
  else if (eCSSUnit_EM == unit) {
    const nsStyleFont* font = aStyleContext->GetStyleFont();
    return NSToCoordRound(aCSSValue.GetFloatValue() * (float)font->mFont.size);
  }
  else if (eCSSUnit_XHeight == unit) {
    nscoord xHeight;
    const nsStyleFont* font = aStyleContext->GetStyleFont();
    nsCOMPtr<nsIFontMetrics> fm = aPresContext->GetMetricsFor(font->mFont);
    fm->GetXHeight(xHeight);
    return NSToCoordRound(aCSSValue.GetFloatValue() * (float)xHeight);
  }

  return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsFrame::CanContinueTextRun ( PRBool aContinueTextRun) const [virtual, inherited]

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.

Implements nsIFrame.

Reimplemented in nsTextFrame, and nsHTMLCanvasFrame.

Definition at line 2218 of file nsFrame.cpp.

{
  // By default, a frame will *not* allow a text run to be continued
  // through it.
  aContinueTextRun = PR_FALSE;
  return NS_OK;
}
virtual PRBool nsIFrame::CanPaintBackground ( ) [inline, virtual, inherited]

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_IMETHODIMP nsFrame::CaptureMouse ( nsPresContext aPresContext,
PRBool  aGrabMouseEvents 
) [virtual, inherited]

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

Implements nsIFrame.

Definition at line 4706 of file nsFrame.cpp.

{
  // get its view
  nsIView* view = GetNearestCapturingView(this);
  if (!view) {
    return NS_ERROR_FAILURE;
  }

  nsIViewManager* viewMan = view->GetViewManager();
  if (!viewMan) {
    return NS_ERROR_FAILURE;
  }

  if (aGrabMouseEvents) {
    PRBool result;
    viewMan->GrabMouseEvents(view, result);
  } else {
    PRBool result;
    viewMan->GrabMouseEvents(nsnull, result);
  }

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsFrame::CharacterDataChanged ( nsPresContext aPresContext,
nsIContent aChild,
PRBool  aAppend 
) [virtual, inherited]

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

Implements nsIFrame.

Reimplemented in nsTextFrame, nsSVGGlyphFrame, and nsLeafBoxFrame.

Definition at line 2264 of file nsFrame.cpp.

{
  NS_NOTREACHED("should only be called for text frames");
  return NS_OK;
}
void nsFrame::CheckInvalidateSizeChange ( nsPresContext aPresContext,
nsHTMLReflowMetrics aDesiredSize,
const nsHTMLReflowState aReflowState 
) [inherited]

Helper method to invalidate portions of a standard container frame if the reflow state indicates that the size has changed (specifically border, background and outline).

We assume that the difference between the old frame area and the new frame area is invalidated by some other means.

Parameters:
aPresContextthe presentation context
aDesiredSizethe new size of the frame
aReflowStatethe reflow that was just done on this frame

Definition at line 2652 of file nsFrame.cpp.

{
  if (aDesiredSize.width == mRect.width
      && aDesiredSize.height == mRect.height)
    return;

  // Below, we invalidate the old frame area (or, in the case of
  // outline, combined area) if the outline, border or background
  // settings indicate that something other than the difference
  // between the old and new areas needs to be painted. We are
  // assuming that the difference between the old and new areas will
  // be invalidated by some other means. That also means invalidating
  // the old frame area is the same as invalidating the new frame area
  // (since in either case the UNION of old and new areas will be
  // invalidated)

  // Invalidate the entire old frame+outline if the frame has an outline
  PRBool anyOutline;
  nsRect r = ComputeOutlineRect(this, &anyOutline,
                                aDesiredSize.mOverflowArea);
  if (anyOutline) {
    Invalidate(r);
    return;
  }

  // Invalidate the old frame borders if the frame has borders. Those borders
  // may be moving.
  const nsStyleBorder* border = GetStyleBorder();
  NS_FOR_CSS_SIDES(side) {
    if (border->GetBorderWidth(side) != 0) {
      Invalidate(nsRect(0, 0, mRect.width, mRect.height));
      return;
    }
  }

  // Invalidate the old frame background if the frame has a background
  // whose position depends on the size of the frame
  const nsStyleBackground* background = GetStyleBackground();
  if (background->mBackgroundFlags &
      (NS_STYLE_BG_X_POSITION_PERCENT | NS_STYLE_BG_Y_POSITION_PERCENT)) {
    Invalidate(nsRect(0, 0, mRect.width, mRect.height));
    return;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsFrame::CheckVisibility ( nsPresContext aContext,
PRInt32  aStartIndex,
PRInt32  aEndIndex,
PRBool  aRecurse,
PRBool aFinished,
PRBool _retval 
) [virtual, inherited]

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.

Implements nsIFrame.

Reimplemented in nsTextFrame.

Definition at line 4035 of file nsFrame.cpp.

nsresult nsMathMLContainerFrame::ChildListChanged ( PRInt32  aModType) [virtual, inherited]

Reimplemented in nsMathMLmfencedFrame.

Definition at line 879 of file nsMathMLContainerFrame.cpp.

{
  // If this is an embellished frame we need to rebuild the
  // embellished hierarchy by walking-up to the parent of the
  // outermost embellished container.
  nsIFrame* frame = this;
  if (mEmbellishData.coreFrame) {
    nsIFrame* parent = mParent;
    nsEmbellishData embellishData;
    for ( ; parent; frame = parent, parent = parent->GetParent()) {
      frame->AddStateBits(NS_FRAME_IS_DIRTY | NS_FRAME_HAS_DIRTY_CHILDREN);
      GetEmbellishDataFrom(parent, embellishData);
      if (embellishData.coreFrame != mEmbellishData.coreFrame)
        break;
    }
  }
  return ReLayoutChildren(frame);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsBox::ChildrenMustHaveWidgets ( PRBool aMust) const [virtual, inherited]

Hack for deck who requires that all its children has widgets.

Implements nsIFrame.

Reimplemented in nsDeckFrame.

Definition at line 160 of file nsBox.cpp.

{
  aMust = PR_FALSE;
  return NS_OK;
}
virtual PRBool nsFrame::ComputesOwnOverflowArea ( ) [inline, virtual, inherited]

Implements nsBox.

Reimplemented in nsBoxFrame, and nsLeafBoxFrame.

Definition at line 152 of file nsFrame.h.

{ return PR_TRUE; }
void nsFrame::ConsiderChildOverflow ( nsRect aOverflowArea,
nsIFrame aChildFrame 
) [inherited]

Definition at line 4452 of file nsFrame.cpp.

{
  const nsStyleDisplay* disp = GetStyleDisplay();
  // check here also for hidden as table frames (table, tr and td) currently 
  // don't wrap their content into a scrollable frame if overflow is specified
  if (!disp->IsTableClip()) {
    nsRect* overflowArea = aChildFrame->GetOverflowAreaProperty();
    if (overflowArea) {
      nsRect childOverflow(*overflowArea);
      childOverflow.MoveBy(aChildFrame->GetPosition());
      aOverflowArea.UnionRect(aOverflowArea, childOverflow);
    }
    else {
      aOverflowArea.UnionRect(aOverflowArea, aChildFrame->GetRect());
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsBox::CoordNeedsRecalc ( nscoord aCoord) [inherited]

Definition at line 640 of file nsBox.cpp.

{
  aFlex = -1;
}

Here is the caller graph for this function:

nsIFrame * nsFrame::CorrectStyleParentFrame ( nsIFrame aProspectiveParent,
nsIAtom aChildPseudo 
) [static, inherited]

Adjust the given parent frame to the right style context parent frame for the child, given the pseudo-type of the prospective child.

This handles things like walking out of table pseudos and so forth.

Parameters:
aProspectiveParentwhat GetParent() on the child returns. Must not be null.
aChildPseudothe child's pseudo type, if any.

Definition at line 4557 of file nsFrame.cpp.

{
  NS_PRECONDITION(aProspectiveParent, "Must have a prospective parent");

  // Anon boxes are parented to their actual parent already, except
  // for non-elements.  Those should not be treated as an anon box.
  if (aChildPseudo && aChildPseudo != nsCSSAnonBoxes::mozNonElement &&
      nsCSSAnonBoxes::IsAnonBox(aChildPseudo)) {
    NS_ASSERTION(aChildPseudo != nsCSSAnonBoxes::mozAnonymousBlock &&
                 aChildPseudo != nsCSSAnonBoxes::mozAnonymousPositionedBlock,
                 "Should have dealt with kids that have NS_FRAME_IS_SPECIAL "
                 "elsewhere");
    return aProspectiveParent;
  }

  // Otherwise, walk up out of all anon boxes
  nsIFrame* parent = aProspectiveParent;
  do {
    if (parent->GetStateBits() & NS_FRAME_IS_SPECIAL) {
      nsIFrame* sibling;
      nsresult rv =
        GetIBSpecialSibling(parent->GetPresContext(), parent, &sibling);
      if (NS_FAILED(rv)) {
        // If GetIBSpecialSibling fails, then what?  we used to return what is
        // now |aProspectiveParent|, but maybe |parent| would make more sense?
        NS_NOTREACHED("Shouldn't get here");
        return aProspectiveParent;
      }

      if (sibling) {
        // |parent| was the block in an {ib} split; use the inline as
        // |the style parent.
        parent = sibling;
      }
    }
      
    nsIAtom* parentPseudo = parent->GetStyleContext()->GetPseudoType();
    if (!parentPseudo || !nsCSSAnonBoxes::IsAnonBox(parentPseudo) ||
        parentPseudo == nsCSSAnonBoxes::dummyOption) {
      return parent;
    }

    parent = parent->GetParent();
  } while (parent);

  // We can get here if aProspectiveParent is the scrollframe for a viewport
  // and the kids are the anonymous scrollbars.
  NS_ASSERTION(aProspectiveParent->GetStyleContext()->GetPseudoType() ==
               nsCSSAnonBoxes::viewportScroll,
               "Should have found a parent before this");
  return aProspectiveParent;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsHTMLContainerFrame::CreateNextInFlow ( nsPresContext aPresContext,
nsIFrame aOuterFrame,
nsIFrame aFrame,
nsIFrame *&  aNextInFlowResult 
) [static, inherited]

Helper method to create next-in-flows if necessary.

Create a next-in-flow for aFrame.

If aFrame already has a next-in-flow then this method does nothing. Otherwise, a new continuation frame is created and linked into the flow. In addition, the new frame becomes the next-sibling of aFrame. If aPlaceholderResult is not null and aFrame is a float or positioned, then *aPlaceholderResult holds a placeholder.

Will return the newly created frame in aNextInFlowResult if and only if a new frame is created; otherwise nsnull is returned in aNextInFlowResult.

Definition at line 309 of file nsHTMLContainerFrame.cpp.

{
  aNextInFlowResult = nsnull;

  nsIFrame* nextInFlow = aFrame->GetNextInFlow();
  if (nsnull == nextInFlow) {
    // Create a continuation frame for the child frame and insert it
    // into our lines child list.
    nsIFrame* nextFrame = aFrame->GetNextSibling();

    nsresult rv = aPresContext->PresShell()->FrameConstructor()->
      CreateContinuingFrame(aPresContext, aFrame, aOuterFrame, &nextInFlow);
    if (NS_FAILED(rv)) {
      return rv;
    }
    aFrame->SetNextSibling(nextInFlow);
    nextInFlow->SetNextSibling(nextFrame);

    NS_FRAME_LOG(NS_FRAME_TRACE_NEW_FRAMES,
       ("nsHTMLContainerFrame::CreateNextInFlow: frame=%p nextInFlow=%p",
        aFrame, nextInFlow));

    aNextInFlowResult = nextInFlow;
  }
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsHTMLContainerFrame::CreateViewForFrame ( nsIFrame aFrame,
nsIFrame aContentParentFrame,
PRBool  aForce 
) [static, inherited]

Helper method to wrap views around frames.

Used by containers under special circumstances (can be used by leaf frames as well)

Parameters:
aContentParentFrameif non-null, this is the frame which would have held aFrame except that aFrame was reparented to an alternative geometric parent. This is necessary so that aFrame can remember to get its Z-order from aContentParentFrame.

Definition at line 505 of file nsHTMLContainerFrame.cpp.

{
  if (aFrame->HasView()) {
    return NS_OK;
  }

  // If we don't yet have a view, see if we need a view
  if (!(aForce || FrameNeedsView(aFrame))) {
    // don't need a view
    return NS_OK;
  }

  nsIView* parentView = aFrame->GetParent()->GetParentViewForChildFrame(aFrame);
  NS_ASSERTION(parentView, "no parent with view");

  nsIViewManager* viewManager = parentView->GetViewManager();
  NS_ASSERTION(viewManager, "null view manager");
    
  // Create a view
  nsIView* view = viewManager->CreateView(aFrame->GetRect(), parentView);
  if (!view)
    return NS_ERROR_OUT_OF_MEMORY;

  SyncFrameViewProperties(aFrame->GetPresContext(), aFrame, nsnull, view);

  // Insert the view into the view hierarchy. If the parent view is a
  // scrolling view we need to do this differently
  nsIScrollableView*  scrollingView = parentView->ToScrollableView();
  if (scrollingView) {
    scrollingView->SetScrolledView(view);
  } else {
    nsIView* insertBefore = nsLayoutUtils::FindSiblingViewFor(parentView, aFrame);
    // we insert this view 'above' the insertBefore view, unless insertBefore is null,
    // in which case we want to call with aAbove == PR_FALSE to insert at the beginning
    // in document order
    viewManager->InsertChild(parentView, view, insertBefore, insertBefore != nsnull);

    if (nsnull != aContentParentFrame) {
      nsIView* zParentView = aContentParentFrame->GetClosestView();
      if (zParentView != parentView) {
        insertBefore = nsLayoutUtils::FindSiblingViewFor(zParentView, aFrame);
        viewManager->InsertZPlaceholder(zParentView, view, insertBefore, insertBefore != nsnull);
      }
    }
  }

  // XXX If it's fixed positioned, then create a widget so it floats
  // above the scrolling area
  const nsStyleDisplay* display = aFrame->GetStyleContext()->GetStyleDisplay();
  if (NS_STYLE_POSITION_FIXED == display->mPosition) {
    aFrame->CreateWidgetForView(view);
  }

  // Reparent views on any child frames (or their descendants) to this
  // view. We can just call ReparentFrameViewTo on this frame because
  // we know this frame has no view, so it will crawl the children. Also,
  // we know that any descendants with views must have 'parentView' as their
  // parent view.
  ReparentFrameViewTo(aFrame, viewManager, view, parentView);

  // Remember our view
  aFrame->SetView(view);

  NS_FRAME_LOG(NS_FRAME_TRACE_CALLS,
               ("nsHTMLContainerFrame::CreateViewForFrame: frame=%p view=%p",
                aFrame));
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsIFrame::CreateWidgetForView ( nsIView aView) [virtual, inherited]

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:

void nsContainerFrame::DeleteNextInFlowChild ( nsPresContext aPresContext,
nsIFrame aNextInFlow 
) [virtual, inherited]

Remove and delete aNextInFlow and its next-in-flows.

Updates the sibling and flow pointers

Definition at line 1036 of file nsContainerFrame.cpp.

{
  nsIFrame* prevInFlow = aNextInFlow->GetPrevInFlow();
  NS_PRECONDITION(prevInFlow, "bad prev-in-flow");
  NS_PRECONDITION(mFrames.ContainsFrame(aNextInFlow), "bad geometric parent");

  // If the next-in-flow has a next-in-flow then delete it, too (and
  // delete it first).
  // Do this in a loop so we don't overflow the stack for frames
  // with very many next-in-flows
  nsIFrame* nextNextInFlow = aNextInFlow->GetNextInFlow();
  if (nextNextInFlow) {
    nsAutoVoidArray frames;
    for (nsIFrame* f = nextNextInFlow; f; f = f->GetNextInFlow()) {
      frames.AppendElement(f);
    }
    for (PRInt32 i = frames.Count() - 1; i >= 0; --i) {
      nsIFrame* delFrame = NS_STATIC_CAST(nsIFrame*, frames.ElementAt(i));
      NS_STATIC_CAST(nsContainerFrame*, delFrame->GetParent())
        ->DeleteNextInFlowChild(aPresContext, delFrame);
    }
  }

#ifdef IBMBIDI
  if ((prevInFlow->GetStateBits() & NS_FRAME_IS_BIDI) &&
      (NS_STATIC_CAST(nsIFrame*,
                      aPresContext->PropertyTable()->GetProperty(prevInFlow, nsLayoutAtoms::nextBidi)) ==
       aNextInFlow)) {
    return;
  }
#endif // IBMBIDI

  // Disconnect the next-in-flow from the flow list
  nsSplittableFrame::BreakFromPrevFlow(aNextInFlow);

  // Take the next-in-flow out of the parent's child list
  PRBool result = mFrames.RemoveFrame(aNextInFlow);
  if (!result) {
    // We didn't find the child in the parent's principal child list.
    // Maybe it's on the overflow list?
    nsFrameList overflowFrames(GetOverflowFrames(aPresContext, PR_TRUE));

    if (overflowFrames.IsEmpty() || !overflowFrames.RemoveFrame(aNextInFlow)) {
      NS_ASSERTION(result, "failed to remove frame");
    }

    // Set the overflow property again
    if (overflowFrames.NotEmpty()) {
      SetOverflowFrames(aPresContext, overflowFrames.FirstChild());
    }
  }

  // Delete the next-in-flow frame and its descendants.
  aNextInFlow->Destroy(aPresContext);

  NS_POSTCONDITION(!prevInFlow->GetNextInFlow(), "non null next-in-flow");
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsContainerFrame::Destroy ( nsPresContext aPresContext) [virtual, inherited]

Destroys this frame and each of its child frames (recursively calls Destroy() for each child)

Reimplemented from nsSplittableFrame.

Reimplemented in nsXULScrollFrame, nsTableFrame, nsBoxFrame, nsHTMLScrollFrame, nsMenuPopupFrame, nsSliderFrame, nsMenuFrame, nsListControlFrame, nsMenuBarFrame, nsPopupSetFrame, CanvasFrame, nsTableOuterFrame, nsNativeScrollbarFrame, nsTextControlFrame, nsListBoxBodyFrame, nsAutoRepeatBoxFrame, ViewportFrame, nsHTMLButtonControlFrame, nsScrollbarButtonFrame, and nsTreeColFrame.

Definition at line 143 of file nsContainerFrame.cpp.

{
  // Prevent event dispatch during destruction
  if (HasView()) {
    GetView()->SetClientData(nsnull);
  }

  if (mState & NS_FRAME_GENERATED_CONTENT) {
    nsIAtom* type = GetType();
    if (type == nsLayoutAtoms::inlineFrame ||
        type== nsLayoutAtoms::blockFrame) {
      // Make sure all the content nodes for the generated content inside
      // this frame know it's going away.
      // XXXbz would this be better done via a global structure in
      // nsCSSFrameConstructor that could key off of
      // GeneratedContentFrameRemoved or something?  The problem is that
      // our kids are gone by the time that's called.
      ::CleanupGeneratedContentIn(mContent, this);
    }
  }
  
  // Delete the primary child list
  mFrames.DestroyFrames(aPresContext);
  
  // Destroy overflow frames now
  nsFrameList overflowFrames(GetOverflowFrames(aPresContext, PR_TRUE));
  overflowFrames.DestroyFrames(aPresContext);

  // Destroy the frame and remove the flow pointers
  return nsSplittableFrame::Destroy(aPresContext);
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHOD nsMathMLContainerFrame::DidReflow ( nsPresContext aPresContext,
const nsHTMLReflowState aReflowState,
nsDidReflowStatus  aStatus 
) [inline, virtual, inherited]

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?

Reimplemented from nsFrame.

Definition at line 161 of file nsMathMLContainerFrame.h.

NS_IMETHODIMP nsFrame::DidSetStyleContext ( nsPresContext aPresContext) [protected, virtual, inherited]

Implements nsIFrame.

Reimplemented in nsSVGGradientFrame, nsSVGTextFrame, nsSVGGlyphFrame, nsSVGStopFrame, nsImageBoxFrame, nsSVGPathGeometryFrame, and nsBulletFrame.

Definition at line 681 of file nsFrame.cpp.

{
  return NS_OK;
}

Here is the caller graph for this function:

PRInt16 nsFrame::DisplaySelection ( nsPresContext aPresContext,
PRBool  isOkToTurnOn = PR_FALSE 
) [protected, inherited]

Definition at line 747 of file nsFrame.cpp.

{
  PRInt16 selType = nsISelectionController::SELECTION_OFF;

  nsCOMPtr<nsISelectionController> selCon;
  nsresult result = GetSelectionController(aPresContext, getter_AddRefs(selCon));
  if (NS_SUCCEEDED(result) && selCon) {
    result = selCon->GetDisplaySelection(&selType);
    if (NS_SUCCEEDED(result) && (selType != nsISelectionController::SELECTION_OFF)) {
      // Check whether style allows selection.
      PRBool selectable;
      IsSelectable(&selectable, nsnull);
      if (!selectable) {
        selType = nsISelectionController::SELECTION_OFF;
        isOkToTurnOn = PR_FALSE;
      }
    }
    if (isOkToTurnOn && (selType == nsISelectionController::SELECTION_OFF)) {
      selCon->SetDisplaySelection(nsISelectionController::SELECTION_ON);
      selType = nsISelectionController::SELECTION_ON;
    }
  }
  return selType;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsBox::DoesClipChildren ( ) [virtual, inherited]

Returns PR_TRUE if this box clips its children, e.g., if this box is an sc rollbox.

Reimplemented in nsXULScrollFrame, nsHTMLScrollFrame, and nsScrollbarFrame.

Definition at line 808 of file nsBox.cpp.

{
  const nsStyleDisplay* display = GetStyleDisplay();
  NS_ASSERTION((display->mOverflowY == NS_STYLE_OVERFLOW_CLIP) ==
               (display->mOverflowX == NS_STYLE_OVERFLOW_CLIP),
               "If one overflow is clip, the other should be too");
  return display->mOverflowX == NS_STYLE_OVERFLOW_CLIP;
}
PRBool nsBox::DoesNeedRecalc ( const nsSize aSize) [inherited]

Definition at line 646 of file nsBox.cpp.

{
  return (aSize.width == -1 || aSize.height == -1);
}

Here is the caller graph for this function:

PRBool nsBox::DoesNeedRecalc ( nscoord  aCoord) [inherited]

Definition at line 652 of file nsBox.cpp.

{
  return (aCoord == -1);
}
nsresult nsFrame::DoGetParentStyleContextFrame ( nsPresContext aPresContext,
nsIFrame **  aProviderFrame,
PRBool aIsChild 
) [inherited]

Definition at line 4612 of file nsFrame.cpp.

{
  *aIsChild = PR_FALSE;
  *aProviderFrame = nsnull;
  if (mContent && !mContent->GetParent() &&
      !GetStyleContext()->GetPseudoType()) {
    // we're a frame for the root.  We have no style context parent.
    return NS_OK;
  }
  
  if (!(mState & NS_FRAME_OUT_OF_FLOW)) {
    /*
     * If this frame is the anonymous block created when an inline
     * with a block inside it got split, then the parent style context
     * is on the first of the three special frames.  We can get to it
     * using GetIBSpecialSibling
     */
    if (mState & NS_FRAME_IS_SPECIAL) {
      nsresult rv = GetIBSpecialSibling(aPresContext, this, aProviderFrame);
      if (NS_FAILED(rv)) {
        NS_NOTREACHED("Shouldn't get here");
        *aProviderFrame = nsnull;
        return rv;
      }

      if (*aProviderFrame) {
        return NS_OK;
      }
    }

    // If this frame is one of the blocks that split an inline, we must
    // return the "special" inline parent, i.e., the parent that this
    // frame would have if we didn't mangle the frame structure.
    return GetCorrectedParent(aPresContext, this, aProviderFrame);
  }

  // For out-of-flow frames, we must resolve underneath the
  // placeholder's parent.
  nsIFrame *placeholder =
    aPresContext->FrameManager()->GetPlaceholderFrameFor(this);
  if (!placeholder) {
    NS_NOTREACHED("no placeholder frame for out-of-flow frame");
    GetCorrectedParent(aPresContext, this, aProviderFrame);
    return NS_ERROR_FAILURE;
  }
  return NS_STATIC_CAST(nsFrame*, placeholder)->
    GetParentStyleContextFrame(aPresContext, aProviderFrame, aIsChild);
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsFrame::DoLayout ( nsBoxLayoutState aBoxLayoutState) [protected, inherited]

Reimplemented from nsBox.

Reimplemented in nsXULScrollFrame, nsSliderFrame, nsBoxFrame, nsMenuFrame, nsLeafBoxFrame, nsPopupSetFrame, nsListBoxBodyFrame, nsSplitterFrame, nsDeckFrame, and nsTextBoxFrame.

Definition at line 5221 of file nsFrame.cpp.

{
  nsRect ourRect(mRect);

  const nsHTMLReflowState* reflowState = aState.GetReflowState();
  nsPresContext* presContext = aState.PresContext();
  nsReflowStatus status = NS_FRAME_COMPLETE;
  nsHTMLReflowMetrics desiredSize(PR_FALSE);
  nsresult rv = NS_OK;
 
  if (reflowState) {

    nscoord* currentMEW = aState.GetMaxElementWidth();

    if (currentMEW) {
      desiredSize.mComputeMEW = PR_TRUE;
    }

    rv = BoxReflow(aState, presContext, desiredSize, *reflowState, status,
                   ourRect.x, ourRect.y, ourRect.width, ourRect.height);

    if (currentMEW && desiredSize.mMaxElementWidth > *currentMEW) {
      *currentMEW = desiredSize.mMaxElementWidth;
    }

    PRBool collapsed = PR_FALSE;
    IsCollapsed(aState, collapsed);
    if (collapsed) {
      SetSize(nsSize(0, 0));
    } else {

      // if our child needs to be bigger. This might happend with
      // wrapping text. There is no way to predict its height until we
      // reflow it. Now that we know the height reshuffle upward.
      if (desiredSize.width > ourRect.width ||
          desiredSize.height > ourRect.height) {

#ifdef DEBUG_GROW
        DumpBox(stdout);
        printf(" GREW from (%d,%d) -> (%d,%d)\n",
               ourRect.width, ourRect.height,
               desiredSize.width, desiredSize.height);
#endif

        if (desiredSize.width > ourRect.width)
          ourRect.width = desiredSize.width;

        if (desiredSize.height > ourRect.height)
          ourRect.height = desiredSize.height;
      }

      // ensure our size is what we think is should be. Someone could have
      // reset the frame to be smaller or something dumb like that. 
      SetSize(nsSize(ourRect.width, ourRect.height));
    }
  }

  SyncLayout(aState);

  return rv;
}

Here is the call graph for this function:

void nsFrame::FillCursorInformationFromStyle ( const nsStyleUserInterface ui,
nsIFrame::Cursor aCursor 
) [static, protected, inherited]

Definition at line 4861 of file nsFrame.cpp.

{
  aCursor.mCursor = ui->mCursor;
  aCursor.mHaveHotspot = PR_FALSE;
  aCursor.mHotspotX = aCursor.mHotspotY = 0.0f;

  for (nsCursorImage *item = ui->mCursorArray,
                 *item_end = ui->mCursorArray + ui->mCursorArrayLength;
       item < item_end; ++item) {
    PRUint32 status;
    nsresult rv = item->mImage->GetImageStatus(&status);
    if (NS_SUCCEEDED(rv) && (status & imgIRequest::STATUS_FRAME_COMPLETE)) {
      // This is the one we want
      item->mImage->GetImage(getter_AddRefs(aCursor.mContainer));
      aCursor.mHaveHotspot = item->mHaveHotspot;
      aCursor.mHotspotX = item->mHotspotX;
      aCursor.mHotspotY = item->mHotspotY;
      break;
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsMathMLContainerFrame::FinalizeReflow ( nsIRenderingContext aRenderingContext,
nsHTMLReflowMetrics aDesiredSize 
) [virtual, inherited]

Definition at line 437 of file nsMathMLContainerFrame.cpp.

{
  // During reflow, we use rect.x and rect.y as placeholders for the child's ascent
  // and descent in expectation of a stretch command. Hence we need to ensure that
  // a stretch command will actually be fired later on, after exiting from our
  // reflow. If the stretch is not fired, the rect.x, and rect.y will remain
  // with inappropriate data causing children to be improperly positioned.
  // This helper method checks to see if our parent will fire a stretch command
  // targeted at us. If not, we go ahead and fire an involutive stretch on
  // ourselves. This will clear all the rect.x and rect.y, and return our
  // desired size.


  // First, complete the post-reflow hook.
  // We use the information in our children rectangles to position them.
  // If placeOrigin==false, then Place() will not touch rect.x, and rect.y.
  // They will still be holding the ascent and descent for each child.

  // The first clause caters for any non-embellished container.
  // The second clause is for a container which won't fire stretch even though it is
  // embellished, e.g., as in <mfrac><mo>...</mo> ... </mfrac>, the test is convoluted
  // because it excludes the particular case of the core <mo>...</mo> itself.
  // (<mo> needs to fire stretch on its MathMLChar in any case to initialize it)
  PRBool placeOrigin = !NS_MATHML_IS_EMBELLISH_OPERATOR(mEmbellishData.flags) ||
                       (mEmbellishData.coreFrame != this && !mPresentationData.baseFrame &&
                        mEmbellishData.direction == NS_STRETCH_DIRECTION_UNSUPPORTED);
  Place(aRenderingContext, placeOrigin, aDesiredSize);

  if (!placeOrigin) {
    // This means the rect.x and rect.y of our children were not set!!
    // Don't go without checking to see if our parent will later fire a Stretch() command
    // targeted at us. The Stretch() will cause the rect.x and rect.y to clear...
    PRBool parentWillFireStretch = PR_FALSE;
    nsIMathMLFrame* mathMLFrame;
    mParent->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
    if (mathMLFrame) {
      nsEmbellishData embellishData;
      nsPresentationData presentationData;
      mathMLFrame->GetEmbellishData(embellishData);
      mathMLFrame->GetPresentationData(presentationData);
      if (NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(presentationData.flags) ||
          NS_MATHML_WILL_STRETCH_ALL_CHILDREN_HORIZONTALLY(presentationData.flags) ||
          (NS_MATHML_IS_EMBELLISH_OPERATOR(embellishData.flags)
            && presentationData.baseFrame == this))
      {
        parentWillFireStretch = PR_TRUE;
      }
    }
    if (!parentWillFireStretch) {
      // There is nobody who will fire the stretch for us, we do it ourselves!

      PRBool stretchAll =
        /* NS_MATHML_WILL_STRETCH_ALL_CHILDREN_VERTICALLY(mPresentationData.flags) || */
        NS_MATHML_WILL_STRETCH_ALL_CHILDREN_HORIZONTALLY(mPresentationData.flags);

      nsBoundingMetrics defaultSize;
      if (mEmbellishData.coreFrame == this /* case of a bare <mo>...</mo> itself */
          || stretchAll) { /* or <mover><mo>...</mo>...</mover>, or friends */
        // use our current size as computed earlier by Place()
        defaultSize = aDesiredSize.mBoundingMetrics;
      }
      else { /* case of <msup><mo>...</mo>...</msup> or friends */
        // compute a size that doesn't include embellishments
        GetPreferredStretchSize(aRenderingContext, 0, mEmbellishData.direction,
                                defaultSize);
      }
      Stretch(aRenderingContext, NS_STRETCH_DIRECTION_DEFAULT, defaultSize,
              aDesiredSize);
    }
  }
  if (aDesiredSize.mComputeMEW) {
    aDesiredSize.mMaxElementWidth = aDesiredSize.width;
  }
  // Also return our bounding metrics
  aDesiredSize.mBoundingMetrics = mBoundingMetrics;

  // see if we should fix the spacing
  FixInterFrameSpacing(aDesiredSize);

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsIFrame::FinishAndStoreOverflow ( nsRect aOverflowArea,
nsSize  aNewSize 
) [inherited]

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:

void nsIFrame::FinishAndStoreOverflow ( nsHTMLReflowMetrics aMetrics) [inline, inherited]

Definition at line 1156 of file nsIFrame.h.

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

Here is the call graph for this function:

nsresult nsContainerFrame::FinishReflowChild ( nsIFrame aKidFrame,
nsPresContext aPresContext,
const nsHTMLReflowState aReflowState,
nsHTMLReflowMetrics aDesiredSize,
nscoord  aX,
nscoord  aY,
PRUint32  aFlags 
) [static, inherited]

The second half of frame reflow.

Does the following:

  • sets the frame's bounds
  • sizes and positions (if requested) the frame's view. If the frame's final position differs from the current position and the frame itself does not have a view, then any child frames with views are positioned so they stay in sync
  • sets the view's visibility, opacity, content transparency, and clip
  • invoked the DidReflow() function

Flags: NS_FRAME_NO_MOVE_FRAME - don't move the frame. aX and aY are ignored in this case. Also implies NS_FRAME_NO_MOVE_VIEW NS_FRAME_NO_MOVE_VIEW - don't position the frame's view. Set this if you don't want to automatically sync the frame and view NS_FRAME_NO_SIZE_VIEW - don't size the frame's view

Definition at line 990 of file nsContainerFrame.cpp.

{
  nsPoint curOrigin = aKidFrame->GetPosition();
  nsRect  bounds(aX, aY, aDesiredSize.width, aDesiredSize.height);

  aKidFrame->SetRect(bounds);

  if (aKidFrame->HasView()) {
    nsIView* view = aKidFrame->GetView();
    // Make sure the frame's view is properly sized and positioned and has
    // things like opacity correct
    SyncFrameViewAfterReflow(aPresContext, aKidFrame, view,
                             &aDesiredSize.mOverflowArea,
                             aFlags);
  }

  if (!(aFlags & NS_FRAME_NO_MOVE_VIEW) &&
      (curOrigin.x != aX || curOrigin.y != aY)) {
    if (!aKidFrame->HasView()) {
      // If the frame has moved, then we need to make sure any child views are
      // correctly positioned
      PositionChildViews(aKidFrame);
    }

    // We also need to redraw everything associated with the frame
    // because if the frame's Reflow issued any invalidates, then they
    // will be at the wrong offset ... note that this includes
    // invalidates issued against the frame's children, so we need to
    // invalidate the overflow area too.
    aKidFrame->Invalidate(aDesiredSize.mOverflowArea);
  }
  
  return aKidFrame->DidReflow(aPresContext, aReflowState, NS_FRAME_REFLOW_FINISHED);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsFrame::FireDOMEvent ( const nsAString &  aDOMEventName,
nsIContent aContent = nsnull 
) [protected, inherited]

Definition at line 961 of file nsFrame.cpp.

{
  nsCOMPtr<nsIDOMNode> domNode = do_QueryInterface(aContent ? aContent : mContent);
  
  if (domNode) {
    nsPLDOMEvent *event = new nsPLDOMEvent(domNode, aDOMEventName);
    if (event && NS_FAILED(event->PostDOMEvent())) {
      PL_DestroyEvent(event);
    }
  }
}

Here is the call graph for this function:

Reimplemented in nsMathMLmfracFrame, nsMathMLmsqrtFrame, and nsMathMLmfencedFrame.

Definition at line 1438 of file nsMathMLContainerFrame.cpp.

{
  nscoord gap = 0;
  nsIContent* parentContent = mParent->GetContent();
  if (NS_UNLIKELY(!parentContent)) {
    return 0;
  }
  nsIAtom *parentTag = parentContent->Tag();
  if (parentTag == nsMathMLAtoms::math ||
      parentTag == nsMathMLAtoms::mtd_) {
    gap = GetInterFrameSpacingFor(mPresentationData.scriptLevel, mParent, this);
    // add our own italic correction
    nscoord leftCorrection = 0, italicCorrection = 0;
    GetItalicCorrection(mBoundingMetrics, leftCorrection, italicCorrection);
    gap += leftCorrection;
    // see if we should shift our children to account for the correction
    if (gap) {
      nsIFrame* childFrame = mFrames.FirstChild();
      while (childFrame) {
        childFrame->SetPosition(childFrame->GetPosition() + nsPoint(gap, 0));
        childFrame = childFrame->GetNextSibling();
      }
      mBoundingMetrics.leftBearing += gap;
      mBoundingMetrics.rightBearing += gap;
      mBoundingMetrics.width += gap;
      aDesiredSize.width += gap;
    }
    mBoundingMetrics.width += italicCorrection;
    aDesiredSize.width += italicCorrection;
  }
  return gap;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsContainerFrame::FrameNeedsView ( nsIFrame aFrame) [static, inherited]

Definition at line 816 of file nsContainerFrame.cpp.

{
  if (aFrame->NeedsView()) {
    return PR_TRUE;
  }

  nsStyleContext* sc = aFrame->GetStyleContext();
  const nsStyleDisplay* display = sc->GetStyleDisplay();
  if (display->mOpacity != 1.0f) {
    return PR_TRUE;
  }

  // See if the frame has a fixed background attachment
  const nsStyleBackground *color;
  PRBool isCanvas;
  PRBool hasBackground = 
    nsCSSRendering::FindBackground(aFrame->GetPresContext(),
                                   aFrame, &color, &isCanvas);
  if (hasBackground && color->HasFixedBackground()) {
    return PR_TRUE;
  }
    
  if (NS_STYLE_POSITION_RELATIVE == display->mPosition) {
    return PR_TRUE;
  } else if (display->IsAbsolutelyPositioned()) {
    return PR_TRUE;
  } 

  if (sc->GetPseudoType() == nsCSSAnonBoxes::scrolledContent) {
    return PR_TRUE;
  }

  // See if the frame is block-level and has 'overflow' set to
  // '-moz-hidden-unscrollable'. If so, then we need to give it a view
  // so clipping of any child views works correctly. Note that if it's
  // floated it is also block-level, but we can't trust that the style
  // context 'display' value is set correctly.
  if ((display->IsBlockLevel() || display->IsFloating()) &&
      (display->mOverflowX == NS_STYLE_OVERFLOW_CLIP)) {
    // XXX Check for the frame being a block frame and only force a view
    // in that case, because adding a view for box frames seems to cause
    // problems for XUL...
    nsIAtom* frameType = aFrame->GetType();
    if ((frameType == nsLayoutAtoms::blockFrame) ||
        (frameType == nsLayoutAtoms::areaFrame)) {
      return PR_TRUE;
    }
  }

  return PR_FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsIAtom * nsContainerFrame::GetAdditionalChildListName ( PRInt32  aIndex) const [virtual, inherited]

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.

Reimplemented from nsFrame.

Reimplemented in nsTableFrame, nsMenuFrame, nsTableOuterFrame, and ViewportFrame.

Definition at line 193 of file nsContainerFrame.cpp.

{
  if (aIndex == 0) {
    return nsLayoutAtoms::overflowList;
  } else {
    return nsnull;
  }
}
nsStyleContext * nsFrame::GetAdditionalStyleContext ( PRInt32  aIndex) const [virtual, inherited]

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.

Implements nsIFrame.

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

Definition at line 703 of file nsFrame.cpp.

{
  NS_PRECONDITION(aIndex >= 0, "invalid index number");
  return nsnull;
}
nsIFrame * nsIFrame::GetAncestorWithView ( ) const [inherited]

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:

nsIFrame * nsIFrame::GetAncestorWithViewExternal ( ) const [virtual, inherited]

Definition at line 2368 of file nsFrame.cpp.

{
  return GetAncestorWithView();
}

Here is the call graph for this function:

NS_IMETHODIMP nsFrame::GetAscent ( nsBoxLayoutState aBoxLayoutState,
nscoord aAscent 
) [virtual, inherited]

Reimplemented from nsBox.

Reimplemented in nsXULScrollFrame, nsBoxFrame, nsTextControlFrame, nsImageBoxFrame, nsLeafBoxFrame, and nsTextBoxFrame.

Definition at line 5194 of file nsFrame.cpp.

{
  nsBoxLayoutMetrics *metrics = BoxMetrics();
  if (!DoesNeedRecalc(metrics->mAscent)) {
    aAscent = metrics->mAscent;
    return NS_OK;
  }

  PRBool isCollapsed = PR_FALSE;
  IsCollapsed(aState, isCollapsed);
  if (isCollapsed) {
    metrics->mAscent = 0;
  } else {
    // Refresh our caches with new sizes.
    RefreshSizeCache(aState);
    metrics->mAscent = metrics->mBlockAscent;
    nsMargin m(0, 0, 0, 0);
    GetInset(m);
    metrics->mAscent += m.top;
  }

  aAscent = metrics->mAscent;

  return NS_OK;
}

Here is the call graph for this function:

nsresult nsMathMLFrame::GetAttribute ( nsIContent aContent,
nsIFrame aMathMLmstyleFrame,
nsIAtom aAttributeAtom,
nsString aValue 
) [static, inherited]

Definition at line 226 of file nsMathMLFrame.cpp.

{
  nsresult rv = NS_CONTENT_ATTR_NOT_THERE;

  // see if we can get the attribute from the content
  if (aContent) {
    rv = aContent->GetAttr(kNameSpaceID_None, aAttributeAtom, aValue);
  }

  if (NS_CONTENT_ATTR_NOT_THERE == rv) {
    // see if we can get the attribute from the mstyle frame
    if (aMathMLmstyleFrame) {
      nsIFrame* mstyleParent = aMathMLmstyleFrame->GetParent();

      nsPresentationData mstyleParentData;
      mstyleParentData.mstyle = nsnull;

      if (mstyleParent) {
        nsIMathMLFrame* mathMLFrame;
        mstyleParent->QueryInterface(NS_GET_IID(nsIMathMLFrame), (void**)&mathMLFrame);
        if (mathMLFrame) {
          mathMLFrame->GetPresentationData(mstyleParentData);
        }
      }

      // recurse all the way up into the <mstyle> hierarchy
      rv = GetAttribute(aMathMLmstyleFrame->GetContent(),
                     mstyleParentData.mstyle, aAttributeAtom, aValue);
    }
  }
  return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsMathMLFrame::GetAxisHeight ( nsIFontMetrics fm,
nscoord axisHeight 
) [inline, static, inherited]

Definition at line 385 of file nsMathMLFrame.h.

  {
    fm->GetXHeight (axisHeight);
    axisHeight = NSToCoordRound(250.000f/430.556f * axisHeight);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

void nsMathMLFrame::GetAxisHeight ( nsIRenderingContext aRenderingContext,
nsIFontMetrics aFontMetrics,
nscoord aAxisHeight 
) [static, inherited]

Definition at line 302 of file nsMathMLFrame.cpp.

{
  // get the bounding metrics of the minus sign, the rendering context
  // is assumed to have been set with the font of the current style context
#ifdef NS_DEBUG
  nsCOMPtr<nsIFontMetrics> currFontMetrics;
  aRenderingContext.GetFontMetrics(*getter_AddRefs(currFontMetrics));
  NS_ASSERTION(currFontMetrics->Font().Equals(aFontMetrics->Font()),
       "unexpected state");
#endif
  nscoord xHeight;
  aFontMetrics->GetXHeight(xHeight);
  PRUnichar minus = 0x2212; // not '-', but official Unicode minus sign
  nsBoundingMetrics bm;
  nsresult rv = aRenderingContext.GetBoundingMetrics(&minus, PRUint32(1), bm);
  if (NS_SUCCEEDED(rv)) {
    aAxisHeight = bm.ascent - (bm.ascent + bm.descent)/2;
  }
  if (NS_FAILED(rv) || aAxisHeight <= 0 || aAxisHeight >= xHeight) {
    // fall-back to the other version
    GetAxisHeight(aFontMetrics, aAxisHeight);
  }
}

Here is the call graph for this function:

static void nsMathMLFrame::GetBigOpSpacings ( nsIFontMetrics fm,
nscoord bigOpSpacing1,
nscoord bigOpSpacing2,
nscoord bigOpSpacing3,
nscoord bigOpSpacing4,
nscoord bigOpSpacing5 
) [inline, static, inherited]

Definition at line 393 of file nsMathMLFrame.h.

  {
    nscoord xHeight;
    fm->GetXHeight(xHeight);
    bigOpSpacing1 = NSToCoordRound(111.111f/430.556f * xHeight);
    bigOpSpacing2 = NSToCoordRound(166.667f/430.556f * xHeight);
    bigOpSpacing3 = NSToCoordRound(200.000f/430.556f * xHeight);
    bigOpSpacing4 = NSToCoordRound(600.000f/430.556f * xHeight);
    bigOpSpacing5 = NSToCoordRound(100.000f/430.556f * xHeight);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsBox::GetBorder ( nsMargin aBorderAndPadding) [virtual, inherited]

Implements nsIFrame.

Definition at line 553 of file nsBox.cpp.

{
  aMargin.SizeTo(0,0,0,0);
    
  const nsStyleDisplay* disp = GetStyleDisplay();
  if (disp->mAppearance && gTheme) {
    // Go to the theme for the border.
    nsPresContext *context = GetPresContext();
    if (gTheme->ThemeSupportsWidget(context, this, disp->mAppearance)) {
      nsMargin margin(0, 0, 0, 0);
      gTheme->GetWidgetBorder(context->DeviceContext(), this,
                              disp->mAppearance, &margin);
      float p2t = context->ScaledPixelsToTwips();
      aMargin.top = NSIntPixelsToTwips(margin.top, p2t);
      aMargin.right = NSIntPixelsToTwips(margin.right, p2t);
      aMargin.bottom = NSIntPixelsToTwips(margin.bottom, p2t);
      aMargin.left = NSIntPixelsToTwips(margin.left, p2t);
      return NS_OK;
    }
  }

  aMargin = GetStyleBorder()->GetBorder();

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsIFrame::GetBorderAndPadding ( nsMargin aBorderAndPadding) [inherited]

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:

NS_IMETHOD nsMathMLFrame::GetBoundingMetrics ( nsBoundingMetrics &  aBoundingMetrics) [inline, virtual, inherited]

Implements nsIMathMLFrame.

Definition at line 75 of file nsMathMLFrame.h.

                                                          {
    aBoundingMetrics = mBoundingMetrics;
    return NS_OK;
  }
nsresult nsIFrame::GetChildBox ( nsIBox **  aBox) [inline, inherited]

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_IMETHODIMP nsFrame::GetChildFrameContainingOffset ( PRInt32  inContentOffset,
PRBool  inHint,
PRInt32 outFrameContentOffset,
nsIFrame **  outChildFrame 
) [virtual, inherited]

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.

Implements nsIFrame.

Reimplemented in nsTextFrame.

Definition at line 3198 of file nsFrame.cpp.

{
  NS_PRECONDITION(outChildFrame && outFrameContentOffset, "Null parameter");
  *outFrameContentOffset = (PRInt32)inHint;
  //the best frame to reflect any given offset would be a visible frame if possible
  //i.e. we are looking for a valid frame to place the blinking caret 
  nsRect rect = GetRect();
  if (!rect.width || !rect.height)
  {
    //if we have a 0 width or height then lets look for another frame that possibly has
    //the same content.  If we have no frames in flow then just let us return 'this' frame
    nsIFrame* nextFlow = GetNextInFlow();
    if (nextFlow)
      return nextFlow->GetChildFrameContainingOffset(inContentOffset, inHint, outFrameContentOffset, outChildFrame);
  }
  *outChildFrame = this;
  return NS_OK;
}

Here is the call graph for this function:

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

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, inherited]

Get the content object associated with this frame.

Does not add a reference.

Definition at line 547 of file nsIFrame.h.

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

Implements nsIFrame.

Reimplemented in nsTextFrame, nsXULScrollFrame, nsHTMLScrollFrame, and BRFrame.

Definition at line 1958 of file nsFrame.cpp.

{
  if (!aNewContent)
    return NS_ERROR_NULL_POINTER;

  // Traverse through children and look for the best one to give this
  // to if it fails the getposition call, make it yourself also only
  // look at primary list
  nsIFrame *closestFrame = nsnull;
  nsIView *view = GetClosestView();
  nsIFrame *kid = GetFirstChild(nsnull);

  if (kid) {
#define HUGE_DISTANCE 999999 //some HUGE number that will always fail first comparison

    PRInt32 closestXDistance = HUGE_DISTANCE;
    PRInt32 closestYDistance = HUGE_DISTANCE;

    while (nsnull != kid) {

      // Skip over generated content kid frames, or frames
      // that don't have a proper parent-child relationship!

      PRBool skipThisKid = (kid->GetStateBits() & NS_FRAME_GENERATED_CONTENT) != 0;
#if 0
      if (!skipThisKid) {
        // The frame's content is not generated. Now check
        // if it is anonymous content!

        nsIContent* kidContent = kid->GetContent();
        if (kidContent) {
          nsCOMPtr<nsIContent> content = kidContent->GetParent();

          if (content) {
            PRInt32 kidCount = content->ChildCount();
            PRInt32 kidIndex = content->IndexOf(kidContent);

            // IndexOf() should return -1 for the index if it doesn't
            // find kidContent in it's child list.

            if (kidIndex < 0 || kidIndex >= kidCount) {
              // Must be anonymous content! So skip it!
              skipThisKid = PR_TRUE;
            }
          }
        }
      }
#endif //XXX we USED to skip anonymous content i dont think we should anymore leaving this here as a flah

      if (skipThisKid) {
        kid = kid->GetNextSibling();
        continue;
      }

      // Kid frame has content that has a proper parent-child
      // relationship. Now see if the aPoint inside it's bounding
      // rect or close by.

      nsPoint offsetPoint(0,0);
      nsIView * kidView = nsnull;
      kid->GetOffsetFromView(offsetPoint, &kidView);

      nsRect rect = kid->GetRect();
      rect.x = offsetPoint.x;
      rect.y = offsetPoint.y;

      nscoord fromTop = aPoint.y - rect.y;
      nscoord fromBottom = aPoint.y - rect.y - rect.height;

      PRInt32 yDistance;
      if (fromTop > 0 && fromBottom < 0)
        yDistance = 0;
      else
        yDistance = PR_MIN(abs(fromTop), abs(fromBottom));

      if (yDistance <= closestYDistance && rect.width > 0 && rect.height > 0)
      {
        if (yDistance < closestYDistance)
          closestXDistance = HUGE_DISTANCE;

        nscoord fromLeft = aPoint.x - rect.x;
        nscoord fromRight = aPoint.x - rect.x - rect.width;

        PRInt32 xDistance;
        if (fromLeft > 0 && fromRight < 0)
          xDistance = 0;
        else
          xDistance = PR_MIN(abs(fromLeft), abs(fromRight));

        if (xDistance == 0 && yDistance == 0)
        {
          closestFrame = kid;
          break;
        }

        if (xDistance < closestXDistance || (xDistance == closestXDistance && rect.x <= aPoint.x))
        {
          // If we are only near (not directly over) then don't traverse a frame with independent
          // selection (e.g. text and list controls) unless we're already inside such a frame,
          // except in "browsewithcaret" mode, bug 268497.
          if (!(kid->GetStateBits() & NS_FRAME_INDEPENDENT_SELECTION) ||
              (GetStateBits() & NS_FRAME_INDEPENDENT_SELECTION) ||
              nsContentUtils::GetBoolPref("accessibility.browsewithcaret")) {
            closestXDistance = xDistance;
            closestYDistance = yDistance;
            closestFrame     = kid;
          }
        }
        // else if (xDistance > closestXDistance)
        //   break;//done
      }
    
      kid = kid->GetNextSibling();
    }
    if (closestFrame) {

      // If we cross a view boundary, we need to adjust
      // the coordinates because GetPosition() expects
      // them to be relative to the closest view.

      nsPoint newPoint     = aPoint;
      nsIView *closestView = closestFrame->GetClosestView();

      if (closestView && view != closestView)
        newPoint -= closestView->GetOffsetTo(view);

      // printf("      0x%.8x   0x%.8x  %4d  %4d\n",
      //        closestFrame, closestView, closestXDistance, closestYDistance);

      return closestFrame->GetContentAndOffsetsFromPoint(aCX, newPoint, aNewContent,
                                                         aContentOffset, aContentOffsetEnd,aBeginFrameContent);
    }
  }

  if (!mContent)
    return NS_ERROR_NULL_POINTER;

  nsPoint offsetPoint;
  GetOffsetFromView(offsetPoint, &view);
  nsRect thisRect = GetRect();
  thisRect.x = offsetPoint.x;
  thisRect.y = offsetPoint.y;

  NS_IF_ADDREF(*aNewContent = mContent->GetParent());
  if (*aNewContent){
    
    PRInt32 contentOffset(aContentOffset); //temp to hold old value in case of failure
    
    contentOffset = (*aNewContent)->IndexOf(mContent);
    if (contentOffset < 0) 
    {
      return NS_ERROR_FAILURE;
    }
    aContentOffset = contentOffset; //its clear save the result

    aBeginFrameContent = PR_TRUE;
    if (thisRect.Contains(aPoint))
      aContentOffsetEnd = aContentOffset +1;
    else 
    {
      //if we are a collapsed frame then dont check to see if we need to skip past this content
      //see bug http://bugzilla.mozilla.org/show_bug.cgi?id=103888
      if (thisRect.width && thisRect.height && ((thisRect.x + thisRect.width) < aPoint.x  || thisRect.y > aPoint.y))
      {
        aBeginFrameContent = PR_FALSE;
        aContentOffset++;
      }
      aContentOffsetEnd = aContentOffset;
    }
  }
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsFrame::GetContentForEvent ( nsPresContext aPresContext,
nsEvent aEvent,
nsIContent **  aContent 
) [virtual, inherited]

Implements nsIFrame.

Reimplemented in CanvasFrame, and nsHTMLCanvasFrame.

Definition at line 951 of file nsFrame.cpp.

{
  *aContent = GetContent();
  NS_IF_ADDREF(*aContent);
  return NS_OK;
}

Here is the call graph for this function:

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

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:

virtual already_AddRefed<nsIContent> nsIFrame::GetContentInsertionNode ( ) [inline, virtual, inherited]

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_IMETHODIMP nsFrame::GetCursor ( const nsPoint aPoint,
nsIFrame::Cursor aCursor 
) [virtual, inherited]

Get the cursor for a given frame.

Implements nsIFrame.

Reimplemented in nsTextFrame, nsHTMLFramesetBorderFrame, nsHTMLFramesetFrame, nsBoxFrame, nsTreeBodyFrame, and nsSplitterFrame.

Definition at line 2137 of file nsFrame.cpp.

{
  FillCursorInformationFromStyle(GetStyleUserInterface(), aCursor);
  if (NS_STYLE_CURSOR_AUTO == aCursor.mCursor) {
    aCursor.mCursor = NS_STYLE_CURSOR_DEFAULT;
  }


  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP nsFrame::GetDataForTableSelection ( nsIFrameSelection aFrameSelection,
nsIPresShell aPresShell,
nsMouseEvent aMouseEvent,
nsIContent **  aParentContent,
PRInt32 aContentOffset,
PRInt32 aTarget 
) [protected, inherited]

Definition at line 1002 of file nsFrame.cpp.

{
  if (!aFrameSelection || !aPresShell || !aMouseEvent || !aParentContent || !aContentOffset || !aTarget)
    return NS_ERROR_NULL_POINTER;

  *aParentContent = nsnull;
  *aContentOffset = 0;
  *aTarget = 0;

  PRInt16 displaySelection;
  nsresult result = aPresShell->GetSelectionFlags(&displaySelection);
  if (NS_FAILED(result))
    return result;

  PRBool selectingTableCells = PR_FALSE;
  aFrameSelection->GetTableCellSelection(&selectingTableCells);

  // DISPLAY_ALL means we're in an editor.
  // If already in cell selection mode, 
  //  continue selecting with mouse drag or end on mouse up,
  //  or when using shift key to extend block of cells
  //  (Mouse down does normal selection unless Ctrl/Cmd is pressed)
  PRBool doTableSelection =
     displaySelection == nsISelectionDisplay::DISPLAY_ALL && selectingTableCells &&
     (aMouseEvent->message == NS_MOUSE_MOVE ||
      aMouseEvent->message == NS_MOUSE_LEFT_BUTTON_UP || 
      aMouseEvent->isShift);

  if (!doTableSelection)
  {  
    // In Browser, special 'table selection' key must be pressed for table selection
    // or when just Shift is pressed and we're already in table/cell selection mode
#if defined(XP_MAC) || defined(XP_MACOSX)
    doTableSelection = aMouseEvent->isMeta || (aMouseEvent->isShift && selectingTableCells);
#else
    doTableSelection = aMouseEvent->isControl || (aMouseEvent->isShift && selectingTableCells);
#endif
  }
  if (!doTableSelection) 
    return NS_OK;

  // Get the cell frame or table frame (or parent) of the current content node
  nsIFrame *frame = this;
  PRBool foundCell = PR_FALSE;
  PRBool foundTable = PR_FALSE;

  // Get the limiting node to stop parent frame search
  nsCOMPtr<nsIContent> limiter;
  result = aFrameSelection->GetLimiter(getter_AddRefs(limiter));

  //We don't initiate row/col selection from here now,
  //  but we may in future
  //PRBool selectColumn = PR_FALSE;
  //PRBool selectRow = PR_FALSE;

  while (frame && NS_SUCCEEDED(result))
  {
    // Check for a table cell by querying to a known CellFrame interface
    nsITableCellLayout *cellElement;
    result = (frame)->QueryInterface(NS_GET_IID(nsITableCellLayout), (void **)&cellElement);
    if (NS_SUCCEEDED(result) && cellElement)
    {
      foundCell = PR_TRUE;
      //TODO: If we want to use proximity to top or left border
      //      for row and column selection, this is the place to do it
      break;
    }
    else
    {
      // If not a cell, check for table
      // This will happen when starting frame is the table or child of a table,
      //  such as a row (we were inbetween cells or in table border)
      nsITableLayout *tableElement;
      result = (frame)->QueryInterface(NS_GET_IID(nsITableLayout), (void **)&tableElement);
      if (NS_SUCCEEDED(result) && tableElement)
      {
        foundTable = PR_TRUE;
        //TODO: How can we select row when along left table edge
        //  or select column when along top edge?
        break;
      } else {
        frame = frame->GetParent();
        result = NS_OK;
        // Stop if we have hit the selection's limiting content node
        if (frame && frame->GetContent() == limiter.get())
          break;
      }
    }
  }
  // We aren't in a cell or table
  if (!foundCell && !foundTable) return NS_OK;

  nsIContent* tableOrCellContent = frame->GetContent();
  if (!tableOrCellContent) return NS_ERROR_FAILURE;

  nsCOMPtr<nsIContent> parentContent = tableOrCellContent->GetParent();
  if (!parentContent) return NS_ERROR_FAILURE;

  PRInt32 offset = parentContent->IndexOf(tableOrCellContent);
  // Not likely?
  if (offset < 0) return NS_ERROR_FAILURE;

  // Everything is OK -- set the return values
  *aParentContent = parentContent;
  NS_ADDREF(*aParentContent);

  *aContentOffset = offset;

#if 0
  if (selectRow)
    *aTarget = nsISelectionPrivate::TABLESELECTION_ROW;
  else if (selectColumn)
    *aTarget = nsISelectionPrivate::TABLESELECTION_COLUMN;
  else 
#endif
  if (foundCell)
    *aTarget = nsISelectionPrivate::TABLESELECTION_CELL;
  else if (foundTable)
    *aTarget = nsISelectionPrivate::TABLESELECTION_TABLE;

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

PRBool nsBox::GetDefaultFlex ( PRInt32 aFlex) [protected, virtual, inherited]

Definition at line 1363 of file nsBox.cpp.

{ 
  aFlex = 0; 
  return PR_TRUE; 
}

Here is the caller graph for this function:

static void nsMathMLFrame::GetDenominatorShifts ( nsIFontMetrics fm,
nscoord denShift1,
nscoord denShift2 
) [inline, static, inherited]

Definition at line 362 of file nsMathMLFrame.h.

  {
    nscoord xHeight;
    fm->GetXHeight(xHeight);
    denShift1 = NSToCoordRound(685.951f/430.556f * xHeight);
    denShift2 = NSToCoordRound(344.841f/430.556f * xHeight);
  }

Here is the call graph for this function:

Here is the caller graph for this function:

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

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:

NS_IMETHOD nsMathMLFrame::GetEmbellishData ( nsEmbellishData aEmbellishData) [inline, virtual, inherited]

Implements nsIMathMLFrame.

Definition at line 118 of file nsMathMLFrame.h.

                                                    {
    aEmbellishData = mEmbellishData;
    return NS_OK;
  }
void nsMathMLFrame::GetEmbellishDataFrom ( nsIFrame aFrame,
nsEmbellishData aEmbellishData 
) [static, inherited]

Definition at line 160 of file nsMathMLFrame.cpp.

{
  // initialize OUT params
  aEmbellishData.flags = 0;
  aEmbellishData.coreFrame = nsnull;
  aEmbellishData.direction = NS_STRETCH_DIRECTION_UNSUPPORTED;
  aEmbellishData.leftSpace = 0;
  aEmbellishData.rightSpace = 0;

  if (aFrame && aFrame->IsFrameOfType(nsIFrame::eMathML)) {
    nsIMathMLFrame* mathMLFrame;
    CallQueryInterface(aFrame, &mathMLFrame);
    if (mathMLFrame) {
      mathMLFrame->GetEmbellishData(aEmbellishData);
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void nsMathMLFrame::GetEmHeight ( nsIFontMetrics fm,
nscoord emHeight 
) [inline, static, inherited]

Definition at line 373 of file nsMathMLFrame.h.

  {
#if 0 
    // should switch to this API in order to scale with changes of TextZoom
    fm->GetEmHeight(emHeight);
#else
    emHeight = NSToCoordRound(float(fm->Font().size));
#endif
  }

Here is the call graph for this function:

Here is the caller 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:

nsIFrame * nsContainerFrame::GetFirstChild ( nsIAtom aListName) const [virtual, inherited]

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()

Reimplemented from nsFrame.

Reimplemented in nsTableFrame, nsMenuFrame, nsTableOuterFrame, and ViewportFrame.

Definition at line 179 of file nsContainerFrame.cpp.

{
  // We only know about the unnamed principal child list and the overflow
  // list
  if (nsnull == aListName) {
    return mFrames.FirstChild();
  } else if (nsLayoutAtoms::overflowList == aListName) {
    return GetOverflowFrames(GetPresContext(), PR_FALSE);
  } else {
    return nsnull;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsIFrame * nsSplittableFrame::GetFirstInFlow ( ) const [virtual, inherited]

Return the first frame in our current flow.

Reimplemented from nsIFrame.

Definition at line 103 of file nsSplittableFrame.cpp.

{
  nsSplittableFrame* firstInFlow = (nsSplittableFrame*)this;
  while (firstInFlow->mPrevInFlow)  {
    firstInFlow = (nsSplittableFrame*)firstInFlow->mPrevInFlow;
  }
  NS_POSTCONDITION(firstInFlow, "illegal state in flow chain.");
  return firstInFlow;
}

Here is the caller graph for this function:

void nsFrame::GetFirstLeaf ( nsPresContext aPresContext,
nsIFrame **  aFrame 
) [static, inherited]

Definition at line 4692 of file nsFrame.cpp.

{
  if (!aFrame || !*aFrame)
    return;
  nsIFrame *child = *aFrame;
  while (1){
    child = child->GetFirstChild(nsnull);
    if (!child)
      return;//nothing to do
    *aFrame = child;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsFrame::GetFlex ( nsBoxLayoutState aBoxLayoutState,
nscoord aFlex 
) [virtual, inherited]

Reimplemented from nsBox.

Reimplemented in nsBoxFrame, nsGridRowGroupFrame, and nsLeafBoxFrame.

Definition at line 5177 of file nsFrame.cpp.

{
  nsBoxLayoutMetrics *metrics = BoxMetrics();
  if (!DoesNeedRecalc(metrics->mFlex)) {
     aFlex = metrics->mFlex;
     return NS_OK;
  }

  metrics->mFlex = 0;
  nsBox::GetFlex(aState, metrics->mFlex);

  aFlex = metrics->mFlex;

  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP nsMathMLmactionFrame::GetFrameForPoint ( const nsPoint aPoint,
nsFramePaintLayer  aWhichLayer,
nsIFrame **  aFrame 
) [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.

Reimplemented from nsContainerFrame.

Definition at line 254 of file nsMathMLmactionFrame.cpp.

{
  nsIFrame* childFrame = GetSelectedFrame();
  if (childFrame) {
    nsPoint pt(aPoint.x - mRect.x, aPoint.y - mRect.y);
    return childFrame->GetFrameForPoint(pt, aWhichLayer, aFrame);
  }
  return nsFrame::GetFrameForPoint(aPoint, aWhichLayer, aFrame);
}

Here is the call graph for this function:

nsresult nsContainerFrame::GetFrameForPointUsing ( const nsPoint aPoint,
nsIAtom aList,
nsFramePaintLayer  aWhichLayer,
PRBool  aConsiderSelf,
nsIFrame **  aFrame 
) [protected, inherited]

Definition at line 309 of file nsContainerFrame.cpp.

{
  nsIFrame *hit;
  nsPoint tmp;

  PRBool inThisFrame = mRect.Contains(aPoint);

  if (! ((mState & NS_FRAME_OUTSIDE_CHILDREN) || inThisFrame ) ) {
    return NS_ERROR_FAILURE;
  }

  nsIFrame* kid = GetFirstChild(aList);
  *aFrame = nsnull;
  tmp.MoveTo(aPoint.x - mRect.x, aPoint.y - mRect.y);

  nsPoint originOffset;
  nsIView *view = nsnull;
  nsresult rv = GetOriginToViewOffset(originOffset, &view);

  if (NS_SUCCEEDED(rv) && view)
    tmp += originOffset;

  while (kid) {
    if (aWhichLayer == NS_FRAME_PAINT_LAYER_ALL) {
      // Check all layers on this kid before moving on to the next one
      rv = kid->GetFrameForPoint(tmp, NS_FRAME_PAINT_LAYER_FOREGROUND, &hit);
      if (NS_FAILED(rv) || !hit) {
        rv = kid->GetFrameForPoint(tmp, NS_FRAME_PAINT_LAYER_FLOATS, &hit);
        if (NS_FAILED(rv) || !hit) {
          rv = kid->GetFrameForPoint(tmp, NS_FRAME_PAINT_LAYER_BACKGROUND, &hit);
        }
      }
    } else {
      rv = kid->GetFrameForPoint(tmp, aWhichLayer, &hit);
    }

    if (NS_SUCCEEDED(rv) && hit) {
      *aFrame = hit;
    }
    kid = kid->GetNextSibling();
  }

  if (*aFrame) {
    return NS_OK;
  }

  if ( inThisFrame && aConsiderSelf ) {
    if (GetStyleVisibility()->IsVisible()) {
      *aFrame = this;
      return NS_OK;
    }
  }

  return NS_ERROR_FAILURE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsFrame::GetFrameFromDirection ( nsPresContext aPresContext,
nsPeekOffsetStruct aPos 
) [protected, inherited]

Definition at line 4071 of file nsFrame.cpp.

{
  nsIFrame *blockFrame = this;
  nsIFrame *thisBlock;
  PRInt32   thisLine;
  nsCOMPtr<nsILineIteratorNavigator> it; 
  PRBool preferLeft = aPos->mPreferLeft;
  nsresult result = NS_ERROR_FAILURE;
  while (NS_FAILED(result) && blockFrame)
  {
    thisBlock = blockFrame;
    blockFrame = blockFrame->GetParent();
    result = NS_OK;
    if (blockFrame) {
      result = blockFrame->QueryInterface(NS_GET_IID(nsILineIteratorNavigator),getter_AddRefs(it));
    }
  }
  if (!blockFrame || !it)
    return NS_ERROR_FAILURE;
  result = it->FindLineContaining(thisBlock, &thisLine);
  if (NS_FAILED(result))
    return result;

  nsIFrame *traversedFrame = this;

  nsIFrame *firstFrame;
  nsIFrame *lastFrame;
  nsRect  nonUsedRect;
  PRInt32 lineFrameCount;
  PRUint32 lineFlags;

#ifdef IBMBIDI
  /* Check whether the visual and logical order of the frames are different */
  PRBool lineIsReordered = PR_FALSE;
  nsIFrame *firstVisual;
  nsIFrame *lastVisual;
  PRBool lineIsRTL;
  PRBool lineJump = PR_FALSE;

  it->GetDirection(&lineIsRTL);
  result = it->CheckLineOrder(thisLine, &lineIsReordered, &firstVisual, &lastVisual);
  if (NS_FAILED(result))
    return result;

  if (lineIsReordered) {
    firstFrame = firstVisual;
    lastFrame = lastVisual;
  }
  else
#endif
  {
    result = it->GetLine(thisLine, &firstFrame, &lineFrameCount,nonUsedRect,
                         &lineFlags);
    if (NS_FAILED(result))
      return result;

    lastFrame = firstFrame;
    for (;lineFrameCount > 1;lineFrameCount --){
      result = it->GetNextSiblingOnLine(lastFrame, thisLine);
      if (NS_FAILED(result) || !lastFrame){
        NS_ASSERTION(0,"should not be reached nsFrame\n");
        return NS_ERROR_FAILURE;
      }
    }
  }

  GetFirstLeaf(aPresContext, &firstFrame);
  GetLastLeaf(aPresContext, &lastFrame);
  //END LINE DATA CODE
  if 
#ifndef IBMBIDI  // jumping lines in RTL paragraphs
      ((aPos->mDirection == eDirNext && lastFrame == this)
       ||(aPos->mDirection == eDirPrevious && firstFrame == this))
#else
      (((lineIsRTL) &&
        ((aPos->mDirection == eDirNext && firstFrame == this)
         ||(aPos->mDirection == eDirPrevious && lastFrame == this)))
       ||
       ((!lineIsRTL) &&
        ((aPos->mDirection == eDirNext && lastFrame == this)
         ||(aPos->mDirection == eDirPrevious && firstFrame == this))))
#endif
  {
    if (aPos->mJumpLines != PR_TRUE)
      return NS_ERROR_FAILURE;//we are done. cannot jump lines
#ifdef IBMBIDI
    lineJump = PR_TRUE;
#endif
    if (aPos->mAmount != eSelectWord)
    {
      preferLeft = (PRBool)!preferLeft;//drift to other side
      aPos->mAmount = eSelectNoAmount;
    }
    else{
      if (aPos->mEatingWS)//done finding what we wanted
        return NS_ERROR_FAILURE;
      if (aPos->mDirection == eDirNext)
      {
        preferLeft = (PRBool)!preferLeft;//drift to other side
      }
#ifdef IBMBIDI
      if (lineIsRTL)
        aPos->mAmount = eSelectNoAmount;
#endif
    }

  }
  if (aPos->mAmount == eSelectDir)
    aPos->mAmount = eSelectNoAmount;//just get to next frame.
  nsCOMPtr<nsIBidirectionalEnumerator> frameTraversal;
#ifdef IBMBIDI
  result = NS_NewFrameTraversal(getter_AddRefs(frameTraversal),
                                lineIsReordered ? VISUAL : LEAF,
                                aPresContext, 
                                traversedFrame, aPos->mScrollViewStop);
#else
  //if we are a container frame we MUST init with last leaf for eDirNext
  //
  result = NS_NewFrameTraversal(getter_AddRefs(frameTraversal), LEAF, aPresContext, traversedFrame, aPos->mScrollViewStop);
#endif
  if (NS_FAILED(result))
    return result;
  nsISupports *isupports = nsnull;
#ifdef IBMBIDI
  nsIFrame *newFrame;

  for (;;) {
    if (lineIsRTL) 
      if (aPos->mDirection == eDirPrevious)
        result = frameTraversal->Next();
      else 
        result = frameTraversal->Prev();
    else
#endif
      if (aPos->mDirection == eDirNext)
        result = frameTraversal->Next();
      else 
        result = frameTraversal->Prev();
    
  if (NS_FAILED(result))
    return result;
  result = frameTraversal->CurrentItem(&isupports);
  if (NS_FAILED(result))
    return result;
  if (!isupports)
    return NS_ERROR_NULL_POINTER;
  //we must CAST here to an nsIFrame. nsIFrame doesnt really follow the rules
  //for speed reasons
#ifndef IBMBIDI
  nsIFrame *newFrame = (nsIFrame *)isupports;
#else
  
  newFrame = (nsIFrame *)isupports;
  nsIContent *content = newFrame->GetContent();
  if (!lineJump && (content == mContent))
  {
    //we will continue if this is NOT a text node. 
    //in the case of a text node since that does not mean we are stuck. it could mean a change in style for
    //the text node.  in the case of a hruleframe with generated before and after content, we do not
    //want the splittable generated frame to get us stuck on an HR
    if (nsLayoutAtoms::textFrame != newFrame->GetType())
      continue;  //we should NOT be getting stuck on the same piece of content on the same line. skip to next line.
  }
  PRBool isBidiGhostFrame = (newFrame->GetRect().IsEmpty() &&
                             (newFrame->GetStateBits() & NS_FRAME_IS_BIDI));
  if (isBidiGhostFrame)
  {
    // If the rectangle is empty and the NS_FRAME_IS_BIDI flag is set, this is most likely 
    // a non-renderable frame created at the end of the line by Bidi reordering.
    lineJump = PR_TRUE;
    aPos->mAmount = eSelectNoAmount;
  }
  else
  {
    PRBool selectable =  PR_TRUE; //usually fine
    newFrame->IsSelectable(&selectable, nsnull);
    if (selectable)
      break; // for (;;)
  }
  PRBool newLineIsRTL = PR_FALSE;
  if (lineJump) {
    blockFrame = newFrame;
    nsresult result = NS_ERROR_FAILURE;
    while (NS_FAILED(result) && blockFrame)
    {
      thisBlock = blockFrame;
      blockFrame = blockFrame->GetParent();
      result = NS_OK;
      if (blockFrame) {
        result = blockFrame->QueryInterface(NS_GET_IID(nsILineIteratorNavigator), getter_AddRefs(it));
      }
    }
    if (!blockFrame || !it)
      return NS_ERROR_FAILURE;
    result = it->FindLineContaining(thisBlock, &thisLine);
    if (NS_FAILED(result))
      return result;
    it->GetDirection(&newLineIsRTL);

    result = it->CheckLineOrder(thisLine, &lineIsReordered, &firstVisual, &lastVisual);
    if (NS_FAILED(result))
      return result;

    if (lineIsReordered)
    {
      firstFrame = firstVisual;
      lastFrame = lastVisual;
    }
    else
    {
      result = it->GetLine(thisLine, &firstFrame, &lineFrameCount, nonUsedRect,
                           &lineFlags);
      if (NS_FAILED(result))
        return result;
      if (!firstFrame)
        return NS_ERROR_FAILURE;

      lastFrame = firstFrame;
      for (;lineFrameCount > 1;lineFrameCount --){
        result = it->GetNextSiblingOnLine(lastFrame, thisLine);
        if (NS_FAILED(result) || !lastFrame){
          NS_ASSERTION(0,"should not be reached nsFrame\n");
          return NS_ERROR_FAILURE;
        }
      }
    }

    GetFirstLeaf(aPresContext, &firstFrame);
    GetLastLeaf(aPresContext, &lastFrame);

    if (newLineIsRTL) {
      if (aPos->mDirection == eDirPrevious)
        newFrame = firstFrame;
      else
        newFrame = lastFrame;
    }
    else {
      if (aPos->mDirection == eDirNext)
        newFrame = firstFrame;
      else
        newFrame = lastFrame;
      }
    }
    PRBool selectable =  PR_TRUE; //usually fine
    newFrame->IsSelectable(&selectable, nsnull);
    if (!selectable)
      lineJump = PR_FALSE;
  } // for (;;) we will break from inside
#endif // IBMBIDI
  if (aPos->mDirection == eDirNext)
    aPos->mStartOffset = 0;
  else
    aPos->mStartOffset = -1;
#ifdef IBMBIDI
  PRUint8 oldLevel = NS_GET_EMBEDDING_LEVEL(this);
  PRUint8 newLevel = NS_GET_EMBEDDING_LEVEL(newFrame);
  if (newLevel & 1) // The new frame is RTL, go to the other end
    aPos->mStartOffset = -1 - aPos->mStartOffset;

  if ((aPos->mAmount == eSelectNoAmount) && ((newLevel & 1) != (oldLevel & 1)))  {
    preferLeft = (PRBool)!preferLeft;
  }
#endif
  aPos->mResultFrame = newFrame;
  aPos->mPreferLeft = preferLeft;
  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsBox::GetHAlign ( Halignment aAlign) [virtual, inherited]

Implements nsIFrame.

Reimplemented in nsBoxFrame.

Definition at line 434 of file nsBox.cpp.

{
  aAlign = hAlign_Left;
   return NS_OK;
}
NS_IMETHODIMP nsBox::GetIndexOf ( nsIBox *  aChild,
PRInt32 aIndex 
) [virtual, inherited]

Implements nsIFrame.

Reimplemented in nsBoxFrame.

Definition at line 1370 of file nsBox.cpp.

{
  // return -1. We have no children
  *aIndex = -1;
  return NS_OK;
}
nsresult nsIFrame::GetInset ( nsMargin aInset) [inline, inherited]

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:

static void nsMathMLFrame::GetItalicCorrection ( nsBoundingMetrics &  aBoundingMetrics,
nscoord aItalicCorrection 
) [inline, static, inherited]

Definition at line 248 of file nsMathMLFrame.h.

  {
    aItalicCorrection = aBoundingMetrics.rightBearing - aBoundingMetrics.width;
    if (0 > aItalicCorrection) {
      aItalicCorrection = 0;
    }
  }

Here is the caller graph for this function:

static void nsMathMLFrame::GetItalicCorrection ( nsBoundingMetrics &  aBoundingMetrics,
nscoord aLeftItalicCorrection,
nscoord aRightItalicCorrection 
) [inline, static, inherited]

Definition at line 258 of file nsMathMLFrame.h.

  {
    aRightItalicCorrection = aBoundingMetrics.rightBearing - aBoundingMetrics.width;
    if (0 > aRightItalicCorrection) {
      aRightItalicCorrection = 0;
    }
    aLeftItalicCorrection = -aBoundingMetrics.leftBearing;
    if (0 > aLeftItalicCorrection) {
      aLeftItalicCorrection = 0;
    }
  }
nsIFrame * nsSplittableFrame::GetLastInFlow ( ) const [virtual, inherited]

Return the last frame in our current flow.

Reimplemented from nsIFrame.

Definition at line 113 of file nsSplittableFrame.cpp.

{
  nsSplittableFrame* lastInFlow = (nsSplittableFrame*)this;
  while (lastInFlow->mNextInFlow)  {
    lastInFlow = (nsSplittableFrame*)lastInFlow->mNextInFlow;
  }
  NS_POSTCONDITION(lastInFlow, "illegal state in flow chain.");
  return lastInFlow;
}
void nsFrame::GetLastLeaf ( nsPresContext aPresContext,
nsIFrame **  aFrame 
) [static, inherited]

Definition at line 4669 of file nsFrame.cpp.

{
  if (!aFrame || !*aFrame)
    return;
  nsIFrame *child = *aFrame;
  //if we are a block frame then go for the last line of 'this'
  while (1){
    child = child->GetFirstChild(nsnull);
    if (!child)
      return;//nothing to do
    nsIFrame* siblingFrame;
    nsIContent* content;
    //ignore anonymous elements, e.g. mozTableAdd* mozTableRemove*
    //see bug 278197 comment #12 #13 for details
    while ((siblingFrame = child->GetNextSibling()) &&
           (content = siblingFrame->GetContent()) &&
           !content->IsNativeAnonymous())
      child = siblingFrame;
    *aFrame = child;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void nsBox::GetLayoutFlags ( PRUint32 aFlags) [protected, virtual, inherited]

Reimplemented in nsMenuPopupFrame.

Definition at line 528 of file nsBox.cpp.

{
  aFlags = 0;
}

Here is the caller graph for this function:

NS_IMETHODIMP nsBox::GetLayoutManager ( nsIBoxLayout **  aLayout) [virtual, inherited]

Implements nsIFrame.

Reimplemented in nsBoxFrame.

Definition at line 679 of file nsBox.cpp.

{
  *aLayout = nsnull;
  return NS_OK;
}

Here is the caller graph for this function:

PRInt32 nsFrame::GetLineNumber ( nsIFrame aFrame) [static, protected, inherited]

Definition at line 4042 of file nsFrame.cpp.

{
  nsIFrame *blockFrame = aFrame;
  nsIFrame *thisBlock;
  PRInt32   thisLine;
  nsCOMPtr<nsILineIteratorNavigator> it; 
  nsresult result = NS_ERROR_FAILURE;
  while (NS_FAILED(result) && blockFrame)
  {
    thisBlock = blockFrame;
    blockFrame = blockFrame->GetParent();
    result = NS_OK;
    if (blockFrame) {
      result = blockFrame->QueryInterface(NS_GET_IID(nsILineIteratorNavigator),getter_AddRefs(it));
    }
  }
  if (!blockFrame || !it)
    return NS_ERROR_FAILURE;
  result = it->FindLineContaining(thisBlock, &thisLine);
  if (NS_FAILED(result))
    return -1;
  return thisLine;
}

Here is the call graph for this function:

NS_IMETHODIMP nsBox::GetMargin ( nsMargin aMargin) [virtual, inherited]

Implements nsIFrame.

Definition at line 611 of file nsBox.cpp.

{
  aMargin.SizeTo(0,0,0,0);
  GetStyleMargin()->GetMargin(aMargin);

  return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Implements nsIMathMLFrame.

Reimplemented in nsMathMLmfracFrame, nsMathMLmoFrame, and nsMathMLTokenFrame.

Definition at line 66 of file nsMathMLFrame.cpp.

{
  // see if it is an embellished operator (mapped to 'Op' in TeX)
  if (mEmbellishData.coreFrame)
    return GetMathMLFrameTypeFor(mEmbellishData.coreFrame);

  // if it has a prescribed base, fetch the type from there
  if (mPresentationData.baseFrame)
    return GetMathMLFrameTypeFor(mPresentationData.baseFrame);

  // everything else is treated as ordinary (mapped to 'Ord' in TeX)
  return eMathMLFrameType_Ordinary;  
}
static eMathMLFrameType nsMathMLFrame::GetMathMLFrameTypeFor ( nsIFrame aFrame) [inline, static, inherited]

Definition at line 235 of file nsMathMLFrame.h.

  {
    if (aFrame->IsFrameOfType(nsIFrame::eMathML)) {
      nsIMathMLFrame* mathMLFrame;
      CallQueryInterface(aFrame, &mathMLFrame);
      if (mathMLFrame)
        return mathMLFrame->GetMathMLFrameType();
    }
    return eMathMLFrameType_UNKNOWN;
  }

Here is the call graph for this function:

Here is the caller graph for this function:

NS_IMETHODIMP nsFrame::GetMaxSize ( nsBoxLayoutState aBoxLayoutState,
nsSize aSize 
) [virtual, inherited]

Reimplemented from nsBox.

Reimplemented in nsXULScrollFrame, nsSliderFrame, nsBoxFrame, nsTextControlFrame, and nsLeafBoxFrame.

Definition at line 5149 of file nsFrame.cpp.

{
  // Don't use the cache if we have HTMLReflowState constraints --- they might have changed
  nsBoxLayoutMetrics *metrics = BoxMetrics();
  if (!DoesNeedRecalc(metrics->mMaxSize)) {
     aSize = metrics->mMaxSize;
     return NS_OK;
  }

  aSize.width = NS_INTRINSICSIZE;
  aSize.height = NS_INTRINSICSIZE;

  PRBool isCollapsed = PR_FALSE;
  IsCollapsed(aState, isCollapsed);
  if (isCollapsed) {
    return NS_OK;
  } else {
    metrics->mMaxSize.width = NS_INTRINSICSIZE;
    metrics->mMaxSize.height = NS_INTRINSICSIZE;
    nsBox::GetMaxSize(aState, metrics->mMaxSize);
  }

  aSize = metrics->mMaxSize;

  return NS_OK;
}

Here is the call graph for this function:

NS_IMETHODIMP nsFrame::GetMinSize ( nsBoxLayoutState aBoxLayoutState,
nsSize aSize 
) [virtual, inherited]

Reimplemented from nsBox.

Reimplemented in nsXULScrollFrame, nsSliderFrame, nsMenuFrame, nsBoxFrame, nsTextControlFrame, nsTreeBodyFrame, nsImageBoxFrame, nsLeafBoxFrame, and nsTextBoxFrame.

Definition at line 5114 of file nsFrame.cpp.

{
  // Don't use the cache if we have HTMLReflowState constraints --- they might have changed
  nsBoxLayoutMetrics *metrics = BoxMetrics();
  if (!DoesNeedRecalc(metrics->mMinSize)) {
     aSize = metrics->mMinSize;
     return NS_OK;
  }

  aSize.width = 0;
  aSize.height = 0;

  PRBool isCollapsed = PR_FALSE;
  IsCollapsed(aState, isCollapsed);
  if (isCollapsed) {
    return NS_OK;
  } else {
    // get our size in CSS.
    PRBool completelyRedefined = nsIBox::AddCSSMinSize(aState, this, metrics->mMinSize);

    // Refresh our caches with new sizes.
    if (!completelyRedefined) {
       RefreshSizeCache(aState);
       metrics->mMinSize = metrics->mBlockMinSize;
       AddInset(metrics->mMinSize);
       nsIBox::AddCSSMinSize(aState, this, metrics->mMinSize);
    }
  }

  aSize = metrics->mMinSize;

  return NS_OK;
}

Here is the call graph for this function:

nsSize nsBox::GetMinSizeForScrollArea ( nsBoxLayoutState aBoxLayoutState) [virtual, inherited]

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

Usually it's (0,0).

Implements nsIFrame.

Reimplemented in nsListBoxBodyFrame.

Definition at line 728 of file nsBox.cpp.

{
  return nsSize(0, 0);
}

Here is the call graph for this function:

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

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_IMETHODIMP nsBox::GetMouseThrough ( PRBool aMouseThrough) [virtual, inherited]

Implements nsIFrame.

Reimplemented in nsBoxFrame, nsLeafBoxFrame, nsTitleBarFrame, and nsButtonBoxFrame.

Definition at line 1353 of file nsBox.cpp.

{
  if (mParent && mParent->IsBoxFrame())
    return mParent->GetMouseThrough(aMouseThrough);

  aMouseThrough = PR_FALSE;
  return NS_OK;
}

Here is the call graph for this function:

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

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:

nsIFrame * nsSplittableFrame::GetNextInFlow ( ) const [virtual, inherited]

Reimplemented from nsFrame.

Definition at line 92 of file nsSplittableFrame.cpp.

{
  return mNextInFlow;
}

Here is the caller graph for this function:

nsresult nsFrame::GetNextPrevLineFromeBlockFrame ( nsPresContext aPresContext,
nsPeekOffsetStruct aPos,
nsIFrame aBlockFrame,
PRInt32  aLineStart,
PRInt8  aOutSideLimit 
) [static, inherited]

Definition at line 3226 of file nsFrame.cpp.

{
  //magic numbers aLineStart will be -1 for end of block 0 will be start of block
  if (!aBlockFrame || !aPos)
    return NS_ERROR_NULL_POINTER;

  aPos->mResultFrame = nsnull;
  aPos->mResultContent = nsnull;
  aPos->mPreferLeft = (aPos->mDirection == eDirNext);

   nsresult result;
  nsCOMPtr<nsILineIteratorNavigator> it; 
  result = aBlockFrame->QueryInterface(NS_GET_IID(nsILineIteratorNavigator),getter_AddRefs(it));
  if (NS_FAILED(result) || !it)
    return result;
  PRInt32 searchingLine = aLineStart;
  PRInt32 countLines;
  result = it->GetNumLines(&countLines);
  if (aOutSideLimit > 0) //start at end
    searchingLine = countLines;
  else if (aOutSideLimit <0)//start at begining
    searchingLine = -1;//"next" will be 0  
  else 
    if ((aPos->mDirection == eDirPrevious && searchingLine == 0) || 
       (aPos->mDirection == eDirNext && searchingLine >= (countLines -1) )){
      //we need to jump to new block frame.
           return NS_ERROR_FAILURE;
    }
  PRInt32 lineFrameCount;
  nsIFrame *resultFrame = nsnull;
  nsIFrame *farStoppingFrame = nsnull; //we keep searching until we find a "this" frame then we go to next line
  nsIFrame *nearStoppingFrame = nsnull; //if we are backing up from edge, stop here
  nsIFrame *firstFrame;
  nsIFrame *lastFrame;
  nsRect  rect;
  PRBool isBeforeFirstFrame, isAfterLastFrame;
  PRBool found = PR_FALSE;
  while (!found)
  {
    if (aPos->mDirection == eDirPrevious)
      searchingLine --;
    else
      searchingLine ++;
    if ((aPos->mDirection == eDirPrevious && searchingLine < 0) || 
       (aPos->mDirection == eDirNext && searchingLine >= countLines ))
    {
      //we need to jump to new block frame.
      return NS_ERROR_FAILURE;
    }
    PRUint32 lineFlags;
    result = it->GetLine(searchingLine, &firstFrame, &lineFrameCount,
                         rect, &lineFlags);
    if (!lineFrameCount) 
      continue;
    if (NS_SUCCEEDED(result)){
      lastFrame = firstFrame;
      for (;lineFrameCount > 1;lineFrameCount --){
        //result = lastFrame->GetNextSibling(&lastFrame, searchingLine);
        result = it->GetNextSiblingOnLine(lastFrame, searchingLine);
        if (NS_FAILED(result) || !lastFrame){
          NS_ASSERTION(0,"should not be reached nsFrame\n");
          return NS_ERROR_FAILURE;
        }
      }
      GetLastLeaf(aPresContext, &lastFrame);

      if (aPos->mDirection == eDirNext){
        nearStoppingFrame = firstFrame;
        farStoppingFrame = lastFrame;
      }
      else{
        nearStoppingFrame = lastFrame;
        farStoppingFrame = firstFrame;
      }
      nsPoint offset;
      nsIView * view; //used for call of get offset from view
      aBlockFrame->GetOffsetFromView(offset,&view);
      nscoord newDesiredX  = aPos->mDesiredX - offset.x;//get desired x into blockframe coordinates!
      result = it->FindFrameAt(searchingLine, newDesiredX, &resultFrame, &isBeforeFirstFrame, &isAfterLastFrame);
      if(NS_FAILED(result))
        continue;
    }

    if (NS_SUCCEEDED(result) && resultFrame)
    {
      nsCOMPtr<nsILineIteratorNavigator> newIt; 
      //check to see if this is ANOTHER blockframe inside the other one if so then call into its lines
      result = resultFrame->QueryInterface(NS_GET_IID(nsILineIteratorNavigator),getter_AddRefs(newIt));
      if (NS_SUCCEEDED(result) && newIt)
      {
        aPos->mResultFrame = resultFrame;
        return NS_OK;
      }
      //resultFrame is not a block frame

      nsCOMPtr<nsIBidirectionalEnumerator> frameTraversal;
      result = NS_NewFrameTraversal(getter_AddRefs(frameTraversal), EXTENSIVE,
                                    aPresContext, resultFrame, aPos->mScrollViewStop);
      if (NS_FAILED(result))
        return result;
      nsISupports *isupports = nsnull;
      nsIFrame *storeOldResultFrame = resultFrame;
      while ( !found ){
        nsPresContext *context = aPos->mShell->GetPresContext();
        nsPoint point;
        point.x = aPos->mDesiredX;

        nsRect tempRect = resultFrame->GetRect();
        nsPoint offset;
        nsIView * view; //used for call of get offset from view
        result = resultFrame->GetOffsetFromView(offset, &view);
        if (NS_FAILED(result))
          return result;
        point.y = tempRect.height + offset.y;

        //special check. if we allow non-text selection then we can allow a hit location to fall before a table. 
        //otherwise there is no way to get and click signal to fall before a table (it being a line iterator itself)
        PRInt16 isEditor = 0;
        nsIPresShell *shell = aPresContext->GetPresShell();
        if (!shell)
          return NS_ERROR_FAILURE;
        shell->GetSelectionFlags ( &isEditor );
        isEditor = isEditor == nsISelectionDisplay::DISPLAY_ALL;
        if ( isEditor ) 
        {
          if (resultFrame->GetType() == nsLayoutAtoms::tableOuterFrame)
          {
            if (((point.x - offset.x + tempRect.x)<0) ||  ((point.x - offset.x+ tempRect.x)>tempRect.width))//off left/right side
            {
              nsIContent* content = resultFrame->GetContent();
              if (content)
              {
                nsIContent* parent = content->GetParent();
                if (parent)
                {
                  aPos->mResultContent = parent;
                  aPos->mContentOffset = parent->IndexOf(content);
                  aPos->mPreferLeft = PR_FALSE;
                  if ((point.x - offset.x+ tempRect.x)>tempRect.width)
                  {
                    aPos->mContentOffset++;//go to end of this frame
                    aPos->mPreferLeft = PR_TRUE;
                  }
                  aPos->mContentOffsetEnd = aPos->mContentOffset;
                  //result frame is the result frames parent.
                  aPos->mResultFrame = resultFrame->GetParent();
                  return