зеркало из https://github.com/mozilla/pjs.git
use new nsHTMLReflowState ctors
This commit is contained in:
Родитель
838bbc1292
Коммит
ba18377496
|
@ -318,7 +318,6 @@ NS_IMETHODIMP nsComboboxControlFrame::Reflow(nsIPresContext& aPresConte
|
|||
}
|
||||
|
||||
// nsSize maxSize(aReflowState.availableWidth, aReflowState.availableHeight);
|
||||
nsHTMLReflowMetrics desiredSize = aDesiredSize;
|
||||
////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////
|
||||
{
|
||||
|
|
|
@ -321,8 +321,8 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
|
|||
// Try to reflow the legend into the available space. It might not fit
|
||||
nsSize legendSize(0,0);
|
||||
if (mLegendFrame) {
|
||||
nsHTMLReflowState legendReflowState(aPresContext, mLegendFrame,
|
||||
aReflowState, availSize);
|
||||
nsHTMLReflowState legendReflowState(aPresContext, aReflowState,
|
||||
mLegendFrame, availSize);
|
||||
// XXX remove when reflow state is fixed
|
||||
FieldSetHack((nsHTMLReflowState&)legendReflowState, "fieldset's legend", PR_FALSE);
|
||||
ReflowChild(mLegendFrame, aPresContext, aDesiredSize, legendReflowState, aStatus);
|
||||
|
@ -351,8 +351,8 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
|
|||
PRBool needAnotherLegendReflow = PR_FALSE;
|
||||
|
||||
// Try to reflow the area frame into the available space. It might not fit
|
||||
nsHTMLReflowState contentReflowState(aPresContext, mContentFrame,
|
||||
aReflowState, availSize);
|
||||
nsHTMLReflowState contentReflowState(aPresContext, aReflowState,
|
||||
mContentFrame, availSize);
|
||||
// XXX remove when reflow state is fixed
|
||||
FieldSetHack(contentReflowState, "fieldset's area", PR_FALSE);
|
||||
|
||||
|
@ -378,8 +378,8 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
// need to reflow the legend a 2nd time
|
||||
if (needAnotherLegendReflow && mLegendFrame) {
|
||||
nsHTMLReflowState legendReflowState(aPresContext, mLegendFrame,
|
||||
aReflowState, availSize);
|
||||
nsHTMLReflowState legendReflowState(aPresContext, aReflowState,
|
||||
mLegendFrame, availSize);
|
||||
// XXX remove when reflow state is fixed
|
||||
FieldSetHack(legendReflowState, "fieldset's legend frame", PR_FALSE);
|
||||
ReflowChild(mLegendFrame, aPresContext, aDesiredSize, legendReflowState, aStatus);
|
||||
|
|
|
@ -255,7 +255,7 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext& aPresContext,
|
|||
childFrame = mFrames.FirstChild();
|
||||
nsPoint offset(0,0);
|
||||
while (nsnull != childFrame) { // reflow, place, size the children
|
||||
nsHTMLReflowState reflowState(aPresContext, childFrame, aReflowState,
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, childFrame,
|
||||
maxSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
||||
|
|
|
@ -186,14 +186,12 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext,
|
|||
nscoord& aRowHeight)
|
||||
{
|
||||
nscoord charWidth = 0;
|
||||
nscoord charHeight = 0;
|
||||
PRInt32 numRows = ATTR_NOTSET;
|
||||
aWidthExplicit = PR_FALSE;
|
||||
aHeightExplicit = PR_FALSE;
|
||||
|
||||
aDesiredSize.width = CSS_NOTSET;
|
||||
aDesiredSize.height = CSS_NOTSET;
|
||||
nsSize textSize(0,0);
|
||||
|
||||
nsIContent* iContent = nsnull;
|
||||
aFrame->GetFormContent((nsIContent*&) iContent);
|
||||
|
|
|
@ -335,6 +335,7 @@ nsHTMLButtonControlFrame::MouseClicked(nsIPresContext* aPresContext)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
// XXX temporary hack code until new style rules are added
|
||||
static
|
||||
void ReflowTemp(nsIPresContext& aPresContext, nsHTMLButtonControlFrame* aFrame, nsRect& aRect)
|
||||
|
@ -377,6 +378,7 @@ void ReflowTemp(nsIPresContext& aPresContext, nsHTMLButtonControlFrame* aFrame,
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsHTMLButtonControlFrame::SetFocus(PRBool aOn, PRBool aRepaint)
|
||||
|
@ -443,7 +445,7 @@ nsHTMLButtonControlFrame::ShiftContents(nsIPresContext& aPresContext, PRBool aDo
|
|||
|
||||
mStyleContext->RecalcAutomaticData(&aPresContext);
|
||||
|
||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
||||
//nsRect rect(0, 0, mRect.width, mRect.height);
|
||||
//ReflowTemp(aPresContext, this, rect);
|
||||
}
|
||||
|
||||
|
@ -686,7 +688,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext& aPresContext,
|
|||
availSize.height = PR_MAX(availSize.height,0);
|
||||
}
|
||||
|
||||
nsHTMLReflowState reflowState(aPresContext, firstKid, aReflowState, availSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, firstKid, availSize);
|
||||
// XXX remove the following when the reflow state is fixed
|
||||
ButtonHack(reflowState, "html4 button's area");
|
||||
|
||||
|
|
|
@ -174,7 +174,7 @@ nsLegendFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
// reflow the child
|
||||
nsIFrame* firstKid = mFrames.FirstChild();
|
||||
nsHTMLReflowState reflowState(aPresContext, firstKid, aReflowState,
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, firstKid,
|
||||
availSize);
|
||||
//XXX remove when reflow state is fixed
|
||||
LegendHack(reflowState, "legend's area");
|
||||
|
|
|
@ -290,7 +290,7 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext,
|
|||
desiredSize = aDesiredSize;
|
||||
nsIFrame * firstChild = mFrames.FirstChild();
|
||||
|
||||
nsHTMLReflowState reflowState(aPresContext, firstChild, aReflowState, maxSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, firstChild, maxSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
if (NS_OK == firstChild->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
|
||||
htmlReflow->WillReflow(aPresContext);
|
||||
|
@ -321,7 +321,7 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext,
|
|||
mContentFrame->FirstChild(nsnull, &childFrame);
|
||||
nsPoint offset(0,0);
|
||||
while (nsnull != childFrame) { // reflow, place, size the children
|
||||
nsHTMLReflowState reflowState(aPresContext, childFrame, aReflowState, maxSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, childFrame, maxSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
||||
if (NS_OK == childFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
|
||||
|
|
|
@ -614,7 +614,7 @@ nsAreaFrame::ReflowAbsoluteFrame(nsIPresContext& aPresContext,
|
|||
|
||||
nsSize availSize(aReflowState.computedWidth, NS_UNCONSTRAINEDSIZE);
|
||||
nsHTMLReflowMetrics kidDesiredSize(nsnull);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aKidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aKidFrame,
|
||||
availSize);
|
||||
|
||||
// If it's the initial reflow, then override the reflow reason. This is
|
||||
|
|
|
@ -338,7 +338,7 @@ nsHTMLFrameOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
// Reflow the child and get its desired size
|
||||
nsHTMLReflowMetrics kidMetrics(aDesiredSize.maxElementSize);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, firstChild, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, firstChild,
|
||||
innerSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
||||
|
|
|
@ -654,7 +654,7 @@ nsHTMLFramesetFrame::ReflowPlaceChild(nsIFrame* aChild,
|
|||
}
|
||||
}
|
||||
|
||||
nsHTMLReflowState reflowState(aPresContext, aChild, aReflowState, aSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, aChild, aSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
||||
if (NS_OK == aChild->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
|
||||
|
@ -1416,8 +1416,9 @@ nsHTMLFramesetFrame::MouseDrag(nsIPresContext& aPresContext, nsGUIEvent* aEvent)
|
|||
nsIRenderingContext *acx;
|
||||
aPresContext.GetShell(getter_AddRefs(shell));
|
||||
shell->CreateRenderingContext(this, &acx);
|
||||
// XXX this can't possibly be right, but oh well...
|
||||
nsHTMLReflowState state(aPresContext, this, eReflowReason_Initial,
|
||||
size, acx);
|
||||
acx, size);
|
||||
state.reason = eReflowReason_Incremental;
|
||||
nsReflowStatus status;
|
||||
nsDidReflowStatus didStatus = 0;
|
||||
|
|
|
@ -614,7 +614,7 @@ nsAreaFrame::ReflowAbsoluteFrame(nsIPresContext& aPresContext,
|
|||
|
||||
nsSize availSize(aReflowState.computedWidth, NS_UNCONSTRAINEDSIZE);
|
||||
nsHTMLReflowMetrics kidDesiredSize(nsnull);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aKidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aKidFrame,
|
||||
availSize);
|
||||
|
||||
// If it's the initial reflow, then override the reflow reason. This is
|
||||
|
|
|
@ -338,7 +338,7 @@ nsHTMLFrameOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
// Reflow the child and get its desired size
|
||||
nsHTMLReflowMetrics kidMetrics(aDesiredSize.maxElementSize);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, firstChild, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, firstChild,
|
||||
innerSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
||||
|
|
|
@ -654,7 +654,7 @@ nsHTMLFramesetFrame::ReflowPlaceChild(nsIFrame* aChild,
|
|||
}
|
||||
}
|
||||
|
||||
nsHTMLReflowState reflowState(aPresContext, aChild, aReflowState, aSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, aChild, aSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
||||
if (NS_OK == aChild->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
|
||||
|
@ -1416,8 +1416,9 @@ nsHTMLFramesetFrame::MouseDrag(nsIPresContext& aPresContext, nsGUIEvent* aEvent)
|
|||
nsIRenderingContext *acx;
|
||||
aPresContext.GetShell(getter_AddRefs(shell));
|
||||
shell->CreateRenderingContext(this, &acx);
|
||||
// XXX this can't possibly be right, but oh well...
|
||||
nsHTMLReflowState state(aPresContext, this, eReflowReason_Initial,
|
||||
size, acx);
|
||||
acx, size);
|
||||
state.reason = eReflowReason_Incremental;
|
||||
nsReflowStatus status;
|
||||
nsDidReflowStatus didStatus = 0;
|
||||
|
|
|
@ -318,7 +318,6 @@ NS_IMETHODIMP nsComboboxControlFrame::Reflow(nsIPresContext& aPresConte
|
|||
}
|
||||
|
||||
// nsSize maxSize(aReflowState.availableWidth, aReflowState.availableHeight);
|
||||
nsHTMLReflowMetrics desiredSize = aDesiredSize;
|
||||
////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////
|
||||
{
|
||||
|
|
|
@ -321,8 +321,8 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
|
|||
// Try to reflow the legend into the available space. It might not fit
|
||||
nsSize legendSize(0,0);
|
||||
if (mLegendFrame) {
|
||||
nsHTMLReflowState legendReflowState(aPresContext, mLegendFrame,
|
||||
aReflowState, availSize);
|
||||
nsHTMLReflowState legendReflowState(aPresContext, aReflowState,
|
||||
mLegendFrame, availSize);
|
||||
// XXX remove when reflow state is fixed
|
||||
FieldSetHack((nsHTMLReflowState&)legendReflowState, "fieldset's legend", PR_FALSE);
|
||||
ReflowChild(mLegendFrame, aPresContext, aDesiredSize, legendReflowState, aStatus);
|
||||
|
@ -351,8 +351,8 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
|
|||
PRBool needAnotherLegendReflow = PR_FALSE;
|
||||
|
||||
// Try to reflow the area frame into the available space. It might not fit
|
||||
nsHTMLReflowState contentReflowState(aPresContext, mContentFrame,
|
||||
aReflowState, availSize);
|
||||
nsHTMLReflowState contentReflowState(aPresContext, aReflowState,
|
||||
mContentFrame, availSize);
|
||||
// XXX remove when reflow state is fixed
|
||||
FieldSetHack(contentReflowState, "fieldset's area", PR_FALSE);
|
||||
|
||||
|
@ -378,8 +378,8 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
// need to reflow the legend a 2nd time
|
||||
if (needAnotherLegendReflow && mLegendFrame) {
|
||||
nsHTMLReflowState legendReflowState(aPresContext, mLegendFrame,
|
||||
aReflowState, availSize);
|
||||
nsHTMLReflowState legendReflowState(aPresContext, aReflowState,
|
||||
mLegendFrame, availSize);
|
||||
// XXX remove when reflow state is fixed
|
||||
FieldSetHack(legendReflowState, "fieldset's legend frame", PR_FALSE);
|
||||
ReflowChild(mLegendFrame, aPresContext, aDesiredSize, legendReflowState, aStatus);
|
||||
|
|
|
@ -255,7 +255,7 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext& aPresContext,
|
|||
childFrame = mFrames.FirstChild();
|
||||
nsPoint offset(0,0);
|
||||
while (nsnull != childFrame) { // reflow, place, size the children
|
||||
nsHTMLReflowState reflowState(aPresContext, childFrame, aReflowState,
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, childFrame,
|
||||
maxSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
||||
|
|
|
@ -186,14 +186,12 @@ nsFormControlHelper::CalculateSize (nsIPresContext* aPresContext,
|
|||
nscoord& aRowHeight)
|
||||
{
|
||||
nscoord charWidth = 0;
|
||||
nscoord charHeight = 0;
|
||||
PRInt32 numRows = ATTR_NOTSET;
|
||||
aWidthExplicit = PR_FALSE;
|
||||
aHeightExplicit = PR_FALSE;
|
||||
|
||||
aDesiredSize.width = CSS_NOTSET;
|
||||
aDesiredSize.height = CSS_NOTSET;
|
||||
nsSize textSize(0,0);
|
||||
|
||||
nsIContent* iContent = nsnull;
|
||||
aFrame->GetFormContent((nsIContent*&) iContent);
|
||||
|
|
|
@ -335,6 +335,7 @@ nsHTMLButtonControlFrame::MouseClicked(nsIPresContext* aPresContext)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
// XXX temporary hack code until new style rules are added
|
||||
static
|
||||
void ReflowTemp(nsIPresContext& aPresContext, nsHTMLButtonControlFrame* aFrame, nsRect& aRect)
|
||||
|
@ -377,6 +378,7 @@ void ReflowTemp(nsIPresContext& aPresContext, nsHTMLButtonControlFrame* aFrame,
|
|||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
nsHTMLButtonControlFrame::SetFocus(PRBool aOn, PRBool aRepaint)
|
||||
|
@ -443,7 +445,7 @@ nsHTMLButtonControlFrame::ShiftContents(nsIPresContext& aPresContext, PRBool aDo
|
|||
|
||||
mStyleContext->RecalcAutomaticData(&aPresContext);
|
||||
|
||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
||||
//nsRect rect(0, 0, mRect.width, mRect.height);
|
||||
//ReflowTemp(aPresContext, this, rect);
|
||||
}
|
||||
|
||||
|
@ -686,7 +688,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext& aPresContext,
|
|||
availSize.height = PR_MAX(availSize.height,0);
|
||||
}
|
||||
|
||||
nsHTMLReflowState reflowState(aPresContext, firstKid, aReflowState, availSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, firstKid, availSize);
|
||||
// XXX remove the following when the reflow state is fixed
|
||||
ButtonHack(reflowState, "html4 button's area");
|
||||
|
||||
|
|
|
@ -472,7 +472,7 @@ nsLabelFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
// reflow the child
|
||||
nsIFrame* firstKid = mFrames.FirstChild();
|
||||
nsHTMLReflowState reflowState(aPresContext, firstKid, aReflowState, availSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, firstKid, availSize);
|
||||
// XXX remove when reflow state is fixed
|
||||
LabelHack(reflowState, "label's area");
|
||||
ReflowChild(firstKid, aPresContext, aDesiredSize, reflowState, aStatus);
|
||||
|
|
|
@ -174,7 +174,7 @@ nsLegendFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
// reflow the child
|
||||
nsIFrame* firstKid = mFrames.FirstChild();
|
||||
nsHTMLReflowState reflowState(aPresContext, firstKid, aReflowState,
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, firstKid,
|
||||
availSize);
|
||||
//XXX remove when reflow state is fixed
|
||||
LegendHack(reflowState, "legend's area");
|
||||
|
|
|
@ -290,7 +290,7 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext,
|
|||
desiredSize = aDesiredSize;
|
||||
nsIFrame * firstChild = mFrames.FirstChild();
|
||||
|
||||
nsHTMLReflowState reflowState(aPresContext, firstChild, aReflowState, maxSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, firstChild, maxSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
if (NS_OK == firstChild->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
|
||||
htmlReflow->WillReflow(aPresContext);
|
||||
|
@ -321,7 +321,7 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext,
|
|||
mContentFrame->FirstChild(nsnull, &childFrame);
|
||||
nsPoint offset(0,0);
|
||||
while (nsnull != childFrame) { // reflow, place, size the children
|
||||
nsHTMLReflowState reflowState(aPresContext, childFrame, aReflowState, maxSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, childFrame, maxSize);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
||||
if (NS_OK == childFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow)) {
|
||||
|
|
|
@ -475,7 +475,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext& aPresContext,
|
|||
kidSize.width=kidSize.height=kidSize.ascent=kidSize.descent=0;
|
||||
SetPriorAvailWidth(aReflowState.availableWidth);
|
||||
nsIFrame* firstKid = mFrames.FirstChild();
|
||||
nsHTMLReflowState kidReflowState(aPresContext, firstKid, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, firstKid,
|
||||
availSize);
|
||||
|
||||
ReflowChild(firstKid, aPresContext, kidSize, kidReflowState, aStatus);
|
||||
|
|
|
@ -179,7 +179,7 @@ NS_METHOD nsTableColGroupFrame::Reflow(nsIPresContext& aPresContext,
|
|||
// Give the child frame a chance to reflow, even though we know it'll have 0 size
|
||||
nsHTMLReflowMetrics kidSize(nsnull);
|
||||
// XXX Use a valid reason...
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
||||
nsSize(0,0), eReflowReason_Initial);
|
||||
|
||||
nsReflowStatus status;
|
||||
|
@ -468,9 +468,9 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsChild(nsIPresContext& aPresC
|
|||
|
||||
// Pass along the reflow command
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aNextFrame,
|
||||
aReflowState,
|
||||
nsSize(aReflowState.availableWidth, aReflowState.availableHeight));
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aNextFrame,
|
||||
nsSize(aReflowState.availableWidth,
|
||||
aReflowState.availableHeight));
|
||||
rv = ReflowChild(aNextFrame, aPresContext, desiredSize, kidReflowState, aStatus);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
|
|
@ -49,12 +49,12 @@
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
static PRBool gsDebug = PR_FALSE;
|
||||
static PRBool gsDebugCLD = PR_FALSE;
|
||||
//static PRBool gsDebugCLD = PR_FALSE;
|
||||
static PRBool gsDebugNT = PR_FALSE;
|
||||
static PRBool gsDebugIR = PR_FALSE;
|
||||
#else
|
||||
static const PRBool gsDebug = PR_FALSE;
|
||||
static const PRBool gsDebugCLD = PR_FALSE;
|
||||
//static const PRBool gsDebugCLD = PR_FALSE;
|
||||
static const PRBool gsDebugNT = PR_FALSE;
|
||||
static const PRBool gsDebugIR = PR_FALSE;
|
||||
#endif
|
||||
|
@ -279,15 +279,15 @@ nsTableFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
nsTableFrame::nsTableFrame()
|
||||
: nsHTMLContainerFrame(),
|
||||
mCellMap(nsnull),
|
||||
mColCache(nsnull),
|
||||
mTableLayoutStrategy(nsnull),
|
||||
mFirstPassValid(PR_FALSE),
|
||||
mColumnWidthsValid(PR_FALSE),
|
||||
mFirstPassValid(PR_FALSE),
|
||||
mColumnCacheValid(PR_FALSE),
|
||||
mCellMapValid(PR_TRUE),
|
||||
mIsInvariantWidth(PR_FALSE),
|
||||
mHasScrollableRowGroup(PR_FALSE)
|
||||
mHasScrollableRowGroup(PR_FALSE),
|
||||
mCellMap(nsnull),
|
||||
mColCache(nsnull),
|
||||
mTableLayoutStrategy(nsnull)
|
||||
{
|
||||
mEffectiveColCount = -1; // -1 means uninitialized
|
||||
mColumnWidthsSet=PR_FALSE;
|
||||
|
@ -697,7 +697,6 @@ PRInt32 nsTableFrame::GetEffectiveCOLSAttribute()
|
|||
nsCellMap *cellMap = GetCellMap();
|
||||
NS_PRECONDITION (nsnull!=cellMap, "null cellMap.");
|
||||
PRInt32 result;
|
||||
nsIFrame *tableFrame = this;
|
||||
const nsStyleTable *tableStyle=nsnull;
|
||||
GetStyleData(eStyleStruct_Table, (const nsStyleStruct *&)tableStyle);
|
||||
result = tableStyle->mCols;
|
||||
|
@ -2565,10 +2564,6 @@ NS_METHOD nsTableFrame::ResizeReflowPass1(nsIPresContext& aPresContext,
|
|||
nsSize kidMaxSize(0,0);
|
||||
nsHTMLReflowMetrics kidSize(&kidMaxSize);
|
||||
nscoord y = 0;
|
||||
nscoord maxAscent = 0;
|
||||
nscoord maxDescent = 0;
|
||||
PRInt32 contentOffset=0;
|
||||
nsIFrame* prevKidFrame = nsnull;/* XXX incremental reflow! */
|
||||
|
||||
// Compute the insets (sum of border and padding)
|
||||
// XXX: since this is pass1 reflow and where we place the rowgroup frames is irrelevant, insets are probably a waste
|
||||
|
@ -2586,7 +2581,7 @@ NS_METHOD nsTableFrame::ResizeReflowPass1(nsIPresContext& aPresContext,
|
|||
(NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP != childDisplay->mDisplay) &&
|
||||
(NS_STYLE_DISPLAY_TABLE_ROW_GROUP != childDisplay->mDisplay) )
|
||||
{ // it's an unknown frame type, give it a generic reflow and ignore the results
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
||||
availSize, aReason);
|
||||
if (PR_TRUE==gsDebugIR) printf("\nTIF IR: Reflow Pass 1 of unknown frame %p of type %d with reason=%d\n",
|
||||
kidFrame, childDisplay->mDisplay, aReason);
|
||||
|
@ -2594,8 +2589,7 @@ NS_METHOD nsTableFrame::ResizeReflowPass1(nsIPresContext& aPresContext,
|
|||
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, aStatus);
|
||||
continue;
|
||||
}
|
||||
nsSize maxKidElementSize(0,0);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
||||
availSize, aReason);
|
||||
// Note: we don't bother checking here for whether we should clear the
|
||||
// isTopOfPage reflow state flag, because we're dealing with an unconstrained
|
||||
|
@ -2635,8 +2629,7 @@ NS_METHOD nsTableFrame::ResizeReflowPass1(nsIPresContext& aPresContext,
|
|||
kidFrame=mColGroups.FirstChild();
|
||||
for ( ; nsnull != kidFrame; kidFrame->GetNextSibling(&kidFrame))
|
||||
{
|
||||
nsSize maxKidElementSize(0,0);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
||||
availSize, aReason);
|
||||
if (PR_TRUE==gsDebugIR) printf("\nTIF IR: Reflow Pass 1 of colgroup frame %p with reason=%d\n", kidFrame, aReason);
|
||||
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, aStatus);
|
||||
|
@ -2680,8 +2673,6 @@ NS_METHOD nsTableFrame::ResizeReflowPass2(nsIPresContext& aPresContext,
|
|||
InnerTableReflowState state(aPresContext, aReflowState, borderPadding);
|
||||
|
||||
// now that we've computed the column width information, reflow all children
|
||||
nsSize kidMaxSize(0,0);
|
||||
nsIFrame* prevKidFrame = nsnull;/* XXX incremental reflow! */
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
//PreReflowCheck();
|
||||
|
@ -2895,7 +2886,6 @@ NS_METHOD nsTableFrame::AdjustForCollapsingCols(nsIPresContext& aPresContext,
|
|||
const nsStyleDisplay* groupDisplay;
|
||||
groupFrame->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)groupDisplay));
|
||||
PRBool collapseGroup = (NS_STYLE_VISIBILITY_COLLAPSE == groupDisplay->mVisible);
|
||||
nsRect zeroRect(0, 0, 0, 0);
|
||||
nsIFrame* colFrame;
|
||||
groupFrame->FirstChild(nsnull, &colFrame);
|
||||
while (nsnull != colFrame) {
|
||||
|
@ -3088,6 +3078,7 @@ NS_METHOD nsTableFrame::IR_TargetIsMe(nsIPresContext& aPresContext,
|
|||
case nsIReflowCommand::PushReflow:
|
||||
case nsIReflowCommand::CheckPullupReflow :
|
||||
case nsIReflowCommand::UserDefined :
|
||||
default:
|
||||
NS_NOTYETIMPLEMENTED("unimplemented reflow command type");
|
||||
rv = NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (PR_TRUE==gsDebugIR) printf("TIF IR: reflow command not implemented.\n");
|
||||
|
@ -3390,9 +3381,8 @@ NS_METHOD nsTableFrame::IR_TargetIsChild(nsIPresContext& aPresContext,
|
|||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
// XXX Correctly compute the available space...
|
||||
nsSize availSpace(aReflowState.reflowState.availableWidth, aReflowState.reflowState.availableHeight);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aNextFrame,
|
||||
aReflowState.reflowState,
|
||||
availSpace);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
aNextFrame, availSpace);
|
||||
|
||||
rv = ReflowChild(aNextFrame, aPresContext, desiredSize, kidReflowState, aStatus);
|
||||
|
||||
|
@ -3573,9 +3563,8 @@ NS_METHOD nsTableFrame::ReflowMappedChildren(nsIPresContext& aPresContext,
|
|||
borderPadding += padding;
|
||||
|
||||
// Reflow the child into the available space
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame,
|
||||
aReflowState.reflowState, kidAvailSize,
|
||||
reason);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
kidFrame, kidAvailSize, reason);
|
||||
if ((nsnull != firstRowGroupFrame) && (kidFrame != firstRowGroupFrame)) {
|
||||
// If this isn't the first row group frame or the header or footer, then
|
||||
// we can't be at the top of the page anymore...
|
||||
|
@ -3653,7 +3642,8 @@ NS_METHOD nsTableFrame::ReflowMappedChildren(nsIPresContext& aPresContext,
|
|||
}
|
||||
else
|
||||
{// it's an unknown frame type, give it a generic reflow and ignore the results
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState.reflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext,
|
||||
aReflowState.reflowState, kidFrame,
|
||||
nsSize(0,0), eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
if (PR_TRUE==gsDebug) printf("\nTIF : Reflow Pass 2 of unknown frame %p of type %d with reason=%d\n",
|
||||
|
@ -3729,8 +3719,8 @@ NS_METHOD nsTableFrame::PullUpChildren(nsIPresContext& aPresContext,
|
|||
aStatus = NS_FRAME_NOT_COMPLETE;
|
||||
break;
|
||||
}
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame,
|
||||
aReflowState.reflowState, aReflowState.availSize,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
kidFrame, aReflowState.availSize,
|
||||
eReflowReason_Resize);
|
||||
|
||||
rv = ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, aStatus);
|
||||
|
@ -4014,7 +4004,6 @@ nscoord nsTableFrame::ComputeDesiredHeight(nsIPresContext& aPresContext,
|
|||
if (PR_TRUE==IsRowGroup(rowGroupDisplay->mDisplay))
|
||||
{ // the rows in rowGroupFrame need to be expanded by rowHeightDelta[i]
|
||||
// and the rowgroup itself needs to be expanded by SUM(row height deltas)
|
||||
nscoord excessForRowGroup=0;
|
||||
nsIFrame * rowFrame=nsnull;
|
||||
rv = rowGroupFrame->FirstChild(nsnull, &rowFrame);
|
||||
while ((NS_SUCCEEDED(rv)) && (nsnull!=rowFrame))
|
||||
|
@ -4180,7 +4169,7 @@ nsTableFrame::SetColumnStyleFromCell(nsIPresContext & aPresContext,
|
|||
float width = cellPosition->mWidth.GetPercentValue();
|
||||
colPosition->mWidth.SetPercentValue(width);
|
||||
if (PR_TRUE==gsDebug)
|
||||
printf("TIF SetCSFromCell: col percent width set to %d from cell", width);
|
||||
printf("TIF SetCSFromCell: col percent width set to %g from cell", width);
|
||||
}
|
||||
colFrame->SetWidthSource(nsTableColFrame::eWIDTH_SOURCE_CELL);
|
||||
}
|
||||
|
@ -4584,8 +4573,6 @@ void nsTableFrame::MapHTMLBorderStyle(nsStyleSpacing& aSpacingStyle, nscoord aBo
|
|||
|
||||
PRBool nsTableFrame::ConvertToPixelValue(nsHTMLValue& aValue, PRInt32 aDefault, PRInt32& aResult)
|
||||
{
|
||||
PRInt32 result = 0;
|
||||
|
||||
if (aValue.GetUnit() == eHTMLUnit_Pixel)
|
||||
aResult = aValue.GetPixelValue();
|
||||
else if (aValue.GetUnit() == eHTMLUnit_Empty)
|
||||
|
|
|
@ -291,8 +291,9 @@ nsresult nsTableOuterFrame::IR_TargetIsCaptionFrame(nsIPresContext& aPres
|
|||
if (PR_TRUE==gsDebugIR) printf("TOF IR: passing down incremental reflow command to caption.\n");
|
||||
nsSize captionMES(0,0);
|
||||
nsHTMLReflowMetrics captionSize(&captionMES);
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(mRect.width,
|
||||
aReflowState.reflowState.availableHeight),
|
||||
aReflowState.reflowState.reason);
|
||||
|
@ -333,8 +334,9 @@ nsresult nsTableOuterFrame::IR_TargetIsCaptionFrame(nsIPresContext& aPres
|
|||
tableWidth = mMinCaptionWidth;
|
||||
}
|
||||
nsHTMLReflowMetrics innerSize(aDesiredSize.maxElementSize);
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(tableWidth, aReflowState.reflowState.availableHeight),
|
||||
eReflowReason_Resize);
|
||||
rv = ReflowChild(mInnerTableFrame, aPresContext, innerSize, innerReflowState, aStatus);
|
||||
|
@ -449,6 +451,7 @@ nsresult nsTableOuterFrame::IR_TargetIsMe(nsIPresContext& aPresContext,
|
|||
case nsIReflowCommand::PushReflow:
|
||||
case nsIReflowCommand::CheckPullupReflow :
|
||||
case nsIReflowCommand::UserDefined :
|
||||
default:
|
||||
NS_NOTYETIMPLEMENTED("unimplemented reflow command type");
|
||||
rv = NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: reflow command not implemented.\n");
|
||||
|
@ -476,8 +479,9 @@ nsresult nsTableOuterFrame::IR_InnerTableReflow(nsIPresContext& aPresCont
|
|||
nsHTMLReflowMetrics innerSize(aDesiredSize.maxElementSize);
|
||||
nscoord tableMaxWidth = PR_MAX(aReflowState.reflowState.availableWidth, mMinCaptionWidth);
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: mincaptionWidth=%d, tableMaxWidth=%d.\n", mMinCaptionWidth, tableMaxWidth);
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(tableMaxWidth, aReflowState.reflowState.availableHeight));
|
||||
rv = ReflowChild(mInnerTableFrame, aPresContext, innerSize, innerReflowState, aStatus);
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: inner table reflow returned %d with width=%d height=%d\n",
|
||||
|
@ -495,8 +499,9 @@ nsresult nsTableOuterFrame::IR_InnerTableReflow(nsIPresContext& aPresCont
|
|||
PRBool captionWasReflowed=PR_FALSE;
|
||||
if (priorInnerTableRect.width!=innerSize.width)
|
||||
{ // the table width changed, so reflow the caption
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(innerSize.width,
|
||||
aReflowState.reflowState.availableHeight),
|
||||
eReflowReason_Resize);
|
||||
|
@ -616,8 +621,9 @@ nsresult nsTableOuterFrame::IR_CaptionInserted(nsIPresContext& aPresConte
|
|||
if (PR_TRUE==gsDebugIR) printf("TOF IR: initial-reflowing caption\n");
|
||||
nsSize maxElementSize;
|
||||
nsHTMLReflowMetrics captionSize(&maxElementSize);
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(mRect.width, aReflowState.reflowState.availableHeight),
|
||||
eReflowReason_Initial);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
@ -646,8 +652,9 @@ nsresult nsTableOuterFrame::IR_CaptionInserted(nsIPresContext& aPresConte
|
|||
if ((oldCaptionMES != mMinCaptionWidth) && (mMinCaptionWidth > mRect.width))
|
||||
{
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: resize-reflowing inner table\n");
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(mMinCaptionWidth, aReflowState.reflowState.availableHeight),
|
||||
eReflowReason_Resize);
|
||||
rv = ReflowChild(mInnerTableFrame, aPresContext, innerSize, innerReflowState, aStatus);
|
||||
|
@ -700,8 +707,9 @@ nsresult nsTableOuterFrame::IR_CaptionRemoved(nsIPresContext& aPresContex
|
|||
if (oldMinCaptionWidth > mRect.width)
|
||||
{ // the old caption width had an effect on the inner table width, so reflow the inner table
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: reflowing inner table\n");
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(aReflowState.reflowState.availableWidth,
|
||||
aReflowState.reflowState.availableHeight));
|
||||
// ReflowChild sets MES
|
||||
|
@ -907,8 +915,9 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (nsnull != mCaptionFrame) {
|
||||
nsSize maxElementSize;
|
||||
nsHTMLReflowMetrics captionSize(&maxElementSize);
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
aReflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE),
|
||||
eReflowReason_Initial);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
@ -936,8 +945,9 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
|
||||
// First reflow the inner table
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(tableWidth, aReflowState.availableHeight));
|
||||
nsHTMLReflowMetrics innerSize(aDesiredSize.maxElementSize);
|
||||
|
||||
|
@ -972,8 +982,9 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
|
||||
// Reflow the caption. Let it be as high as it wants
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
state.reflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(innerSize.width, NS_UNCONSTRAINEDSIZE),
|
||||
eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics captionSize(nsnull);
|
||||
|
@ -1039,7 +1050,7 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
if (gsTiming) {
|
||||
PRIntervalTime endTime = PR_IntervalNow();
|
||||
printf("Table reflow took %ld ticks for frame %d\n",
|
||||
printf("Table reflow took %d ticks for frame %p\n",
|
||||
endTime-startTime, this);/* XXX need to use LL_* macros! */
|
||||
}
|
||||
|
||||
|
|
|
@ -224,10 +224,11 @@ nsTableRowFrame::DidResize(nsIPresContext& aPresContext,
|
|||
cellFrame->SizeTo(cellFrameSize.width, cellHeight);
|
||||
if (gsDebug) printf("given height %d\n", cellHeight);
|
||||
// realign cell content based on the new height
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, cellFrame,
|
||||
aReflowState, nsSize(cellFrameSize.width, cellHeight),
|
||||
eReflowReason_Resize);
|
||||
/*nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState,
|
||||
cellFrame,
|
||||
nsSize(cellFrameSize.width, cellHeight),
|
||||
eReflowReason_Resize);*/
|
||||
//XXX: the following reflow is necessary for any content of the cell
|
||||
// whose height is a percent of the cell's height (maybe indirectly.)
|
||||
// But some content crashes when this reflow is issued, to be investigated
|
||||
|
@ -536,7 +537,7 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
const nsStyleDisplay *rowDisplay;
|
||||
GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)rowDisplay);
|
||||
nsIFrame* kidFrame=GetFirstChildForDirection(rowDisplay->mDirection);
|
||||
for (kidFrame; nsnull != kidFrame; )
|
||||
while (nsnull != kidFrame)
|
||||
{
|
||||
const nsStyleDisplay *kidDisplay;
|
||||
kidFrame->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)kidDisplay));
|
||||
|
@ -560,8 +561,8 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
aReflowState.x += aReflowState.tableFrame->GetColumnWidth(colIndex);
|
||||
aReflowState.x += cellSpacingX;
|
||||
if (PR_TRUE==gsDebug)
|
||||
printf(" Row: in loop, aReflowState.x set to %d from cellSpacing %d and col width\n",
|
||||
aReflowState.x, aReflowState.tableFrame->GetColumnWidth(colIndex), cellSpacingX);
|
||||
printf(" Row: in loop, aReflowState.x set to %d from cellSpacing %d and col width %d\n",
|
||||
aReflowState.x, cellSpacingX, aReflowState.tableFrame->GetColumnWidth(colIndex));
|
||||
}
|
||||
}
|
||||
aReflowState.x += cellSpacingX;
|
||||
|
@ -583,7 +584,7 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
if (PR_TRUE==gsDebug)
|
||||
printf(" Row: in loop, availWidth set to %d from colIndex %d width %d and cellSpacing\n",
|
||||
availWidth, cellColIndex, aReflowState.tableFrame->GetColumnWidth(cellColIndex+numColSpan), cellSpacingX);
|
||||
availWidth, cellColIndex, aReflowState.tableFrame->GetColumnWidth(cellColIndex+numColSpan));
|
||||
}
|
||||
if (PR_TRUE==gsDebug) printf(" Row: availWidth for this cell is %d\n", availWidth);
|
||||
|
||||
|
@ -606,8 +607,9 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
nsSize kidAvailSize(availWidth, aReflowState.reflowState.availableHeight);
|
||||
|
||||
// Reflow the child
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame,
|
||||
aReflowState.reflowState, kidAvailSize,
|
||||
nsHTMLReflowState kidReflowState(aPresContext,
|
||||
aReflowState.reflowState, kidFrame,
|
||||
kidAvailSize,
|
||||
eReflowReason_Resize);
|
||||
if (gsDebug) printf ("Row %p RR: avail=%d\n", this, availWidth);
|
||||
nsReflowStatus status;
|
||||
|
@ -686,7 +688,8 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
else
|
||||
{// it's an unknown frame type, give it a generic reflow and ignore the results
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState.reflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
kidFrame,
|
||||
nsSize(0,0), eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
if (PR_TRUE==gsDebug) printf("\nRow: Resize Reflow of unknown frame %p of type %d with reason=%d\n",
|
||||
|
@ -741,13 +744,9 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext,
|
|||
{
|
||||
// Place our children, one at a time, until we are out of children
|
||||
nsSize kidMaxElementSize(0,0);
|
||||
PRInt32 kidIndex = 0;
|
||||
PRInt32 colIndex = 0;
|
||||
nsIFrame* prevKidFrame = nsnull;
|
||||
nscoord maxTopMargin = 0;
|
||||
nscoord maxBottomMargin = 0;
|
||||
nscoord x = 0;
|
||||
PRBool isFirst=PR_TRUE;
|
||||
PRBool tableLayoutStrategy=NS_STYLE_TABLE_LAYOUT_AUTO;
|
||||
nsTableFrame* table = aReflowState.tableFrame;
|
||||
nsresult rv = NS_OK;
|
||||
|
@ -800,8 +799,9 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext,
|
|||
kidAvailSize.SizeTo(table->GetColumnWidth(colIndex), NS_UNCONSTRAINEDSIZE);
|
||||
}
|
||||
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame,
|
||||
aReflowState.reflowState, kidAvailSize,
|
||||
nsHTMLReflowState kidReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
kidFrame, kidAvailSize,
|
||||
eReflowReason_Initial);
|
||||
|
||||
if (gsDebug) printf ("%p InitR: avail=%d\n", this, kidAvailSize.width);
|
||||
|
@ -841,8 +841,8 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
else
|
||||
{// it's an unknown frame type, give it a generic reflow and ignore the results
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState.reflowState,
|
||||
nsSize(0,0), eReflowReason_Initial);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
kidFrame, nsSize(0,0), eReflowReason_Initial);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
if (PR_TRUE==gsDebug) printf("\nTIF : Reflow Pass 2 of unknown frame %p of type %d with reason=%d\n",
|
||||
kidFrame, kidDisplay->mDisplay, eReflowReason_Initial);
|
||||
|
@ -1059,6 +1059,7 @@ NS_METHOD nsTableRowFrame::IR_TargetIsMe(nsIPresContext& aPresContext,
|
|||
case nsIReflowCommand::PushReflow:
|
||||
case nsIReflowCommand::CheckPullupReflow :
|
||||
case nsIReflowCommand::UserDefined :
|
||||
default:
|
||||
NS_NOTYETIMPLEMENTED("unimplemented reflow command type");
|
||||
rv = NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (PR_TRUE==gsDebugIR) printf("TRF IR: reflow command not implemented.\n");
|
||||
|
@ -1284,8 +1285,9 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext& aPresContext,
|
|||
// Pass along the reflow command
|
||||
nsSize kidMaxElementSize;
|
||||
nsHTMLReflowMetrics desiredSize(&kidMaxElementSize);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aNextFrame, aReflowState.reflowState,
|
||||
kidAvailSize);
|
||||
nsHTMLReflowState kidReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
aNextFrame, kidAvailSize);
|
||||
|
||||
// XXX Unfortunately we need to reflow the child several times.
|
||||
// The first time is for the incremental reflow command. We can't pass in
|
||||
|
@ -1416,8 +1418,9 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext,
|
|||
{ // this resize reflow is necessary to place the cells correctly in the case of rowspans and colspans.
|
||||
// It is very efficient. It does not actually need to pass a reflow down to the cells.
|
||||
nsSize availSpace(aReflowState.availableWidth, aReflowState.availableHeight);
|
||||
nsHTMLReflowState resizeReflowState(aPresContext, (nsIFrame *)this,
|
||||
nsHTMLReflowState resizeReflowState(aPresContext,
|
||||
(const nsHTMLReflowState&)(*(aReflowState.parentReflowState)),
|
||||
(nsIFrame *)this,
|
||||
availSpace,
|
||||
eReflowReason_Resize);
|
||||
RowReflowState rowResizeReflowState(resizeReflowState, tableFrame);
|
||||
|
@ -1499,7 +1502,7 @@ void nsTableRowFrame::ReflowCellFrame(nsIPresContext& aPresContext,
|
|||
aCellFrame->GetSize(cellSize);
|
||||
|
||||
nsSize availSize(cellSize.width, aAvailableHeight);
|
||||
nsHTMLReflowState cellReflowState(aPresContext, aCellFrame, aReflowState, availSize,
|
||||
nsHTMLReflowState cellReflowState(aPresContext, aReflowState, aCellFrame, availSize,
|
||||
eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
|
||||
|
|
|
@ -406,7 +406,7 @@ NS_METHOD nsTableRowGroupFrame::ReflowMappedChildren(nsIPresContext& aPresC
|
|||
// it wants. We'll deal with splitting later after we've computed the row
|
||||
// heights, taking into account cells with row spans...
|
||||
kidAvailSize.height = NS_UNCONSTRAINEDSIZE;
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState.reflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState, kidFrame,
|
||||
kidAvailSize, aReason);
|
||||
if (kidFrame != mFrames.FirstChild()) {
|
||||
// If this isn't the first row frame, then we can't be at the top of
|
||||
|
@ -533,7 +533,6 @@ void nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext& aPresContext,
|
|||
{
|
||||
if (gsDebug) printf("TRGF CalculateRowHeights begin\n");
|
||||
// iterate children and for each row get its height
|
||||
PRBool atLeastOneRowSpanningCell = PR_FALSE;
|
||||
PRInt32 numRows;
|
||||
GetRowCount(numRows);
|
||||
PRInt32 *rowHeights = new PRInt32[numRows];
|
||||
|
@ -798,7 +797,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsIPresContext& aPresContext,
|
|||
// Reflow the row in the available space and have it split
|
||||
nsSize availSize(aReflowState.availableWidth,
|
||||
aReflowState.availableHeight - bounds.y);
|
||||
nsHTMLReflowState rowReflowState(aPresContext, rowFrame, aReflowState,
|
||||
nsHTMLReflowState rowReflowState(aPresContext, aReflowState, rowFrame,
|
||||
availSize, eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
|
||||
|
@ -867,13 +866,15 @@ nsTableRowGroupFrame::SplitRowGroup(nsIPresContext& aPresContext,
|
|||
// of whether it's complete)
|
||||
// - add the continuing frame to the row frame we're pushing
|
||||
nsIFrame* parentFrame;
|
||||
nsSize rowFrameSize;
|
||||
nsPoint firstRowOrigin, lastRowOrigin;
|
||||
/*
|
||||
nsSize rowFrameSize;
|
||||
nsSize availSize(aReflowState.availableWidth,
|
||||
aReflowState.availableHeight);
|
||||
nsHTMLReflowState rowReflowState(aPresContext, rowFrame, aReflowState,
|
||||
nsHTMLReflowState rowReflowState(aPresContext, aReflowState, rowFrame,
|
||||
availSize, eReflowReason_Resize);
|
||||
|
||||
*/
|
||||
nsReflowStatus status;
|
||||
|
||||
// Ask the cell frame's parent to reflow it to the height of all the
|
||||
|
@ -950,8 +951,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (eReflowReason_Incremental == aReflowState.reason) {
|
||||
rv = IncrementalReflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
} else {
|
||||
PRBool reflowMappedOK = PR_TRUE;
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
// Check for an overflow list
|
||||
|
@ -1132,6 +1131,7 @@ NS_METHOD nsTableRowGroupFrame::IR_TargetIsMe(nsIPresContext& aPresContext,
|
|||
case nsIReflowCommand::PushReflow:
|
||||
case nsIReflowCommand::CheckPullupReflow :
|
||||
case nsIReflowCommand::UserDefined :
|
||||
default:
|
||||
NS_NOTYETIMPLEMENTED("unimplemented reflow command type");
|
||||
rv = NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (PR_TRUE==gsDebugIR) printf("TRGF IR: reflow command not implemented.\n");
|
||||
|
@ -1311,7 +1311,7 @@ NS_METHOD nsTableRowGroupFrame::IR_TargetIsChild(nsIPresContext& aPresConte
|
|||
// Pass along the reflow command
|
||||
// XXX Correctly compute the available space...
|
||||
nsSize availSpace(aReflowState.reflowState.availableWidth, aReflowState.reflowState.availableHeight);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aNextFrame, aReflowState.reflowState, availSpace);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState, aNextFrame, availSpace);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
|
||||
rv = ReflowChild(aNextFrame, aPresContext, desiredSize, kidReflowState, aStatus);
|
||||
|
|
|
@ -475,7 +475,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext& aPresContext,
|
|||
kidSize.width=kidSize.height=kidSize.ascent=kidSize.descent=0;
|
||||
SetPriorAvailWidth(aReflowState.availableWidth);
|
||||
nsIFrame* firstKid = mFrames.FirstChild();
|
||||
nsHTMLReflowState kidReflowState(aPresContext, firstKid, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, firstKid,
|
||||
availSize);
|
||||
|
||||
ReflowChild(firstKid, aPresContext, kidSize, kidReflowState, aStatus);
|
||||
|
|
|
@ -179,7 +179,7 @@ NS_METHOD nsTableColGroupFrame::Reflow(nsIPresContext& aPresContext,
|
|||
// Give the child frame a chance to reflow, even though we know it'll have 0 size
|
||||
nsHTMLReflowMetrics kidSize(nsnull);
|
||||
// XXX Use a valid reason...
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
||||
nsSize(0,0), eReflowReason_Initial);
|
||||
|
||||
nsReflowStatus status;
|
||||
|
@ -468,9 +468,9 @@ NS_METHOD nsTableColGroupFrame::IR_TargetIsChild(nsIPresContext& aPresC
|
|||
|
||||
// Pass along the reflow command
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aNextFrame,
|
||||
aReflowState,
|
||||
nsSize(aReflowState.availableWidth, aReflowState.availableHeight));
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, aNextFrame,
|
||||
nsSize(aReflowState.availableWidth,
|
||||
aReflowState.availableHeight));
|
||||
rv = ReflowChild(aNextFrame, aPresContext, desiredSize, kidReflowState, aStatus);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
|
|
@ -49,12 +49,12 @@
|
|||
|
||||
#ifdef NS_DEBUG
|
||||
static PRBool gsDebug = PR_FALSE;
|
||||
static PRBool gsDebugCLD = PR_FALSE;
|
||||
//static PRBool gsDebugCLD = PR_FALSE;
|
||||
static PRBool gsDebugNT = PR_FALSE;
|
||||
static PRBool gsDebugIR = PR_FALSE;
|
||||
#else
|
||||
static const PRBool gsDebug = PR_FALSE;
|
||||
static const PRBool gsDebugCLD = PR_FALSE;
|
||||
//static const PRBool gsDebugCLD = PR_FALSE;
|
||||
static const PRBool gsDebugNT = PR_FALSE;
|
||||
static const PRBool gsDebugIR = PR_FALSE;
|
||||
#endif
|
||||
|
@ -279,15 +279,15 @@ nsTableFrame::GetFrameType(nsIAtom** aType) const
|
|||
|
||||
nsTableFrame::nsTableFrame()
|
||||
: nsHTMLContainerFrame(),
|
||||
mCellMap(nsnull),
|
||||
mColCache(nsnull),
|
||||
mTableLayoutStrategy(nsnull),
|
||||
mFirstPassValid(PR_FALSE),
|
||||
mColumnWidthsValid(PR_FALSE),
|
||||
mFirstPassValid(PR_FALSE),
|
||||
mColumnCacheValid(PR_FALSE),
|
||||
mCellMapValid(PR_TRUE),
|
||||
mIsInvariantWidth(PR_FALSE),
|
||||
mHasScrollableRowGroup(PR_FALSE)
|
||||
mHasScrollableRowGroup(PR_FALSE),
|
||||
mCellMap(nsnull),
|
||||
mColCache(nsnull),
|
||||
mTableLayoutStrategy(nsnull)
|
||||
{
|
||||
mEffectiveColCount = -1; // -1 means uninitialized
|
||||
mColumnWidthsSet=PR_FALSE;
|
||||
|
@ -697,7 +697,6 @@ PRInt32 nsTableFrame::GetEffectiveCOLSAttribute()
|
|||
nsCellMap *cellMap = GetCellMap();
|
||||
NS_PRECONDITION (nsnull!=cellMap, "null cellMap.");
|
||||
PRInt32 result;
|
||||
nsIFrame *tableFrame = this;
|
||||
const nsStyleTable *tableStyle=nsnull;
|
||||
GetStyleData(eStyleStruct_Table, (const nsStyleStruct *&)tableStyle);
|
||||
result = tableStyle->mCols;
|
||||
|
@ -2565,10 +2564,6 @@ NS_METHOD nsTableFrame::ResizeReflowPass1(nsIPresContext& aPresContext,
|
|||
nsSize kidMaxSize(0,0);
|
||||
nsHTMLReflowMetrics kidSize(&kidMaxSize);
|
||||
nscoord y = 0;
|
||||
nscoord maxAscent = 0;
|
||||
nscoord maxDescent = 0;
|
||||
PRInt32 contentOffset=0;
|
||||
nsIFrame* prevKidFrame = nsnull;/* XXX incremental reflow! */
|
||||
|
||||
// Compute the insets (sum of border and padding)
|
||||
// XXX: since this is pass1 reflow and where we place the rowgroup frames is irrelevant, insets are probably a waste
|
||||
|
@ -2586,7 +2581,7 @@ NS_METHOD nsTableFrame::ResizeReflowPass1(nsIPresContext& aPresContext,
|
|||
(NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP != childDisplay->mDisplay) &&
|
||||
(NS_STYLE_DISPLAY_TABLE_ROW_GROUP != childDisplay->mDisplay) )
|
||||
{ // it's an unknown frame type, give it a generic reflow and ignore the results
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
||||
availSize, aReason);
|
||||
if (PR_TRUE==gsDebugIR) printf("\nTIF IR: Reflow Pass 1 of unknown frame %p of type %d with reason=%d\n",
|
||||
kidFrame, childDisplay->mDisplay, aReason);
|
||||
|
@ -2594,8 +2589,7 @@ NS_METHOD nsTableFrame::ResizeReflowPass1(nsIPresContext& aPresContext,
|
|||
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, aStatus);
|
||||
continue;
|
||||
}
|
||||
nsSize maxKidElementSize(0,0);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
||||
availSize, aReason);
|
||||
// Note: we don't bother checking here for whether we should clear the
|
||||
// isTopOfPage reflow state flag, because we're dealing with an unconstrained
|
||||
|
@ -2635,8 +2629,7 @@ NS_METHOD nsTableFrame::ResizeReflowPass1(nsIPresContext& aPresContext,
|
|||
kidFrame=mColGroups.FirstChild();
|
||||
for ( ; nsnull != kidFrame; kidFrame->GetNextSibling(&kidFrame))
|
||||
{
|
||||
nsSize maxKidElementSize(0,0);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState, kidFrame,
|
||||
availSize, aReason);
|
||||
if (PR_TRUE==gsDebugIR) printf("\nTIF IR: Reflow Pass 1 of colgroup frame %p with reason=%d\n", kidFrame, aReason);
|
||||
ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, aStatus);
|
||||
|
@ -2680,8 +2673,6 @@ NS_METHOD nsTableFrame::ResizeReflowPass2(nsIPresContext& aPresContext,
|
|||
InnerTableReflowState state(aPresContext, aReflowState, borderPadding);
|
||||
|
||||
// now that we've computed the column width information, reflow all children
|
||||
nsSize kidMaxSize(0,0);
|
||||
nsIFrame* prevKidFrame = nsnull;/* XXX incremental reflow! */
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
//PreReflowCheck();
|
||||
|
@ -2895,7 +2886,6 @@ NS_METHOD nsTableFrame::AdjustForCollapsingCols(nsIPresContext& aPresContext,
|
|||
const nsStyleDisplay* groupDisplay;
|
||||
groupFrame->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)groupDisplay));
|
||||
PRBool collapseGroup = (NS_STYLE_VISIBILITY_COLLAPSE == groupDisplay->mVisible);
|
||||
nsRect zeroRect(0, 0, 0, 0);
|
||||
nsIFrame* colFrame;
|
||||
groupFrame->FirstChild(nsnull, &colFrame);
|
||||
while (nsnull != colFrame) {
|
||||
|
@ -3088,6 +3078,7 @@ NS_METHOD nsTableFrame::IR_TargetIsMe(nsIPresContext& aPresContext,
|
|||
case nsIReflowCommand::PushReflow:
|
||||
case nsIReflowCommand::CheckPullupReflow :
|
||||
case nsIReflowCommand::UserDefined :
|
||||
default:
|
||||
NS_NOTYETIMPLEMENTED("unimplemented reflow command type");
|
||||
rv = NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (PR_TRUE==gsDebugIR) printf("TIF IR: reflow command not implemented.\n");
|
||||
|
@ -3390,9 +3381,8 @@ NS_METHOD nsTableFrame::IR_TargetIsChild(nsIPresContext& aPresContext,
|
|||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
// XXX Correctly compute the available space...
|
||||
nsSize availSpace(aReflowState.reflowState.availableWidth, aReflowState.reflowState.availableHeight);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aNextFrame,
|
||||
aReflowState.reflowState,
|
||||
availSpace);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
aNextFrame, availSpace);
|
||||
|
||||
rv = ReflowChild(aNextFrame, aPresContext, desiredSize, kidReflowState, aStatus);
|
||||
|
||||
|
@ -3573,9 +3563,8 @@ NS_METHOD nsTableFrame::ReflowMappedChildren(nsIPresContext& aPresContext,
|
|||
borderPadding += padding;
|
||||
|
||||
// Reflow the child into the available space
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame,
|
||||
aReflowState.reflowState, kidAvailSize,
|
||||
reason);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
kidFrame, kidAvailSize, reason);
|
||||
if ((nsnull != firstRowGroupFrame) && (kidFrame != firstRowGroupFrame)) {
|
||||
// If this isn't the first row group frame or the header or footer, then
|
||||
// we can't be at the top of the page anymore...
|
||||
|
@ -3653,7 +3642,8 @@ NS_METHOD nsTableFrame::ReflowMappedChildren(nsIPresContext& aPresContext,
|
|||
}
|
||||
else
|
||||
{// it's an unknown frame type, give it a generic reflow and ignore the results
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState.reflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext,
|
||||
aReflowState.reflowState, kidFrame,
|
||||
nsSize(0,0), eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
if (PR_TRUE==gsDebug) printf("\nTIF : Reflow Pass 2 of unknown frame %p of type %d with reason=%d\n",
|
||||
|
@ -3729,8 +3719,8 @@ NS_METHOD nsTableFrame::PullUpChildren(nsIPresContext& aPresContext,
|
|||
aStatus = NS_FRAME_NOT_COMPLETE;
|
||||
break;
|
||||
}
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame,
|
||||
aReflowState.reflowState, aReflowState.availSize,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
kidFrame, aReflowState.availSize,
|
||||
eReflowReason_Resize);
|
||||
|
||||
rv = ReflowChild(kidFrame, aPresContext, kidSize, kidReflowState, aStatus);
|
||||
|
@ -4014,7 +4004,6 @@ nscoord nsTableFrame::ComputeDesiredHeight(nsIPresContext& aPresContext,
|
|||
if (PR_TRUE==IsRowGroup(rowGroupDisplay->mDisplay))
|
||||
{ // the rows in rowGroupFrame need to be expanded by rowHeightDelta[i]
|
||||
// and the rowgroup itself needs to be expanded by SUM(row height deltas)
|
||||
nscoord excessForRowGroup=0;
|
||||
nsIFrame * rowFrame=nsnull;
|
||||
rv = rowGroupFrame->FirstChild(nsnull, &rowFrame);
|
||||
while ((NS_SUCCEEDED(rv)) && (nsnull!=rowFrame))
|
||||
|
@ -4180,7 +4169,7 @@ nsTableFrame::SetColumnStyleFromCell(nsIPresContext & aPresContext,
|
|||
float width = cellPosition->mWidth.GetPercentValue();
|
||||
colPosition->mWidth.SetPercentValue(width);
|
||||
if (PR_TRUE==gsDebug)
|
||||
printf("TIF SetCSFromCell: col percent width set to %d from cell", width);
|
||||
printf("TIF SetCSFromCell: col percent width set to %g from cell", width);
|
||||
}
|
||||
colFrame->SetWidthSource(nsTableColFrame::eWIDTH_SOURCE_CELL);
|
||||
}
|
||||
|
@ -4584,8 +4573,6 @@ void nsTableFrame::MapHTMLBorderStyle(nsStyleSpacing& aSpacingStyle, nscoord aBo
|
|||
|
||||
PRBool nsTableFrame::ConvertToPixelValue(nsHTMLValue& aValue, PRInt32 aDefault, PRInt32& aResult)
|
||||
{
|
||||
PRInt32 result = 0;
|
||||
|
||||
if (aValue.GetUnit() == eHTMLUnit_Pixel)
|
||||
aResult = aValue.GetPixelValue();
|
||||
else if (aValue.GetUnit() == eHTMLUnit_Empty)
|
||||
|
|
|
@ -291,8 +291,9 @@ nsresult nsTableOuterFrame::IR_TargetIsCaptionFrame(nsIPresContext& aPres
|
|||
if (PR_TRUE==gsDebugIR) printf("TOF IR: passing down incremental reflow command to caption.\n");
|
||||
nsSize captionMES(0,0);
|
||||
nsHTMLReflowMetrics captionSize(&captionMES);
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(mRect.width,
|
||||
aReflowState.reflowState.availableHeight),
|
||||
aReflowState.reflowState.reason);
|
||||
|
@ -333,8 +334,9 @@ nsresult nsTableOuterFrame::IR_TargetIsCaptionFrame(nsIPresContext& aPres
|
|||
tableWidth = mMinCaptionWidth;
|
||||
}
|
||||
nsHTMLReflowMetrics innerSize(aDesiredSize.maxElementSize);
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(tableWidth, aReflowState.reflowState.availableHeight),
|
||||
eReflowReason_Resize);
|
||||
rv = ReflowChild(mInnerTableFrame, aPresContext, innerSize, innerReflowState, aStatus);
|
||||
|
@ -449,6 +451,7 @@ nsresult nsTableOuterFrame::IR_TargetIsMe(nsIPresContext& aPresContext,
|
|||
case nsIReflowCommand::PushReflow:
|
||||
case nsIReflowCommand::CheckPullupReflow :
|
||||
case nsIReflowCommand::UserDefined :
|
||||
default:
|
||||
NS_NOTYETIMPLEMENTED("unimplemented reflow command type");
|
||||
rv = NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: reflow command not implemented.\n");
|
||||
|
@ -476,8 +479,9 @@ nsresult nsTableOuterFrame::IR_InnerTableReflow(nsIPresContext& aPresCont
|
|||
nsHTMLReflowMetrics innerSize(aDesiredSize.maxElementSize);
|
||||
nscoord tableMaxWidth = PR_MAX(aReflowState.reflowState.availableWidth, mMinCaptionWidth);
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: mincaptionWidth=%d, tableMaxWidth=%d.\n", mMinCaptionWidth, tableMaxWidth);
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(tableMaxWidth, aReflowState.reflowState.availableHeight));
|
||||
rv = ReflowChild(mInnerTableFrame, aPresContext, innerSize, innerReflowState, aStatus);
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: inner table reflow returned %d with width=%d height=%d\n",
|
||||
|
@ -495,8 +499,9 @@ nsresult nsTableOuterFrame::IR_InnerTableReflow(nsIPresContext& aPresCont
|
|||
PRBool captionWasReflowed=PR_FALSE;
|
||||
if (priorInnerTableRect.width!=innerSize.width)
|
||||
{ // the table width changed, so reflow the caption
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(innerSize.width,
|
||||
aReflowState.reflowState.availableHeight),
|
||||
eReflowReason_Resize);
|
||||
|
@ -616,8 +621,9 @@ nsresult nsTableOuterFrame::IR_CaptionInserted(nsIPresContext& aPresConte
|
|||
if (PR_TRUE==gsDebugIR) printf("TOF IR: initial-reflowing caption\n");
|
||||
nsSize maxElementSize;
|
||||
nsHTMLReflowMetrics captionSize(&maxElementSize);
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(mRect.width, aReflowState.reflowState.availableHeight),
|
||||
eReflowReason_Initial);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
@ -646,8 +652,9 @@ nsresult nsTableOuterFrame::IR_CaptionInserted(nsIPresContext& aPresConte
|
|||
if ((oldCaptionMES != mMinCaptionWidth) && (mMinCaptionWidth > mRect.width))
|
||||
{
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: resize-reflowing inner table\n");
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(mMinCaptionWidth, aReflowState.reflowState.availableHeight),
|
||||
eReflowReason_Resize);
|
||||
rv = ReflowChild(mInnerTableFrame, aPresContext, innerSize, innerReflowState, aStatus);
|
||||
|
@ -700,8 +707,9 @@ nsresult nsTableOuterFrame::IR_CaptionRemoved(nsIPresContext& aPresContex
|
|||
if (oldMinCaptionWidth > mRect.width)
|
||||
{ // the old caption width had an effect on the inner table width, so reflow the inner table
|
||||
if (PR_TRUE==gsDebugIR) printf("TOF IR: reflowing inner table\n");
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(aReflowState.reflowState.availableWidth,
|
||||
aReflowState.reflowState.availableHeight));
|
||||
// ReflowChild sets MES
|
||||
|
@ -907,8 +915,9 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (nsnull != mCaptionFrame) {
|
||||
nsSize maxElementSize;
|
||||
nsHTMLReflowMetrics captionSize(&maxElementSize);
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
aReflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE),
|
||||
eReflowReason_Initial);
|
||||
nsIHTMLReflow* htmlReflow;
|
||||
|
@ -936,8 +945,9 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
|
||||
// First reflow the inner table
|
||||
nsHTMLReflowState innerReflowState(aPresContext, mInnerTableFrame,
|
||||
nsHTMLReflowState innerReflowState(aPresContext,
|
||||
aReflowState,
|
||||
mInnerTableFrame,
|
||||
nsSize(tableWidth, aReflowState.availableHeight));
|
||||
nsHTMLReflowMetrics innerSize(aDesiredSize.maxElementSize);
|
||||
|
||||
|
@ -972,8 +982,9 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
|
||||
// Reflow the caption. Let it be as high as it wants
|
||||
nsHTMLReflowState captionReflowState(aPresContext, mCaptionFrame,
|
||||
nsHTMLReflowState captionReflowState(aPresContext,
|
||||
state.reflowState,
|
||||
mCaptionFrame,
|
||||
nsSize(innerSize.width, NS_UNCONSTRAINEDSIZE),
|
||||
eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics captionSize(nsnull);
|
||||
|
@ -1039,7 +1050,7 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext& aPresContext,
|
|||
|
||||
if (gsTiming) {
|
||||
PRIntervalTime endTime = PR_IntervalNow();
|
||||
printf("Table reflow took %ld ticks for frame %d\n",
|
||||
printf("Table reflow took %d ticks for frame %p\n",
|
||||
endTime-startTime, this);/* XXX need to use LL_* macros! */
|
||||
}
|
||||
|
||||
|
|
|
@ -224,10 +224,11 @@ nsTableRowFrame::DidResize(nsIPresContext& aPresContext,
|
|||
cellFrame->SizeTo(cellFrameSize.width, cellHeight);
|
||||
if (gsDebug) printf("given height %d\n", cellHeight);
|
||||
// realign cell content based on the new height
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, cellFrame,
|
||||
aReflowState, nsSize(cellFrameSize.width, cellHeight),
|
||||
eReflowReason_Resize);
|
||||
/*nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState,
|
||||
cellFrame,
|
||||
nsSize(cellFrameSize.width, cellHeight),
|
||||
eReflowReason_Resize);*/
|
||||
//XXX: the following reflow is necessary for any content of the cell
|
||||
// whose height is a percent of the cell's height (maybe indirectly.)
|
||||
// But some content crashes when this reflow is issued, to be investigated
|
||||
|
@ -536,7 +537,7 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
const nsStyleDisplay *rowDisplay;
|
||||
GetStyleData(eStyleStruct_Display, (const nsStyleStruct*&)rowDisplay);
|
||||
nsIFrame* kidFrame=GetFirstChildForDirection(rowDisplay->mDirection);
|
||||
for (kidFrame; nsnull != kidFrame; )
|
||||
while (nsnull != kidFrame)
|
||||
{
|
||||
const nsStyleDisplay *kidDisplay;
|
||||
kidFrame->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)kidDisplay));
|
||||
|
@ -560,8 +561,8 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
aReflowState.x += aReflowState.tableFrame->GetColumnWidth(colIndex);
|
||||
aReflowState.x += cellSpacingX;
|
||||
if (PR_TRUE==gsDebug)
|
||||
printf(" Row: in loop, aReflowState.x set to %d from cellSpacing %d and col width\n",
|
||||
aReflowState.x, aReflowState.tableFrame->GetColumnWidth(colIndex), cellSpacingX);
|
||||
printf(" Row: in loop, aReflowState.x set to %d from cellSpacing %d and col width %d\n",
|
||||
aReflowState.x, cellSpacingX, aReflowState.tableFrame->GetColumnWidth(colIndex));
|
||||
}
|
||||
}
|
||||
aReflowState.x += cellSpacingX;
|
||||
|
@ -583,7 +584,7 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
if (PR_TRUE==gsDebug)
|
||||
printf(" Row: in loop, availWidth set to %d from colIndex %d width %d and cellSpacing\n",
|
||||
availWidth, cellColIndex, aReflowState.tableFrame->GetColumnWidth(cellColIndex+numColSpan), cellSpacingX);
|
||||
availWidth, cellColIndex, aReflowState.tableFrame->GetColumnWidth(cellColIndex+numColSpan));
|
||||
}
|
||||
if (PR_TRUE==gsDebug) printf(" Row: availWidth for this cell is %d\n", availWidth);
|
||||
|
||||
|
@ -606,8 +607,9 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
nsSize kidAvailSize(availWidth, aReflowState.reflowState.availableHeight);
|
||||
|
||||
// Reflow the child
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame,
|
||||
aReflowState.reflowState, kidAvailSize,
|
||||
nsHTMLReflowState kidReflowState(aPresContext,
|
||||
aReflowState.reflowState, kidFrame,
|
||||
kidAvailSize,
|
||||
eReflowReason_Resize);
|
||||
if (gsDebug) printf ("Row %p RR: avail=%d\n", this, availWidth);
|
||||
nsReflowStatus status;
|
||||
|
@ -686,7 +688,8 @@ NS_METHOD nsTableRowFrame::ResizeReflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
else
|
||||
{// it's an unknown frame type, give it a generic reflow and ignore the results
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState.reflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
kidFrame,
|
||||
nsSize(0,0), eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
if (PR_TRUE==gsDebug) printf("\nRow: Resize Reflow of unknown frame %p of type %d with reason=%d\n",
|
||||
|
@ -741,13 +744,9 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext,
|
|||
{
|
||||
// Place our children, one at a time, until we are out of children
|
||||
nsSize kidMaxElementSize(0,0);
|
||||
PRInt32 kidIndex = 0;
|
||||
PRInt32 colIndex = 0;
|
||||
nsIFrame* prevKidFrame = nsnull;
|
||||
nscoord maxTopMargin = 0;
|
||||
nscoord maxBottomMargin = 0;
|
||||
nscoord x = 0;
|
||||
PRBool isFirst=PR_TRUE;
|
||||
PRBool tableLayoutStrategy=NS_STYLE_TABLE_LAYOUT_AUTO;
|
||||
nsTableFrame* table = aReflowState.tableFrame;
|
||||
nsresult rv = NS_OK;
|
||||
|
@ -800,8 +799,9 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext,
|
|||
kidAvailSize.SizeTo(table->GetColumnWidth(colIndex), NS_UNCONSTRAINEDSIZE);
|
||||
}
|
||||
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame,
|
||||
aReflowState.reflowState, kidAvailSize,
|
||||
nsHTMLReflowState kidReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
kidFrame, kidAvailSize,
|
||||
eReflowReason_Initial);
|
||||
|
||||
if (gsDebug) printf ("%p InitR: avail=%d\n", this, kidAvailSize.width);
|
||||
|
@ -841,8 +841,8 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext,
|
|||
}
|
||||
else
|
||||
{// it's an unknown frame type, give it a generic reflow and ignore the results
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState.reflowState,
|
||||
nsSize(0,0), eReflowReason_Initial);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState,
|
||||
kidFrame, nsSize(0,0), eReflowReason_Initial);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
if (PR_TRUE==gsDebug) printf("\nTIF : Reflow Pass 2 of unknown frame %p of type %d with reason=%d\n",
|
||||
kidFrame, kidDisplay->mDisplay, eReflowReason_Initial);
|
||||
|
@ -1059,6 +1059,7 @@ NS_METHOD nsTableRowFrame::IR_TargetIsMe(nsIPresContext& aPresContext,
|
|||
case nsIReflowCommand::PushReflow:
|
||||
case nsIReflowCommand::CheckPullupReflow :
|
||||
case nsIReflowCommand::UserDefined :
|
||||
default:
|
||||
NS_NOTYETIMPLEMENTED("unimplemented reflow command type");
|
||||
rv = NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (PR_TRUE==gsDebugIR) printf("TRF IR: reflow command not implemented.\n");
|
||||
|
@ -1284,8 +1285,9 @@ NS_METHOD nsTableRowFrame::IR_TargetIsChild(nsIPresContext& aPresContext,
|
|||
// Pass along the reflow command
|
||||
nsSize kidMaxElementSize;
|
||||
nsHTMLReflowMetrics desiredSize(&kidMaxElementSize);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aNextFrame, aReflowState.reflowState,
|
||||
kidAvailSize);
|
||||
nsHTMLReflowState kidReflowState(aPresContext,
|
||||
aReflowState.reflowState,
|
||||
aNextFrame, kidAvailSize);
|
||||
|
||||
// XXX Unfortunately we need to reflow the child several times.
|
||||
// The first time is for the incremental reflow command. We can't pass in
|
||||
|
@ -1416,8 +1418,9 @@ nsTableRowFrame::Reflow(nsIPresContext& aPresContext,
|
|||
{ // this resize reflow is necessary to place the cells correctly in the case of rowspans and colspans.
|
||||
// It is very efficient. It does not actually need to pass a reflow down to the cells.
|
||||
nsSize availSpace(aReflowState.availableWidth, aReflowState.availableHeight);
|
||||
nsHTMLReflowState resizeReflowState(aPresContext, (nsIFrame *)this,
|
||||
nsHTMLReflowState resizeReflowState(aPresContext,
|
||||
(const nsHTMLReflowState&)(*(aReflowState.parentReflowState)),
|
||||
(nsIFrame *)this,
|
||||
availSpace,
|
||||
eReflowReason_Resize);
|
||||
RowReflowState rowResizeReflowState(resizeReflowState, tableFrame);
|
||||
|
@ -1499,7 +1502,7 @@ void nsTableRowFrame::ReflowCellFrame(nsIPresContext& aPresContext,
|
|||
aCellFrame->GetSize(cellSize);
|
||||
|
||||
nsSize availSize(cellSize.width, aAvailableHeight);
|
||||
nsHTMLReflowState cellReflowState(aPresContext, aCellFrame, aReflowState, availSize,
|
||||
nsHTMLReflowState cellReflowState(aPresContext, aReflowState, aCellFrame, availSize,
|
||||
eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
|
||||
|
|
|
@ -406,7 +406,7 @@ NS_METHOD nsTableRowGroupFrame::ReflowMappedChildren(nsIPresContext& aPresC
|
|||
// it wants. We'll deal with splitting later after we've computed the row
|
||||
// heights, taking into account cells with row spans...
|
||||
kidAvailSize.height = NS_UNCONSTRAINEDSIZE;
|
||||
nsHTMLReflowState kidReflowState(aPresContext, kidFrame, aReflowState.reflowState,
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState, kidFrame,
|
||||
kidAvailSize, aReason);
|
||||
if (kidFrame != mFrames.FirstChild()) {
|
||||
// If this isn't the first row frame, then we can't be at the top of
|
||||
|
@ -533,7 +533,6 @@ void nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext& aPresContext,
|
|||
{
|
||||
if (gsDebug) printf("TRGF CalculateRowHeights begin\n");
|
||||
// iterate children and for each row get its height
|
||||
PRBool atLeastOneRowSpanningCell = PR_FALSE;
|
||||
PRInt32 numRows;
|
||||
GetRowCount(numRows);
|
||||
PRInt32 *rowHeights = new PRInt32[numRows];
|
||||
|
@ -798,7 +797,7 @@ nsTableRowGroupFrame::SplitRowGroup(nsIPresContext& aPresContext,
|
|||
// Reflow the row in the available space and have it split
|
||||
nsSize availSize(aReflowState.availableWidth,
|
||||
aReflowState.availableHeight - bounds.y);
|
||||
nsHTMLReflowState rowReflowState(aPresContext, rowFrame, aReflowState,
|
||||
nsHTMLReflowState rowReflowState(aPresContext, aReflowState, rowFrame,
|
||||
availSize, eReflowReason_Resize);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
|
||||
|
@ -867,13 +866,15 @@ nsTableRowGroupFrame::SplitRowGroup(nsIPresContext& aPresContext,
|
|||
// of whether it's complete)
|
||||
// - add the continuing frame to the row frame we're pushing
|
||||
nsIFrame* parentFrame;
|
||||
nsSize rowFrameSize;
|
||||
nsPoint firstRowOrigin, lastRowOrigin;
|
||||
/*
|
||||
nsSize rowFrameSize;
|
||||
nsSize availSize(aReflowState.availableWidth,
|
||||
aReflowState.availableHeight);
|
||||
nsHTMLReflowState rowReflowState(aPresContext, rowFrame, aReflowState,
|
||||
nsHTMLReflowState rowReflowState(aPresContext, aReflowState, rowFrame,
|
||||
availSize, eReflowReason_Resize);
|
||||
|
||||
*/
|
||||
nsReflowStatus status;
|
||||
|
||||
// Ask the cell frame's parent to reflow it to the height of all the
|
||||
|
@ -950,8 +951,6 @@ nsTableRowGroupFrame::Reflow(nsIPresContext& aPresContext,
|
|||
if (eReflowReason_Incremental == aReflowState.reason) {
|
||||
rv = IncrementalReflow(aPresContext, aDesiredSize, state, aStatus);
|
||||
} else {
|
||||
PRBool reflowMappedOK = PR_TRUE;
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
||||
// Check for an overflow list
|
||||
|
@ -1132,6 +1131,7 @@ NS_METHOD nsTableRowGroupFrame::IR_TargetIsMe(nsIPresContext& aPresContext,
|
|||
case nsIReflowCommand::PushReflow:
|
||||
case nsIReflowCommand::CheckPullupReflow :
|
||||
case nsIReflowCommand::UserDefined :
|
||||
default:
|
||||
NS_NOTYETIMPLEMENTED("unimplemented reflow command type");
|
||||
rv = NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (PR_TRUE==gsDebugIR) printf("TRGF IR: reflow command not implemented.\n");
|
||||
|
@ -1311,7 +1311,7 @@ NS_METHOD nsTableRowGroupFrame::IR_TargetIsChild(nsIPresContext& aPresConte
|
|||
// Pass along the reflow command
|
||||
// XXX Correctly compute the available space...
|
||||
nsSize availSpace(aReflowState.reflowState.availableWidth, aReflowState.reflowState.availableHeight);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aNextFrame, aReflowState.reflowState, availSpace);
|
||||
nsHTMLReflowState kidReflowState(aPresContext, aReflowState.reflowState, aNextFrame, availSpace);
|
||||
nsHTMLReflowMetrics desiredSize(nsnull);
|
||||
|
||||
rv = ReflowChild(aNextFrame, aPresContext, desiredSize, kidReflowState, aStatus);
|
||||
|
|
|
@ -217,7 +217,7 @@ nsToolboxFrame :: DrawGrippy ( nsIPresContext& aPresContext, nsIRenderingContex
|
|||
|
||||
const nsStyleColor* grippyColor = (const nsStyleColor*)style->GetStyleData(eStyleStruct_Color);
|
||||
const nsStyleSpacing* grippySpacing = (const nsStyleSpacing*)style->GetStyleData(eStyleStruct_Spacing);
|
||||
const nsStyleFont* grippyFont = (const nsStyleFont*)style->GetStyleData(eStyleStruct_Font);
|
||||
// const nsStyleFont* grippyFont = (const nsStyleFont*)style->GetStyleData(eStyleStruct_Font);
|
||||
|
||||
nsToolboxFrame* nonConstSelf = NS_CONST_CAST(nsToolboxFrame*, this);
|
||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, nonConstSelf,
|
||||
|
@ -321,7 +321,7 @@ nsToolboxFrame :: Reflow(nsIPresContext& aPresContext,
|
|||
// they are the same, so find the width/height desired by the toolbar frame.
|
||||
nsSize maxSize(aReflowState.availableWidth, aReflowState.availableHeight);
|
||||
|
||||
nsHTMLReflowState reflowState(aPresContext, childFrame, aReflowState, maxSize);
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, childFrame, maxSize);
|
||||
nsIHTMLReflow* htmlReflow = nsnull; // can't use nsCOMPtr because of bad COM
|
||||
if ( childFrame->QueryInterface(kIHTMLReflowIID, (void**)&htmlReflow) == NS_OK ) {
|
||||
htmlReflow->WillReflow(aPresContext);
|
||||
|
|
Загрузка…
Ссылка в новой задаче