1998-11-16 20:11:12 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.0 (the "License"); you may not use this file except in
|
|
|
|
* compliance with the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/NPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS"
|
|
|
|
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
|
|
|
* the License for the specific language governing rights and limitations
|
|
|
|
* under the License.
|
|
|
|
*
|
|
|
|
* The Original Code is Mozilla Communicator client code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape Communications
|
|
|
|
* Corporation. Portions created by Netscape are Copyright (C) 1998
|
|
|
|
* Netscape Communications Corporation. All Rights Reserved.
|
|
|
|
*/
|
|
|
|
#ifndef nsBlockFrame_h___
|
|
|
|
#define nsBlockFrame_h___
|
|
|
|
|
|
|
|
#include "nsHTMLContainerFrame.h"
|
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
class nsBlockReflowState;
|
|
|
|
class nsBulletFrame;
|
|
|
|
class nsLineBox;
|
|
|
|
class nsTextRun;
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-11-18 09:13:58 +03:00
|
|
|
/**
|
|
|
|
* Child list name indices
|
|
|
|
* @see #GetAdditionalChildListName()
|
|
|
|
*/
|
|
|
|
#define NS_BLOCK_FRAME_FLOATER_LIST_INDEX 0
|
|
|
|
#define NS_BLOCK_FRAME_BULLET_LIST_INDEX 1
|
|
|
|
#define NS_BLOCK_FRAME_LAST_LIST_INDEX NS_BLOCK_FRAME_BULLET_LIST_INDEX
|
|
|
|
|
1999-02-19 01:22:55 +03:00
|
|
|
/**
|
|
|
|
* Additional frame-state bits
|
|
|
|
*/
|
|
|
|
#define NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET 0x10000
|
1999-03-20 02:05:56 +03:00
|
|
|
#define NS_BLOCK_IS_HTML_PARAGRAPH 0x20000
|
1999-02-19 01:22:55 +03:00
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
#define nsBlockFrameSuper nsHTMLContainerFrame
|
1998-12-05 19:02:08 +03:00
|
|
|
|
|
|
|
// Base class for block and inline frames
|
1999-02-09 20:31:33 +03:00
|
|
|
class nsBlockFrame : public nsBlockFrameSuper
|
1998-11-16 20:11:12 +03:00
|
|
|
{
|
|
|
|
public:
|
1999-02-09 20:31:33 +03:00
|
|
|
friend nsresult NS_NewBlockFrame(nsIFrame*& aNewFrame, PRUint32 aFlags);
|
|
|
|
|
1998-11-16 20:11:12 +03:00
|
|
|
// nsISupports
|
|
|
|
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);
|
|
|
|
|
|
|
|
// nsIFrame
|
1999-02-25 08:31:15 +03:00
|
|
|
NS_IMETHOD Init(nsIPresContext& aPresContext,
|
|
|
|
nsIContent* aContent,
|
|
|
|
nsIFrame* aParent,
|
|
|
|
nsIStyleContext* aContext,
|
|
|
|
nsIFrame* aPrevInFlow);
|
1998-11-16 20:11:12 +03:00
|
|
|
NS_IMETHOD SetInitialChildList(nsIPresContext& aPresContext,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aChildList);
|
1999-02-02 20:31:09 +03:00
|
|
|
NS_IMETHOD AppendFrames(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
NS_IMETHOD InsertFrames(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
NS_IMETHOD RemoveFrame(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aOldFrame);
|
1999-02-10 05:25:01 +03:00
|
|
|
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame** aFirstChild) const;
|
1999-02-09 20:31:33 +03:00
|
|
|
NS_IMETHOD GetAdditionalChildListName(PRInt32 aIndex,
|
1999-02-10 05:25:01 +03:00
|
|
|
nsIAtom** aListName) const;
|
1998-11-16 20:11:12 +03:00
|
|
|
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
|
|
|
|
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
1998-12-05 19:02:08 +03:00
|
|
|
NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext,
|
|
|
|
nsIStyleContext* aParentContext);
|
1999-02-09 20:31:33 +03:00
|
|
|
NS_IMETHOD IsPercentageBase(PRBool& aBase) const;
|
1998-11-16 20:11:12 +03:00
|
|
|
NS_IMETHOD Paint(nsIPresContext& aPresContext,
|
|
|
|
nsIRenderingContext& aRenderingContext,
|
1998-12-18 18:54:23 +03:00
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
nsFramePaintLayer aWhichLayer);
|
1999-01-16 03:00:50 +03:00
|
|
|
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
|
1999-02-09 20:31:33 +03:00
|
|
|
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
1999-02-12 20:45:58 +03:00
|
|
|
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
|
1998-11-16 20:11:12 +03:00
|
|
|
NS_IMETHOD VerifyTree() const;
|
1998-11-19 21:09:57 +03:00
|
|
|
NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
|
|
|
// nsIHTMLReflow
|
|
|
|
NS_IMETHOD Reflow(nsIPresContext& aPresContext,
|
|
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
|
|
const nsHTMLReflowState& aReflowState,
|
|
|
|
nsReflowStatus& aStatus);
|
|
|
|
NS_IMETHOD MoveInSpaceManager(nsIPresContext& aPresContext,
|
|
|
|
nsISpaceManager* aSpaceManager,
|
|
|
|
nscoord aDeltaX, nscoord aDeltaY);
|
|
|
|
|
1999-02-23 22:18:12 +03:00
|
|
|
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
|
|
|
|
nsIContent* aChild,
|
|
|
|
nsIAtom* aAttribute,
|
|
|
|
PRInt32 aHint);
|
|
|
|
|
1998-11-16 20:11:12 +03:00
|
|
|
#ifdef DO_SELECTION
|
|
|
|
NS_IMETHOD HandleEvent(nsIPresContext& aPresContext,
|
|
|
|
nsGUIEvent* aEvent,
|
|
|
|
nsEventStatus& aEventStatus);
|
|
|
|
|
|
|
|
NS_IMETHOD HandleDrag(nsIPresContext& aPresContext,
|
|
|
|
nsGUIEvent* aEvent,
|
|
|
|
nsEventStatus& aEventStatus);
|
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
nsIFrame * FindHitFrame(nsBlockFrame * aBlockFrame,
|
1998-11-16 20:11:12 +03:00
|
|
|
const nscoord aX, const nscoord aY,
|
|
|
|
const nsPoint & aPoint);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
1999-01-16 01:53:39 +03:00
|
|
|
virtual void DeleteChildsNextInFlow(nsIPresContext& aPresContext,
|
|
|
|
nsIFrame* aNextInFlow);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
protected:
|
1999-02-09 20:31:33 +03:00
|
|
|
nsBlockFrame();
|
|
|
|
virtual ~nsBlockFrame();
|
1998-11-16 20:11:12 +03:00
|
|
|
|
|
|
|
void SetFlags(PRUint32 aFlags) {
|
|
|
|
mFlags = aFlags;
|
|
|
|
}
|
|
|
|
|
1999-02-19 01:22:55 +03:00
|
|
|
PRBool HaveOutsideBullet() const {
|
|
|
|
return 0 != (mState & NS_BLOCK_FRAME_HAS_OUTSIDE_BULLET);
|
|
|
|
}
|
|
|
|
|
1998-11-16 20:11:12 +03:00
|
|
|
void SlideFrames(nsIPresContext& aPresContext,
|
|
|
|
nsISpaceManager* aSpaceManager,
|
1998-12-05 19:02:08 +03:00
|
|
|
nsLineBox* aLine, nscoord aDY);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-12 22:18:28 +03:00
|
|
|
void SlideFloaters(nsIPresContext& aPresContext,
|
|
|
|
nsISpaceManager* aSpaceManager,
|
|
|
|
nsLineBox* aLine, nscoord aDY,
|
|
|
|
PRBool aUpdateSpaceManager);
|
|
|
|
|
1998-11-16 20:11:12 +03:00
|
|
|
PRBool DrainOverflowLines();
|
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
virtual PRIntn GetSkipSides() const;
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-03-05 07:21:32 +03:00
|
|
|
virtual void ComputeFinalSize(const nsHTMLReflowState& aReflowState,
|
|
|
|
nsBlockReflowState& aState,
|
1998-12-05 19:02:08 +03:00
|
|
|
nsHTMLReflowMetrics& aMetrics);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-01-06 02:01:54 +03:00
|
|
|
void MarkEmptyLines(nsIPresContext& aPresContext);
|
1998-12-17 21:52:10 +03:00
|
|
|
|
|
|
|
nsresult AppendNewFrames(nsIPresContext& aPresContext, nsIFrame*);
|
|
|
|
|
1999-02-01 20:28:39 +03:00
|
|
|
nsresult InsertNewFrames(nsIPresContext& aPresContext,
|
|
|
|
nsIFrame* aFrameList,
|
|
|
|
nsIFrame* aPrevSibling);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-02-02 20:31:09 +03:00
|
|
|
nsresult DoRemoveFrame(nsIPresContext& aPresContext,
|
1999-01-06 02:01:54 +03:00
|
|
|
nsIFrame* aDeletedFrame);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
nsresult PrepareInitialReflow(nsBlockReflowState& aState);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
nsresult PrepareStyleChangedReflow(nsBlockReflowState& aState);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
nsresult PrepareChildIncrementalReflow(nsBlockReflowState& aState);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
nsresult PrepareResizeReflow(nsBlockReflowState& aState);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
nsresult ReflowDirtyLines(nsBlockReflowState& aState);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
nsresult RecoverStateFrom(nsBlockReflowState& aState,
|
1998-12-12 22:18:28 +03:00
|
|
|
nsLineBox* aLine,
|
|
|
|
nscoord aDeltaY);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
//----------------------------------------
|
|
|
|
// Methods for line reflow
|
1999-02-09 20:31:33 +03:00
|
|
|
// XXX nuke em
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
void WillReflowLine(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
nsresult ReflowLine(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
1999-02-12 20:45:58 +03:00
|
|
|
PRBool* aKeepReflowGoing);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
virtual void DidReflowLine(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
1999-02-12 20:45:58 +03:00
|
|
|
PRBool aKeepReflowGoing);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
nsresult PlaceLine(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
1999-02-12 20:45:58 +03:00
|
|
|
PRBool* aKeepReflowGoing);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
// XXX blech
|
|
|
|
void PostPlaceLine(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
|
|
|
const nsSize& aMaxElementSize);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-17 21:52:10 +03:00
|
|
|
void ComputeLineMaxElementSize(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
|
|
|
nsSize* aMaxElementSize);
|
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
// XXX where to go
|
|
|
|
PRBool ShouldJustifyLine(nsBlockReflowState& aState, nsLineBox* aLine);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
void FindFloaters(nsLineBox* aLine);
|
|
|
|
|
1998-12-08 01:28:23 +03:00
|
|
|
void DeleteLine(nsBlockReflowState& aState, nsLineBox* aLine);
|
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
//----------------------------------------
|
|
|
|
// Methods for individual frame reflow
|
|
|
|
|
|
|
|
virtual void WillReflowFrame(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
|
|
|
nsresult ReflowBlockFrame(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
1999-02-12 20:45:58 +03:00
|
|
|
PRBool* aKeepGoing);
|
1998-12-05 19:02:08 +03:00
|
|
|
|
1999-03-21 04:15:12 +03:00
|
|
|
nsresult ReflowInlineFrames(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
|
|
|
PRBool* aKeepLineGoing);
|
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
nsresult ReflowInlineFrame(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
|
|
|
nsIFrame* aFrame,
|
1999-03-21 04:15:12 +03:00
|
|
|
PRUint8* aLineReflowStatus);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
|
|
|
void ReflowFloater(nsIPresContext& aPresContext,
|
|
|
|
nsBlockReflowState& aState,
|
1998-11-17 04:04:21 +03:00
|
|
|
nsIFrame* aFloaterFrame,
|
|
|
|
nsHTMLReflowState& aFloaterReflowState);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
//----------------------------------------
|
|
|
|
// Methods for pushing/pulling lines/frames
|
|
|
|
|
|
|
|
virtual nsresult CreateContinuationFor(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
|
|
|
nsIFrame* aFrame,
|
|
|
|
PRBool& aMadeNewFrame);
|
|
|
|
|
|
|
|
nsresult SplitLine(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
|
|
|
nsIFrame* aFrame);
|
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
nsBlockFrame* FindFollowingBlockFrame(nsIFrame* aFrame);
|
1998-12-05 19:02:08 +03:00
|
|
|
|
|
|
|
nsresult PullFrame(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
|
|
|
nsIFrame*& aFrameResult);
|
|
|
|
|
|
|
|
nsresult PullFrame(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aToLine,
|
|
|
|
nsLineBox** aFromList,
|
|
|
|
PRBool aUpdateGeometricParent,
|
|
|
|
nsIFrame*& aFrameResult,
|
|
|
|
PRBool& aStopPulling);
|
|
|
|
|
|
|
|
void PushLines(nsBlockReflowState& aState);
|
|
|
|
|
|
|
|
//----------------------------------------
|
|
|
|
//XXX
|
1998-12-18 18:54:23 +03:00
|
|
|
virtual void PaintChildren(nsIPresContext& aPresContext,
|
|
|
|
nsIRenderingContext& aRenderingContext,
|
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
nsFramePaintLayer aWhichLayer);
|
|
|
|
|
1998-11-16 20:11:12 +03:00
|
|
|
void PaintFloaters(nsIPresContext& aPresContext,
|
|
|
|
nsIRenderingContext& aRenderingContext,
|
1998-12-18 18:54:23 +03:00
|
|
|
const nsRect& aDirtyRect,
|
|
|
|
nsFramePaintLayer aWhichLayer);
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
nsLineBox* FindLineFor(nsIFrame* aFrame, PRBool& aIsFloaterResult);
|
|
|
|
|
|
|
|
void PropogateReflowDamage(nsBlockReflowState& aState,
|
|
|
|
nsLineBox* aLine,
|
|
|
|
nscoord aDeltaY);
|
|
|
|
|
1999-02-26 20:04:44 +03:00
|
|
|
nsresult ComputeTextRuns(nsIPresContext& aPresContext);
|
1998-12-05 19:02:08 +03:00
|
|
|
|
|
|
|
void BuildFloaterList();
|
|
|
|
|
1999-02-23 22:18:12 +03:00
|
|
|
void RenumberLists();
|
1998-12-05 19:02:08 +03:00
|
|
|
|
1999-03-05 07:21:32 +03:00
|
|
|
void UpdateBulletPosition();
|
|
|
|
|
1999-02-19 01:22:55 +03:00
|
|
|
void ReflowBullet(nsBlockReflowState& aState,
|
|
|
|
nsHTMLReflowMetrics& aMetrics);
|
1998-12-05 19:02:08 +03:00
|
|
|
|
|
|
|
void RestoreStyleFor(nsIPresContext& aPresContext, nsIFrame* aFrame);
|
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
#ifdef NS_DEBUG
|
|
|
|
PRBool IsChild(nsIFrame* aFrame);
|
1999-03-16 22:36:00 +03:00
|
|
|
void VerifyFrameCount(nsLineBox* line);
|
|
|
|
void VerifyOverflowSituation();
|
1999-03-23 01:41:09 +03:00
|
|
|
PRInt32 GetDepth() const;
|
1999-02-09 20:31:33 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
nsLineBox* mLines;
|
|
|
|
|
|
|
|
nsLineBox* mOverflowLines;
|
|
|
|
|
|
|
|
// XXX subclass!
|
|
|
|
PRUint32 mFlags;
|
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
nsIStyleContext* mFirstLineStyle;
|
|
|
|
|
|
|
|
nsIStyleContext* mFirstLetterStyle;
|
1998-11-16 20:11:12 +03:00
|
|
|
|
|
|
|
// Text run information
|
|
|
|
nsTextRun* mTextRuns;
|
|
|
|
|
|
|
|
// List of all floaters in this block
|
1999-01-16 01:53:39 +03:00
|
|
|
nsFrameList mFloaters;
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1998-12-05 19:02:08 +03:00
|
|
|
// XXX_fix_me: subclass one more time!
|
|
|
|
// For list-item frames, this is the bullet frame.
|
|
|
|
nsBulletFrame* mBullet;
|
1998-11-16 20:11:12 +03:00
|
|
|
|
1999-02-09 20:31:33 +03:00
|
|
|
friend class nsBlockReflowState;
|
1998-11-16 20:11:12 +03:00
|
|
|
};
|
|
|
|
|
1999-02-01 20:28:39 +03:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
|
|
|
#define nsAnonymousBlockFrameSuper nsBlockFrame
|
|
|
|
|
|
|
|
// Anonymous block frame. An anonymous block is used by some other
|
|
|
|
// container (the parent frame) to provide block reflow for a set of
|
|
|
|
// child frames. The parent is responsible for the maintainance of the
|
|
|
|
// anonymous blocks child list. To accomplish this, the normal methods
|
|
|
|
// for managing the child list (AppendFrames, InsertFrames, and
|
|
|
|
// RemoveFrame) forward the operation to the parent frame (the
|
|
|
|
// container of the anonymous block).
|
|
|
|
class nsAnonymousBlockFrame : public nsAnonymousBlockFrameSuper {
|
|
|
|
public:
|
|
|
|
friend nsresult NS_NewAnonymousBlockFrame(nsIFrame*& aNewFrame);
|
|
|
|
|
|
|
|
// nsIFrame overrides
|
|
|
|
|
|
|
|
// AppendFrames/InsertFrames/RemoveFrame are implemented to forward
|
|
|
|
// the method call to the parent frame.
|
|
|
|
NS_IMETHOD AppendFrames(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
NS_IMETHOD InsertFrames(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
NS_IMETHOD RemoveFrame(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aOldFrame);
|
|
|
|
|
|
|
|
// These methods are used by the parent frame to actually modify the
|
|
|
|
// child frames of the anonymous block frame.
|
|
|
|
nsresult AppendFrames2(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
|
|
|
|
nsresult InsertFrames2(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aPrevFrame,
|
|
|
|
nsIFrame* aFrameList);
|
|
|
|
|
|
|
|
nsresult RemoveFrame2(nsIPresContext& aPresContext,
|
|
|
|
nsIPresShell& aPresShell,
|
|
|
|
nsIAtom* aListName,
|
|
|
|
nsIFrame* aOldFrame);
|
|
|
|
|
1999-02-02 20:31:09 +03:00
|
|
|
// Take the first frame away from the anonymous block frame. The
|
|
|
|
// caller is responsible for the first frames final disposition
|
|
|
|
// (e.g. deleting it if it wants to).
|
|
|
|
void RemoveFirstFrame();
|
1999-02-01 20:28:39 +03:00
|
|
|
|
1999-02-02 20:31:09 +03:00
|
|
|
// Remove from the blocks list of children the frames starting at
|
|
|
|
// aFrame until the end of the child list. The caller is responsible
|
|
|
|
// for the first frames final disposition (e.g. deleting it if it
|
|
|
|
// wants to).
|
|
|
|
void RemoveFramesFrom(nsIFrame* aFrame);
|
1999-02-01 20:28:39 +03:00
|
|
|
|
|
|
|
protected:
|
|
|
|
nsAnonymousBlockFrame();
|
|
|
|
~nsAnonymousBlockFrame();
|
|
|
|
};
|
|
|
|
|
1998-11-16 20:11:12 +03:00
|
|
|
#endif /* nsBlockFrame_h___ */
|
|
|
|
|