mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
First of a few changes to allow frames to have multiple child lists.
FirstChild() now takes an additional argument which is the name of the child list.
This commit is contained in:
parent
8af5fd9779
commit
081c78e696
@ -1073,8 +1073,15 @@ HTMLStyleSheetImpl::ConstructRootFrame(nsIPresContext* aPresContext,
|
||||
|
||||
// See if we're paginated
|
||||
if (aPresContext->IsPaginated()) {
|
||||
// nsScrollFrame* scrollFrame;
|
||||
nsIFrame* pageSequenceFrame;
|
||||
|
||||
#if 0
|
||||
// Wrap the simple page sequence frame in a scroll frame
|
||||
// XXX Only do this if it's print oreview
|
||||
if NS_SUCCEEDED(NS_NewScrollFrame(aContent, aParentFrame, scrollFrame)) {
|
||||
#endif
|
||||
|
||||
// Create a simple page sequence frame
|
||||
rv = NS_NewSimplePageSequenceFrame(aContent, aNewFrame, pageSequenceFrame);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
@ -1340,7 +1347,7 @@ HTMLStyleSheetImpl::GetAdjustedParentFrame(nsIFrame* aCurrentParentFrame,
|
||||
if (NS_STYLE_DISPLAY_TABLE_CAPTION!=aChildDisplayType)
|
||||
{
|
||||
nsIFrame *innerTableFrame=nsnull;
|
||||
aCurrentParentFrame->FirstChild(innerTableFrame);
|
||||
aCurrentParentFrame->FirstChild(nsnull, innerTableFrame);
|
||||
if (nsnull!=innerTableFrame)
|
||||
{
|
||||
const nsStyleDisplay* innerTableDisplay;
|
||||
@ -1508,7 +1515,7 @@ HTMLStyleSheetImpl::GetFrameFor(nsIPresShell* aPresShell, nsIContent* aContent)
|
||||
frame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)display);
|
||||
|
||||
if (display->IsBlockLevel() && IsScrollable(display)) {
|
||||
frame->FirstChild(frame);
|
||||
frame->FirstChild(nsnull, frame);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -912,7 +912,7 @@ FindFrameWithContent(nsIFrame* aFrame, nsIContent* aContent)
|
||||
}
|
||||
NS_RELEASE(frameContent);
|
||||
|
||||
aFrame->FirstChild(aFrame);
|
||||
aFrame->FirstChild(nsnull, aFrame);
|
||||
while (aFrame) {
|
||||
nsIFrame* result = FindFrameWithContent(aFrame, aContent);
|
||||
|
||||
@ -1043,8 +1043,8 @@ static void
|
||||
CompareTrees(nsIFrame* aA, nsIFrame* aB)
|
||||
{
|
||||
nsIFrame* k1, *k2;
|
||||
aA->FirstChild(k1);
|
||||
aB->FirstChild(k2);
|
||||
aA->FirstChild(nsnull, k1);
|
||||
aB->FirstChild(nsnull, k2);
|
||||
NS_ASSERTION(nsContainerFrame::LengthOf(k1) == nsContainerFrame::LengthOf(k2),
|
||||
"child counts don't match");
|
||||
|
||||
|
@ -111,11 +111,15 @@ typedef PRUint32 nsFrameState;
|
||||
* A frame in the layout model. This interface is supported by all frame
|
||||
* objects.
|
||||
*
|
||||
* Frames are NOT reference counted. Use the DeleteFrame() member function
|
||||
* to delete a frame.
|
||||
* Frames can have multiple child lists: the default unnamed child list
|
||||
* (referred to as the <i>principal</i> child list, and additional named
|
||||
* child lists. There is an ordering of frames within a child list, but
|
||||
* there is no order defined between frames in different child lists of
|
||||
* the same parent frame.
|
||||
*
|
||||
* The lifetime of the frame hierarchy is bounded by the lifetime of the
|
||||
* presentation shell which owns the frames.
|
||||
* Frames are NOT reference counted. Use the DeleteFrame() member function
|
||||
* to delete a frame. The lifetime of the frame hierarchy is bounded by the
|
||||
* lifetime of the presentation shell which owns the frames.
|
||||
*/
|
||||
class nsIFrame : public nsISupports
|
||||
{
|
||||
@ -201,11 +205,18 @@ public:
|
||||
NS_IMETHOD SizeTo(nscoord aWidth, nscoord aHeight) = 0;
|
||||
|
||||
/**
|
||||
* Child frame enumeration.
|
||||
* Get the first child frame from the specified child list.
|
||||
*
|
||||
* Child frames are linked together in a singly-linked list.
|
||||
* @param aListName the name of the child list. A NULL pointer for the atom
|
||||
* name means the unnamed principal child list
|
||||
* @return NS_ERROR_INVALID_ARG if there is no child list with the specified name
|
||||
* @see #GetAdditionalListName()
|
||||
*/
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const = 0;
|
||||
|
||||
/**
|
||||
* Child frames are linked together in a singly-linked
|
||||
*/
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const = 0;
|
||||
NS_IMETHOD GetNextSibling(nsIFrame*& aNextSibling) const = 0;
|
||||
NS_IMETHOD SetNextSibling(nsIFrame* aNextSibling) = 0;
|
||||
|
||||
|
@ -262,7 +262,7 @@ public:
|
||||
NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList);
|
||||
NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aParentContext);
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext,
|
||||
@ -1839,10 +1839,15 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
|
||||
// Child frame enumeration
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
if (nsnull == aListName) {
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
} else {
|
||||
aFirstChild = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@ -4064,7 +4069,7 @@ FindFloatersIn(nsIFrame* aFrame, nsVoidArray*& aArray)
|
||||
|
||||
if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) {
|
||||
nsIFrame* kid;
|
||||
aFrame->FirstChild(kid);
|
||||
aFrame->FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsresult rv = FindFloatersIn(kid, aArray);
|
||||
if (NS_OK != rv) {
|
||||
@ -4376,7 +4381,7 @@ nsBlockFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
|
||||
#ifdef NS_DEBUG
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
NS_ASSERTION((0 == childCount) && (nsnull == firstChild),
|
||||
"deleting !empty next-in-flow");
|
||||
@ -4671,7 +4676,7 @@ nsBlockReflowState::IsLeftMostChild(nsIFrame* aFrame)
|
||||
// See if there are any non-zero sized child frames that precede
|
||||
// aFrame in the child list
|
||||
nsIFrame* child;
|
||||
parent->FirstChild(child);
|
||||
parent->FirstChild(nsnull, child);
|
||||
while ((nsnull != child) && (aFrame != child)) {
|
||||
nsSize size;
|
||||
|
||||
|
@ -262,7 +262,7 @@ public:
|
||||
NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList);
|
||||
NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aParentContext);
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext,
|
||||
@ -1839,10 +1839,15 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
|
||||
// Child frame enumeration
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
if (nsnull == aListName) {
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
} else {
|
||||
aFirstChild = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@ -4064,7 +4069,7 @@ FindFloatersIn(nsIFrame* aFrame, nsVoidArray*& aArray)
|
||||
|
||||
if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) {
|
||||
nsIFrame* kid;
|
||||
aFrame->FirstChild(kid);
|
||||
aFrame->FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsresult rv = FindFloatersIn(kid, aArray);
|
||||
if (NS_OK != rv) {
|
||||
@ -4376,7 +4381,7 @@ nsBlockFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
|
||||
#ifdef NS_DEBUG
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
NS_ASSERTION((0 == childCount) && (nsnull == firstChild),
|
||||
"deleting !empty next-in-flow");
|
||||
@ -4671,7 +4676,7 @@ nsBlockReflowState::IsLeftMostChild(nsIFrame* aFrame)
|
||||
// See if there are any non-zero sized child frames that precede
|
||||
// aFrame in the child list
|
||||
nsIFrame* child;
|
||||
parent->FirstChild(child);
|
||||
parent->FirstChild(nsnull, child);
|
||||
while ((nsnull != child) && (aFrame != child)) {
|
||||
nsSize size;
|
||||
|
||||
|
@ -262,7 +262,7 @@ public:
|
||||
NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList);
|
||||
NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aParentContext);
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext,
|
||||
@ -1839,10 +1839,15 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
|
||||
// Child frame enumeration
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
if (nsnull == aListName) {
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
} else {
|
||||
aFirstChild = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@ -4064,7 +4069,7 @@ FindFloatersIn(nsIFrame* aFrame, nsVoidArray*& aArray)
|
||||
|
||||
if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) {
|
||||
nsIFrame* kid;
|
||||
aFrame->FirstChild(kid);
|
||||
aFrame->FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsresult rv = FindFloatersIn(kid, aArray);
|
||||
if (NS_OK != rv) {
|
||||
@ -4376,7 +4381,7 @@ nsBlockFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
|
||||
#ifdef NS_DEBUG
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
NS_ASSERTION((0 == childCount) && (nsnull == firstChild),
|
||||
"deleting !empty next-in-flow");
|
||||
@ -4671,7 +4676,7 @@ nsBlockReflowState::IsLeftMostChild(nsIFrame* aFrame)
|
||||
// See if there are any non-zero sized child frames that precede
|
||||
// aFrame in the child list
|
||||
nsIFrame* child;
|
||||
parent->FirstChild(child);
|
||||
parent->FirstChild(nsnull, child);
|
||||
while ((nsnull != child) && (aFrame != child)) {
|
||||
nsSize size;
|
||||
|
||||
|
@ -118,7 +118,7 @@ nsContainerFrame::DidReflow(nsIPresContext& aPresContext,
|
||||
aStatus));
|
||||
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
if (NS_OK == kid->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
|
||||
@ -179,10 +179,17 @@ nsContainerFrame::GetCombinedRect(nsRect& aRect)
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Child frame enumeration
|
||||
|
||||
NS_METHOD nsContainerFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
NS_METHOD nsContainerFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = mFirstChild;
|
||||
return NS_OK;
|
||||
// We only know about the unnamed principal child list
|
||||
if (nsnull == aListName) {
|
||||
aFirstChild = mFirstChild;
|
||||
return NS_OK;
|
||||
|
||||
} else {
|
||||
aFirstChild = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -346,7 +353,7 @@ NS_METHOD nsContainerFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||
aEventStatus = nsEventStatus_eIgnore;
|
||||
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsRect kidRect;
|
||||
kid->GetRect(kidRect);
|
||||
@ -372,7 +379,7 @@ NS_METHOD nsContainerFrame::GetCursorAndContentAt(nsIPresContext& aPresContext,
|
||||
*aContent = mContent;
|
||||
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
nsPoint tmp;
|
||||
while (nsnull != kid) {
|
||||
nsRect kidRect;
|
||||
@ -472,7 +479,7 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, nsIFrame*
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
|
||||
if ((0 != childCount) || (nsnull != firstChild)) {
|
||||
|
@ -55,9 +55,7 @@ public:
|
||||
PRInt32& aCursor);
|
||||
|
||||
// Child frame enumeration.
|
||||
// ChildAt() retruns null if the index is not in the range 0 .. ChildCount() - 1.
|
||||
// IndexOf() returns -1 if the frame is not in the child list.
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
|
||||
// re-resolve style context for self and children as necessary
|
||||
// Subclasses need to override if they add child lists or
|
||||
|
@ -524,10 +524,10 @@ NS_IMETHODIMP nsFrame::SizeTo(nscoord aWidth, nscoord aHeight)
|
||||
|
||||
// Child frame enumeration
|
||||
|
||||
NS_IMETHODIMP nsFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
NS_IMETHODIMP nsFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = nsnull;
|
||||
return NS_OK;
|
||||
return nsnull == aListName ? NS_OK : NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
PRBool nsFrame::DisplaySelection(nsIPresContext& aPresContext, PRBool isOkToTurnOn)
|
||||
@ -1658,7 +1658,7 @@ void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent)
|
||||
}
|
||||
NS_RELEASE(frameContent);
|
||||
|
||||
aFrame->FirstChild(aFrame);
|
||||
aFrame->FirstChild(nsnull, aFrame);
|
||||
while (aFrame) {
|
||||
RefreshAllContentFrames(aFrame, aContent);
|
||||
aFrame->GetNextSibling(aFrame);
|
||||
|
@ -133,7 +133,7 @@ public:
|
||||
NS_IMETHOD SetRect(const nsRect& aRect);
|
||||
NS_IMETHOD MoveTo(nscoord aX, nscoord aY);
|
||||
NS_IMETHOD SizeTo(nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD Paint(nsIPresContext& aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect);
|
||||
|
@ -111,11 +111,15 @@ typedef PRUint32 nsFrameState;
|
||||
* A frame in the layout model. This interface is supported by all frame
|
||||
* objects.
|
||||
*
|
||||
* Frames are NOT reference counted. Use the DeleteFrame() member function
|
||||
* to delete a frame.
|
||||
* Frames can have multiple child lists: the default unnamed child list
|
||||
* (referred to as the <i>principal</i> child list, and additional named
|
||||
* child lists. There is an ordering of frames within a child list, but
|
||||
* there is no order defined between frames in different child lists of
|
||||
* the same parent frame.
|
||||
*
|
||||
* The lifetime of the frame hierarchy is bounded by the lifetime of the
|
||||
* presentation shell which owns the frames.
|
||||
* Frames are NOT reference counted. Use the DeleteFrame() member function
|
||||
* to delete a frame. The lifetime of the frame hierarchy is bounded by the
|
||||
* lifetime of the presentation shell which owns the frames.
|
||||
*/
|
||||
class nsIFrame : public nsISupports
|
||||
{
|
||||
@ -201,11 +205,18 @@ public:
|
||||
NS_IMETHOD SizeTo(nscoord aWidth, nscoord aHeight) = 0;
|
||||
|
||||
/**
|
||||
* Child frame enumeration.
|
||||
* Get the first child frame from the specified child list.
|
||||
*
|
||||
* Child frames are linked together in a singly-linked list.
|
||||
* @param aListName the name of the child list. A NULL pointer for the atom
|
||||
* name means the unnamed principal child list
|
||||
* @return NS_ERROR_INVALID_ARG if there is no child list with the specified name
|
||||
* @see #GetAdditionalListName()
|
||||
*/
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const = 0;
|
||||
|
||||
/**
|
||||
* Child frames are linked together in a singly-linked
|
||||
*/
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const = 0;
|
||||
NS_IMETHOD GetNextSibling(nsIFrame*& aNextSibling) const = 0;
|
||||
NS_IMETHOD SetNextSibling(nsIFrame* aNextSibling) = 0;
|
||||
|
||||
|
@ -147,7 +147,7 @@ nsIFrame* nsAbsoluteFrame::GetContainingBlock() const
|
||||
// nsIAbsoluteItems
|
||||
// XXX This is pretty yucky, but there isn't currently a better way to do
|
||||
// this...
|
||||
lastFrame->FirstChild(result);
|
||||
lastFrame->FirstChild(nsnull, result);
|
||||
|
||||
while (nsnull != result) {
|
||||
nsIAbsoluteItems* interface;
|
||||
@ -155,7 +155,7 @@ nsIFrame* nsAbsoluteFrame::GetContainingBlock() const
|
||||
break;
|
||||
}
|
||||
|
||||
result->FirstChild(result);
|
||||
result->FirstChild(nsnull, result);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,7 +262,7 @@ public:
|
||||
NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList);
|
||||
NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aParentContext);
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext,
|
||||
@ -1839,10 +1839,15 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
|
||||
// Child frame enumeration
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
if (nsnull == aListName) {
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
} else {
|
||||
aFirstChild = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@ -4064,7 +4069,7 @@ FindFloatersIn(nsIFrame* aFrame, nsVoidArray*& aArray)
|
||||
|
||||
if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) {
|
||||
nsIFrame* kid;
|
||||
aFrame->FirstChild(kid);
|
||||
aFrame->FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsresult rv = FindFloatersIn(kid, aArray);
|
||||
if (NS_OK != rv) {
|
||||
@ -4376,7 +4381,7 @@ nsBlockFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
|
||||
#ifdef NS_DEBUG
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
NS_ASSERTION((0 == childCount) && (nsnull == firstChild),
|
||||
"deleting !empty next-in-flow");
|
||||
@ -4671,7 +4676,7 @@ nsBlockReflowState::IsLeftMostChild(nsIFrame* aFrame)
|
||||
// See if there are any non-zero sized child frames that precede
|
||||
// aFrame in the child list
|
||||
nsIFrame* child;
|
||||
parent->FirstChild(child);
|
||||
parent->FirstChild(nsnull, child);
|
||||
while ((nsnull != child) && (aFrame != child)) {
|
||||
nsSize size;
|
||||
|
||||
|
@ -262,7 +262,7 @@ public:
|
||||
NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList);
|
||||
NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aParentContext);
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext,
|
||||
@ -1839,10 +1839,15 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
|
||||
// Child frame enumeration
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
if (nsnull == aListName) {
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
} else {
|
||||
aFirstChild = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@ -4064,7 +4069,7 @@ FindFloatersIn(nsIFrame* aFrame, nsVoidArray*& aArray)
|
||||
|
||||
if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) {
|
||||
nsIFrame* kid;
|
||||
aFrame->FirstChild(kid);
|
||||
aFrame->FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsresult rv = FindFloatersIn(kid, aArray);
|
||||
if (NS_OK != rv) {
|
||||
@ -4376,7 +4381,7 @@ nsBlockFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
|
||||
#ifdef NS_DEBUG
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
NS_ASSERTION((0 == childCount) && (nsnull == firstChild),
|
||||
"deleting !empty next-in-flow");
|
||||
@ -4671,7 +4676,7 @@ nsBlockReflowState::IsLeftMostChild(nsIFrame* aFrame)
|
||||
// See if there are any non-zero sized child frames that precede
|
||||
// aFrame in the child list
|
||||
nsIFrame* child;
|
||||
parent->FirstChild(child);
|
||||
parent->FirstChild(nsnull, child);
|
||||
while ((nsnull != child) && (aFrame != child)) {
|
||||
nsSize size;
|
||||
|
||||
|
@ -262,7 +262,7 @@ public:
|
||||
NS_IMETHOD Init(nsIPresContext& aPresContext, nsIFrame* aChildList);
|
||||
NS_IMETHOD ReResolveStyleContext(nsIPresContext* aPresContext,
|
||||
nsIStyleContext* aParentContext);
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD DeleteFrame(nsIPresContext& aPresContext);
|
||||
NS_IMETHOD IsSplittable(nsSplittableType& aIsSplittable) const;
|
||||
NS_IMETHOD CreateContinuingFrame(nsIPresContext& aPresContext,
|
||||
@ -1839,10 +1839,15 @@ nsBlockFrame::List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const
|
||||
// Child frame enumeration
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsBlockFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
nsBlockFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
if (nsnull == aListName) {
|
||||
aFirstChild = (nsnull != mLines) ? mLines->mFirstChild : nsnull;
|
||||
return NS_OK;
|
||||
} else {
|
||||
aFirstChild = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@ -4064,7 +4069,7 @@ FindFloatersIn(nsIFrame* aFrame, nsVoidArray*& aArray)
|
||||
|
||||
if (NS_STYLE_DISPLAY_INLINE == display->mDisplay) {
|
||||
nsIFrame* kid;
|
||||
aFrame->FirstChild(kid);
|
||||
aFrame->FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsresult rv = FindFloatersIn(kid, aArray);
|
||||
if (NS_OK != rv) {
|
||||
@ -4376,7 +4381,7 @@ nsBlockFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext,
|
||||
#ifdef NS_DEBUG
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
NS_ASSERTION((0 == childCount) && (nsnull == firstChild),
|
||||
"deleting !empty next-in-flow");
|
||||
@ -4671,7 +4676,7 @@ nsBlockReflowState::IsLeftMostChild(nsIFrame* aFrame)
|
||||
// See if there are any non-zero sized child frames that precede
|
||||
// aFrame in the child list
|
||||
nsIFrame* child;
|
||||
parent->FirstChild(child);
|
||||
parent->FirstChild(nsnull, child);
|
||||
while ((nsnull != child) && (aFrame != child)) {
|
||||
nsSize size;
|
||||
|
||||
|
@ -118,7 +118,7 @@ nsContainerFrame::DidReflow(nsIPresContext& aPresContext,
|
||||
aStatus));
|
||||
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
if (NS_OK == kid->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
|
||||
@ -179,10 +179,17 @@ nsContainerFrame::GetCombinedRect(nsRect& aRect)
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Child frame enumeration
|
||||
|
||||
NS_METHOD nsContainerFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
NS_METHOD nsContainerFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = mFirstChild;
|
||||
return NS_OK;
|
||||
// We only know about the unnamed principal child list
|
||||
if (nsnull == aListName) {
|
||||
aFirstChild = mFirstChild;
|
||||
return NS_OK;
|
||||
|
||||
} else {
|
||||
aFirstChild = nsnull;
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@ -346,7 +353,7 @@ NS_METHOD nsContainerFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||
aEventStatus = nsEventStatus_eIgnore;
|
||||
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsRect kidRect;
|
||||
kid->GetRect(kidRect);
|
||||
@ -372,7 +379,7 @@ NS_METHOD nsContainerFrame::GetCursorAndContentAt(nsIPresContext& aPresContext,
|
||||
*aContent = mContent;
|
||||
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
nsPoint tmp;
|
||||
while (nsnull != kid) {
|
||||
nsRect kidRect;
|
||||
@ -472,7 +479,7 @@ nsContainerFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, nsIFrame*
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
|
||||
if ((0 != childCount) || (nsnull != firstChild)) {
|
||||
|
@ -55,9 +55,7 @@ public:
|
||||
PRInt32& aCursor);
|
||||
|
||||
// Child frame enumeration.
|
||||
// ChildAt() retruns null if the index is not in the range 0 .. ChildCount() - 1.
|
||||
// IndexOf() returns -1 if the frame is not in the child list.
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
|
||||
// re-resolve style context for self and children as necessary
|
||||
// Subclasses need to override if they add child lists or
|
||||
|
@ -524,10 +524,10 @@ NS_IMETHODIMP nsFrame::SizeTo(nscoord aWidth, nscoord aHeight)
|
||||
|
||||
// Child frame enumeration
|
||||
|
||||
NS_IMETHODIMP nsFrame::FirstChild(nsIFrame*& aFirstChild) const
|
||||
NS_IMETHODIMP nsFrame::FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const
|
||||
{
|
||||
aFirstChild = nsnull;
|
||||
return NS_OK;
|
||||
return nsnull == aListName ? NS_OK : NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
PRBool nsFrame::DisplaySelection(nsIPresContext& aPresContext, PRBool isOkToTurnOn)
|
||||
@ -1658,7 +1658,7 @@ void RefreshAllContentFrames(nsIFrame * aFrame, nsIContent * aContent)
|
||||
}
|
||||
NS_RELEASE(frameContent);
|
||||
|
||||
aFrame->FirstChild(aFrame);
|
||||
aFrame->FirstChild(nsnull, aFrame);
|
||||
while (aFrame) {
|
||||
RefreshAllContentFrames(aFrame, aContent);
|
||||
aFrame->GetNextSibling(aFrame);
|
||||
|
@ -133,7 +133,7 @@ public:
|
||||
NS_IMETHOD SetRect(const nsRect& aRect);
|
||||
NS_IMETHOD MoveTo(nscoord aX, nscoord aY);
|
||||
NS_IMETHOD SizeTo(nscoord aWidth, nscoord aHeight);
|
||||
NS_IMETHOD FirstChild(nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD FirstChild(nsIAtom* aListName, nsIFrame*& aFirstChild) const;
|
||||
NS_IMETHOD Paint(nsIPresContext& aPresContext,
|
||||
nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect);
|
||||
|
@ -912,7 +912,7 @@ FindFrameWithContent(nsIFrame* aFrame, nsIContent* aContent)
|
||||
}
|
||||
NS_RELEASE(frameContent);
|
||||
|
||||
aFrame->FirstChild(aFrame);
|
||||
aFrame->FirstChild(nsnull, aFrame);
|
||||
while (aFrame) {
|
||||
nsIFrame* result = FindFrameWithContent(aFrame, aContent);
|
||||
|
||||
@ -1043,8 +1043,8 @@ static void
|
||||
CompareTrees(nsIFrame* aA, nsIFrame* aB)
|
||||
{
|
||||
nsIFrame* k1, *k2;
|
||||
aA->FirstChild(k1);
|
||||
aB->FirstChild(k2);
|
||||
aA->FirstChild(nsnull, k1);
|
||||
aB->FirstChild(nsnull, k2);
|
||||
NS_ASSERTION(nsContainerFrame::LengthOf(k1) == nsContainerFrame::LengthOf(k2),
|
||||
"child counts don't match");
|
||||
|
||||
|
@ -371,7 +371,7 @@ PRBool
|
||||
nsLabelFrame::FindFirstControl(nsIFrame* aParentFrame, nsIFormControlFrame*& aResultFrame)
|
||||
{
|
||||
nsIFrame* child = nsnull;
|
||||
aParentFrame->FirstChild(child);
|
||||
aParentFrame->FirstChild(nsnull, child);
|
||||
while (nsnull != child) {
|
||||
nsIFormControlFrame* fcFrame = nsnull;
|
||||
nsresult result = child->QueryInterface(kIFormControlFrameIID, (void**)&fcFrame);
|
||||
|
@ -1073,8 +1073,15 @@ HTMLStyleSheetImpl::ConstructRootFrame(nsIPresContext* aPresContext,
|
||||
|
||||
// See if we're paginated
|
||||
if (aPresContext->IsPaginated()) {
|
||||
// nsScrollFrame* scrollFrame;
|
||||
nsIFrame* pageSequenceFrame;
|
||||
|
||||
#if 0
|
||||
// Wrap the simple page sequence frame in a scroll frame
|
||||
// XXX Only do this if it's print oreview
|
||||
if NS_SUCCEEDED(NS_NewScrollFrame(aContent, aParentFrame, scrollFrame)) {
|
||||
#endif
|
||||
|
||||
// Create a simple page sequence frame
|
||||
rv = NS_NewSimplePageSequenceFrame(aContent, aNewFrame, pageSequenceFrame);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
@ -1340,7 +1347,7 @@ HTMLStyleSheetImpl::GetAdjustedParentFrame(nsIFrame* aCurrentParentFrame,
|
||||
if (NS_STYLE_DISPLAY_TABLE_CAPTION!=aChildDisplayType)
|
||||
{
|
||||
nsIFrame *innerTableFrame=nsnull;
|
||||
aCurrentParentFrame->FirstChild(innerTableFrame);
|
||||
aCurrentParentFrame->FirstChild(nsnull, innerTableFrame);
|
||||
if (nsnull!=innerTableFrame)
|
||||
{
|
||||
const nsStyleDisplay* innerTableDisplay;
|
||||
@ -1508,7 +1515,7 @@ HTMLStyleSheetImpl::GetFrameFor(nsIPresShell* aPresShell, nsIContent* aContent)
|
||||
frame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)display);
|
||||
|
||||
if (display->IsBlockLevel() && IsScrollable(display)) {
|
||||
frame->FirstChild(frame);
|
||||
frame->FirstChild(nsnull, frame);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ NS_IMETHODIMP nsTableFrame::DidAppendRowGroup(nsTableRowGroupFrame *aRowGroupFra
|
||||
{
|
||||
nsresult rv=NS_OK;
|
||||
nsIFrame *nextRow=nsnull;
|
||||
aRowGroupFrame->FirstChild(nextRow);
|
||||
aRowGroupFrame->FirstChild(nsnull, nextRow);
|
||||
for ( ; nsnull!=nextRow; nextRow->GetNextSibling(nextRow))
|
||||
{
|
||||
const nsStyleDisplay *rowDisplay;
|
||||
@ -909,7 +909,7 @@ NS_METHOD nsTableFrame::ReBuildCellMap()
|
||||
if (PR_TRUE==IsRowGroup(rowGroupDisplay->mDisplay))
|
||||
{
|
||||
nsIFrame *rowFrame;
|
||||
rowGroupFrame->FirstChild(rowFrame);
|
||||
rowGroupFrame->FirstChild(nsnull, rowFrame);
|
||||
for ( ; nsnull!=rowFrame; rowFrame->GetNextSibling(rowFrame))
|
||||
{
|
||||
const nsStyleDisplay *rowDisplay;
|
||||
@ -2887,7 +2887,7 @@ NS_METHOD nsTableFrame::GetColumnFrame(PRInt32 aColIndex, nsTableColFrame *&aCol
|
||||
else
|
||||
{ // ah shucks, we have to go hunt for the column frame brute-force style
|
||||
nsIFrame *childFrame;
|
||||
FirstChild(childFrame);
|
||||
FirstChild(nsnull, childFrame);
|
||||
for (;;)
|
||||
{
|
||||
if (nsnull==childFrame)
|
||||
@ -2958,7 +2958,7 @@ void nsTableFrame::BuildColumnCache( nsIPresContext& aPresContext,
|
||||
if (NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP == childDisplay->mDisplay)
|
||||
{ // if it's a col group then get the columns and cache them in the CellMap
|
||||
nsTableColFrame *colFrame=nsnull;
|
||||
childFrame->FirstChild((nsIFrame *&)colFrame);
|
||||
childFrame->FirstChild(nsnull, (nsIFrame *&)colFrame);
|
||||
while (nsnull!=colFrame)
|
||||
{
|
||||
nsTableColFrame *cachedColFrame = mCellMap->GetColumnFrame(colIndex);
|
||||
@ -2976,7 +2976,7 @@ void nsTableFrame::BuildColumnCache( nsIPresContext& aPresContext,
|
||||
if (PR_TRUE==RequiresPass1Layout())
|
||||
{
|
||||
nsIFrame *rowFrame;
|
||||
childFrame->FirstChild(rowFrame);
|
||||
childFrame->FirstChild(nsnull, rowFrame);
|
||||
while (nsnull!=rowFrame)
|
||||
{
|
||||
const nsStyleDisplay *rowDisplay;
|
||||
@ -2984,7 +2984,7 @@ void nsTableFrame::BuildColumnCache( nsIPresContext& aPresContext,
|
||||
if (NS_STYLE_DISPLAY_TABLE_ROW == rowDisplay->mDisplay)
|
||||
{
|
||||
nsIFrame *cellFrame;
|
||||
rowFrame->FirstChild(cellFrame);
|
||||
rowFrame->FirstChild(nsnull, cellFrame);
|
||||
while (nsnull!=cellFrame)
|
||||
{
|
||||
/* this is the first time we are guaranteed to have both the cell frames
|
||||
@ -3015,7 +3015,7 @@ void nsTableFrame::BuildColumnCache( nsIPresContext& aPresContext,
|
||||
if (NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP == childDisplay->mDisplay)
|
||||
{
|
||||
nsTableColFrame *colFrame=nsnull;
|
||||
childFrame->FirstChild((nsIFrame *&)colFrame);
|
||||
childFrame->FirstChild(nsnull, (nsIFrame *&)colFrame);
|
||||
while (nsnull!=colFrame)
|
||||
{ // for every column, create an entry in the column cache
|
||||
// assumes that the col style has been twiddled to account for first cell width attribute
|
||||
@ -3102,7 +3102,7 @@ void nsTableFrame::InvalidateCellMap()
|
||||
if (PR_TRUE==IsRowGroup(rowGroupDisplay->mDisplay))
|
||||
{
|
||||
nsIFrame *rowFrame;
|
||||
rowGroupFrame->FirstChild(rowFrame);
|
||||
rowGroupFrame->FirstChild(nsnull, rowFrame);
|
||||
for ( ; nsnull!=rowFrame; rowFrame->GetNextSibling(rowFrame))
|
||||
{
|
||||
const nsStyleDisplay *rowDisplay;
|
||||
@ -3135,7 +3135,7 @@ nsTableFrame::CreateContinuingFrame(nsIPresContext& aPresContext,
|
||||
// add headers and footers to cf
|
||||
nsTableFrame * firstInFlow = (nsTableFrame *)GetFirstInFlow();
|
||||
nsIFrame * rg = nsnull;
|
||||
firstInFlow->FirstChild(rg);
|
||||
firstInFlow->FirstChild(nsnull, rg);
|
||||
NS_ASSERTION (nsnull!=rg, "previous frame has no children");
|
||||
PRInt32 index = 0;
|
||||
nsIFrame * bodyRowGroupFromOverflow = mOverflowList;
|
||||
@ -3427,7 +3427,7 @@ NS_METHOD nsTableFrame::GetTableFrame(nsIFrame *aSourceFrame, nsTableFrame *& aT
|
||||
// if found, the childFrame must be the inner frame
|
||||
nsresult rv;
|
||||
nsIFrame *childFrame=nsnull;
|
||||
rv = aTableFrame->FirstChild(childFrame);
|
||||
rv = aTableFrame->FirstChild(nsnull, childFrame);
|
||||
while ((NS_OK==rv) && (nsnull!=childFrame))
|
||||
{
|
||||
const nsStyleDisplay *childDisplay;
|
||||
|
@ -1213,7 +1213,7 @@ PRBool nsTableOuterFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, n
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
|
||||
NS_ASSERTION(childCount == 0, "deleting !empty next-in-flow");
|
||||
|
@ -1393,7 +1393,7 @@ PRBool nsTableRowFrame::Contains(nsPoint& aPoint)
|
||||
// if that fails, check the cells, they might span outside the row rect
|
||||
else {
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsRect kidRect;
|
||||
kid->GetRect(kidRect);
|
||||
|
@ -240,7 +240,7 @@ NS_METHOD nsTableRowGroupFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||
aEventStatus = nsEventStatus_eIgnore;
|
||||
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsRect kidRect;
|
||||
kid->GetRect(kidRect);
|
||||
@ -694,7 +694,7 @@ void nsTableRowGroupFrame::ShrinkWrapChildren(nsIPresContext* aPresContext,
|
||||
if (gsDebug) printf("TRGF SWC: for row %p...\n", rowFrame);
|
||||
// check this row for a cell with rowspans
|
||||
nsIFrame *cellFrame;
|
||||
rowFrame->FirstChild(cellFrame);
|
||||
rowFrame->FirstChild(nsnull, cellFrame);
|
||||
while (nsnull != cellFrame)
|
||||
{
|
||||
const nsStyleDisplay *childDisplay;
|
||||
@ -1109,7 +1109,7 @@ PRBool nsTableRowGroupFrame::NoRowsFollow()
|
||||
(NS_STYLE_DISPLAY_TABLE_ROW_GROUP == sibDisplay->mDisplay))
|
||||
{
|
||||
nsIFrame *childFrame=nsnull;
|
||||
nextSib->FirstChild(childFrame);
|
||||
nextSib->FirstChild(nsnull, childFrame);
|
||||
while (nsnull!=childFrame)
|
||||
{
|
||||
const nsStyleDisplay *childDisplay;
|
||||
|
@ -1073,8 +1073,15 @@ HTMLStyleSheetImpl::ConstructRootFrame(nsIPresContext* aPresContext,
|
||||
|
||||
// See if we're paginated
|
||||
if (aPresContext->IsPaginated()) {
|
||||
// nsScrollFrame* scrollFrame;
|
||||
nsIFrame* pageSequenceFrame;
|
||||
|
||||
#if 0
|
||||
// Wrap the simple page sequence frame in a scroll frame
|
||||
// XXX Only do this if it's print oreview
|
||||
if NS_SUCCEEDED(NS_NewScrollFrame(aContent, aParentFrame, scrollFrame)) {
|
||||
#endif
|
||||
|
||||
// Create a simple page sequence frame
|
||||
rv = NS_NewSimplePageSequenceFrame(aContent, aNewFrame, pageSequenceFrame);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
@ -1340,7 +1347,7 @@ HTMLStyleSheetImpl::GetAdjustedParentFrame(nsIFrame* aCurrentParentFrame,
|
||||
if (NS_STYLE_DISPLAY_TABLE_CAPTION!=aChildDisplayType)
|
||||
{
|
||||
nsIFrame *innerTableFrame=nsnull;
|
||||
aCurrentParentFrame->FirstChild(innerTableFrame);
|
||||
aCurrentParentFrame->FirstChild(nsnull, innerTableFrame);
|
||||
if (nsnull!=innerTableFrame)
|
||||
{
|
||||
const nsStyleDisplay* innerTableDisplay;
|
||||
@ -1508,7 +1515,7 @@ HTMLStyleSheetImpl::GetFrameFor(nsIPresShell* aPresShell, nsIContent* aContent)
|
||||
frame->GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)display);
|
||||
|
||||
if (display->IsBlockLevel() && IsScrollable(display)) {
|
||||
frame->FirstChild(frame);
|
||||
frame->FirstChild(nsnull, frame);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ NS_IMETHODIMP nsTableFrame::DidAppendRowGroup(nsTableRowGroupFrame *aRowGroupFra
|
||||
{
|
||||
nsresult rv=NS_OK;
|
||||
nsIFrame *nextRow=nsnull;
|
||||
aRowGroupFrame->FirstChild(nextRow);
|
||||
aRowGroupFrame->FirstChild(nsnull, nextRow);
|
||||
for ( ; nsnull!=nextRow; nextRow->GetNextSibling(nextRow))
|
||||
{
|
||||
const nsStyleDisplay *rowDisplay;
|
||||
@ -909,7 +909,7 @@ NS_METHOD nsTableFrame::ReBuildCellMap()
|
||||
if (PR_TRUE==IsRowGroup(rowGroupDisplay->mDisplay))
|
||||
{
|
||||
nsIFrame *rowFrame;
|
||||
rowGroupFrame->FirstChild(rowFrame);
|
||||
rowGroupFrame->FirstChild(nsnull, rowFrame);
|
||||
for ( ; nsnull!=rowFrame; rowFrame->GetNextSibling(rowFrame))
|
||||
{
|
||||
const nsStyleDisplay *rowDisplay;
|
||||
@ -2887,7 +2887,7 @@ NS_METHOD nsTableFrame::GetColumnFrame(PRInt32 aColIndex, nsTableColFrame *&aCol
|
||||
else
|
||||
{ // ah shucks, we have to go hunt for the column frame brute-force style
|
||||
nsIFrame *childFrame;
|
||||
FirstChild(childFrame);
|
||||
FirstChild(nsnull, childFrame);
|
||||
for (;;)
|
||||
{
|
||||
if (nsnull==childFrame)
|
||||
@ -2958,7 +2958,7 @@ void nsTableFrame::BuildColumnCache( nsIPresContext& aPresContext,
|
||||
if (NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP == childDisplay->mDisplay)
|
||||
{ // if it's a col group then get the columns and cache them in the CellMap
|
||||
nsTableColFrame *colFrame=nsnull;
|
||||
childFrame->FirstChild((nsIFrame *&)colFrame);
|
||||
childFrame->FirstChild(nsnull, (nsIFrame *&)colFrame);
|
||||
while (nsnull!=colFrame)
|
||||
{
|
||||
nsTableColFrame *cachedColFrame = mCellMap->GetColumnFrame(colIndex);
|
||||
@ -2976,7 +2976,7 @@ void nsTableFrame::BuildColumnCache( nsIPresContext& aPresContext,
|
||||
if (PR_TRUE==RequiresPass1Layout())
|
||||
{
|
||||
nsIFrame *rowFrame;
|
||||
childFrame->FirstChild(rowFrame);
|
||||
childFrame->FirstChild(nsnull, rowFrame);
|
||||
while (nsnull!=rowFrame)
|
||||
{
|
||||
const nsStyleDisplay *rowDisplay;
|
||||
@ -2984,7 +2984,7 @@ void nsTableFrame::BuildColumnCache( nsIPresContext& aPresContext,
|
||||
if (NS_STYLE_DISPLAY_TABLE_ROW == rowDisplay->mDisplay)
|
||||
{
|
||||
nsIFrame *cellFrame;
|
||||
rowFrame->FirstChild(cellFrame);
|
||||
rowFrame->FirstChild(nsnull, cellFrame);
|
||||
while (nsnull!=cellFrame)
|
||||
{
|
||||
/* this is the first time we are guaranteed to have both the cell frames
|
||||
@ -3015,7 +3015,7 @@ void nsTableFrame::BuildColumnCache( nsIPresContext& aPresContext,
|
||||
if (NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP == childDisplay->mDisplay)
|
||||
{
|
||||
nsTableColFrame *colFrame=nsnull;
|
||||
childFrame->FirstChild((nsIFrame *&)colFrame);
|
||||
childFrame->FirstChild(nsnull, (nsIFrame *&)colFrame);
|
||||
while (nsnull!=colFrame)
|
||||
{ // for every column, create an entry in the column cache
|
||||
// assumes that the col style has been twiddled to account for first cell width attribute
|
||||
@ -3102,7 +3102,7 @@ void nsTableFrame::InvalidateCellMap()
|
||||
if (PR_TRUE==IsRowGroup(rowGroupDisplay->mDisplay))
|
||||
{
|
||||
nsIFrame *rowFrame;
|
||||
rowGroupFrame->FirstChild(rowFrame);
|
||||
rowGroupFrame->FirstChild(nsnull, rowFrame);
|
||||
for ( ; nsnull!=rowFrame; rowFrame->GetNextSibling(rowFrame))
|
||||
{
|
||||
const nsStyleDisplay *rowDisplay;
|
||||
@ -3135,7 +3135,7 @@ nsTableFrame::CreateContinuingFrame(nsIPresContext& aPresContext,
|
||||
// add headers and footers to cf
|
||||
nsTableFrame * firstInFlow = (nsTableFrame *)GetFirstInFlow();
|
||||
nsIFrame * rg = nsnull;
|
||||
firstInFlow->FirstChild(rg);
|
||||
firstInFlow->FirstChild(nsnull, rg);
|
||||
NS_ASSERTION (nsnull!=rg, "previous frame has no children");
|
||||
PRInt32 index = 0;
|
||||
nsIFrame * bodyRowGroupFromOverflow = mOverflowList;
|
||||
@ -3427,7 +3427,7 @@ NS_METHOD nsTableFrame::GetTableFrame(nsIFrame *aSourceFrame, nsTableFrame *& aT
|
||||
// if found, the childFrame must be the inner frame
|
||||
nsresult rv;
|
||||
nsIFrame *childFrame=nsnull;
|
||||
rv = aTableFrame->FirstChild(childFrame);
|
||||
rv = aTableFrame->FirstChild(nsnull, childFrame);
|
||||
while ((NS_OK==rv) && (nsnull!=childFrame))
|
||||
{
|
||||
const nsStyleDisplay *childDisplay;
|
||||
|
@ -1213,7 +1213,7 @@ PRBool nsTableOuterFrame::DeleteChildsNextInFlow(nsIPresContext& aPresContext, n
|
||||
PRInt32 childCount;
|
||||
nsIFrame* firstChild;
|
||||
|
||||
nextInFlow->FirstChild(firstChild);
|
||||
nextInFlow->FirstChild(nsnull, firstChild);
|
||||
childCount = LengthOf(firstChild);
|
||||
|
||||
NS_ASSERTION(childCount == 0, "deleting !empty next-in-flow");
|
||||
|
@ -1393,7 +1393,7 @@ PRBool nsTableRowFrame::Contains(nsPoint& aPoint)
|
||||
// if that fails, check the cells, they might span outside the row rect
|
||||
else {
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsRect kidRect;
|
||||
kid->GetRect(kidRect);
|
||||
|
@ -240,7 +240,7 @@ NS_METHOD nsTableRowGroupFrame::HandleEvent(nsIPresContext& aPresContext,
|
||||
aEventStatus = nsEventStatus_eIgnore;
|
||||
|
||||
nsIFrame* kid;
|
||||
FirstChild(kid);
|
||||
FirstChild(nsnull, kid);
|
||||
while (nsnull != kid) {
|
||||
nsRect kidRect;
|
||||
kid->GetRect(kidRect);
|
||||
@ -694,7 +694,7 @@ void nsTableRowGroupFrame::ShrinkWrapChildren(nsIPresContext* aPresContext,
|
||||
if (gsDebug) printf("TRGF SWC: for row %p...\n", rowFrame);
|
||||
// check this row for a cell with rowspans
|
||||
nsIFrame *cellFrame;
|
||||
rowFrame->FirstChild(cellFrame);
|
||||
rowFrame->FirstChild(nsnull, cellFrame);
|
||||
while (nsnull != cellFrame)
|
||||
{
|
||||
const nsStyleDisplay *childDisplay;
|
||||
@ -1109,7 +1109,7 @@ PRBool nsTableRowGroupFrame::NoRowsFollow()
|
||||
(NS_STYLE_DISPLAY_TABLE_ROW_GROUP == sibDisplay->mDisplay))
|
||||
{
|
||||
nsIFrame *childFrame=nsnull;
|
||||
nextSib->FirstChild(childFrame);
|
||||
nextSib->FirstChild(nsnull, childFrame);
|
||||
while (nsnull!=childFrame)
|
||||
{
|
||||
const nsStyleDisplay *childDisplay;
|
||||
|
Loading…
Reference in New Issue
Block a user