diff --git a/mozilla/layout/xul/base/src/nsBox.cpp b/mozilla/layout/xul/base/src/nsBox.cpp index 67a3baf5eb5..d4fdfa11d0a 100644 --- a/mozilla/layout/xul/base/src/nsBox.cpp +++ b/mozilla/layout/xul/base/src/nsBox.cpp @@ -858,6 +858,12 @@ nsBox::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize) { aSize.width = 0; aSize.height = 0; + + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) + return NS_OK; + AddBorderAndPadding(aSize); AddInset(aSize); nsIBox::AddCSSPrefSize(aState, this, aSize); @@ -869,6 +875,12 @@ nsBox::GetMinSize(nsBoxLayoutState& aState, nsSize& aSize) { aSize.width = 0; aSize.height = 0; + + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) + return NS_OK; + AddBorderAndPadding(aSize); AddInset(aSize); nsIBox::AddCSSMinSize(aState, this, aSize); @@ -880,6 +892,12 @@ nsBox::GetMaxSize(nsBoxLayoutState& aState, nsSize& aSize) { aSize.width = NS_INTRINSICSIZE; aSize.height = NS_INTRINSICSIZE; + + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) + return NS_OK; + AddBorderAndPadding(aSize); AddInset(aSize); nsIBox::AddCSSMaxSize(aState, this, aSize); @@ -890,6 +908,12 @@ NS_IMETHODIMP nsBox::GetFlex(nsBoxLayoutState& aState, nscoord& aFlex) { aFlex = 0; + + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) + return NS_OK; + GetDefaultFlex(aFlex); nsIBox::AddCSSFlex(aState, this, aFlex); @@ -899,6 +923,12 @@ nsBox::GetFlex(nsBoxLayoutState& aState, nscoord& aFlex) NS_IMETHODIMP nsBox::GetAscent(nsBoxLayoutState& aState, nscoord& aAscent) { + aAscent = 0; + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) + return NS_OK; + nsSize size(0,0); nsresult rv = GetPrefSize(aState, size); aAscent = size.height; diff --git a/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.cpp b/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.cpp index 61e043a1cf5..ae99026ab7c 100644 --- a/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.cpp +++ b/mozilla/layout/xul/base/src/nsBoxToBlockAdaptor.cpp @@ -197,6 +197,15 @@ nsBoxToBlockAdaptor::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize) return NS_OK; } + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) { + mPrefSize.width = 0; + mPrefSize.height = 0; + mPrefNeedsRecalc = PR_FALSE; + return NS_OK; + } + nsresult rv = NS_OK; // see if anything is defined in css. If pref size is competely @@ -293,6 +302,14 @@ nsBoxToBlockAdaptor::GetMinSize(nsBoxLayoutState& aState, nsSize& aSize) return NS_OK; } + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) { + mMinSize.width = 0; + mMinSize.height = 0; + return NS_OK; + } + mMinSize.width = 0; mMinSize.height = 0; @@ -404,9 +421,15 @@ nsBoxToBlockAdaptor::Layout(nsBoxLayoutState& aState) } } - - mAscent = desiredSize.ascent; - mFrame->SizeTo(presContext, desiredSize.width, desiredSize.height); + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) { + mAscent = 0; + mFrame->SizeTo(presContext, 0, 0); + } else { + mAscent = desiredSize.ascent; + mFrame->SizeTo(presContext, desiredSize.width, desiredSize.height); + } } SyncLayout(aState); @@ -634,12 +657,14 @@ nsBoxToBlockAdaptor::Reflow(nsBoxLayoutState& aState, if (size.height != NS_INTRINSICSIZE) { size.height -= (border.top + border.bottom); - NS_ASSERTION(size.height >= 0,"Error top bottom border too large"); + if (size.height < 0) + size.height = 0; } if (size.width != NS_INTRINSICSIZE) { size.width -= (border.left + border.right); - NS_ASSERTION(size.height >= 0,"Error left right border too large"); + if (size.width < 0) + size.width = 0; } nsHTMLReflowState reflowState(aPresContext, aReflowState, mFrame, nsSize(size.width, NS_INTRINSICSIZE)); diff --git a/mozilla/layout/xul/base/src/nsContainerBox.cpp b/mozilla/layout/xul/base/src/nsContainerBox.cpp index 55665bcbd78..e0da7ddabb4 100644 --- a/mozilla/layout/xul/base/src/nsContainerBox.cpp +++ b/mozilla/layout/xul/base/src/nsContainerBox.cpp @@ -429,6 +429,11 @@ nsContainerBox::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize) aSize.width = 0; aSize.height = 0; + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) + return NS_OK; + // if the size was not completely redefined in CSS then ask our children if (!nsIBox::AddCSSPrefSize(aState, this, aSize)) { @@ -460,6 +465,11 @@ nsContainerBox::GetMinSize(nsBoxLayoutState& aState, nsSize& aSize) aSize.width = 0; aSize.height = 0; + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) + return NS_OK; + // if the size was not completely redefined in CSS then ask our children if (!nsIBox::AddCSSMinSize(aState, this, aSize)) { @@ -485,6 +495,11 @@ nsContainerBox::GetMaxSize(nsBoxLayoutState& aState, nsSize& aSize) aSize.width = NS_INTRINSICSIZE; aSize.height = NS_INTRINSICSIZE; + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) + return NS_OK; + // if the size was not completely redefined in CSS then ask our children if (!nsIBox::AddCSSMaxSize(aState, this, aSize)) { @@ -509,6 +524,12 @@ nsContainerBox::GetAscent(nsBoxLayoutState& aState, nscoord& aAscent) nsresult rv = NS_OK; aAscent = 0; + + PRBool collapsed = PR_FALSE; + IsCollapsed(aState, collapsed); + if (collapsed) + return NS_OK; + if (mLayoutManager) rv = mLayoutManager->GetAscent(this, aState, aAscent); else diff --git a/mozilla/layout/xul/base/src/nsContainerBox.h b/mozilla/layout/xul/base/src/nsContainerBox.h index 70a08dde361..8b4a3095ea2 100644 --- a/mozilla/layout/xul/base/src/nsContainerBox.h +++ b/mozilla/layout/xul/base/src/nsContainerBox.h @@ -69,9 +69,12 @@ public: NS_IMETHOD SetInsertionPoint(nsIFrame* aFrame); virtual ~nsContainerBox() {} + + static nsresult LayoutChildAt(nsBoxLayoutState& aState, nsIBox* aBox, const nsRect& aRect); + + protected: - virtual nsresult LayoutChildAt(nsBoxLayoutState& aState, nsIBox* aBox, const nsRect& aRect); //virtual nsresult LayoutChildAt(nsBoxLayoutState& aState, nsIBox* aBox, const nsRect& aRect, PRUint32 aFlags); virtual void GetBoxName(nsAutoString& aName); diff --git a/mozilla/layout/xul/base/src/nsMenuFrame.cpp b/mozilla/layout/xul/base/src/nsMenuFrame.cpp index 1dd2a1d565e..1cf8445808a 100644 --- a/mozilla/layout/xul/base/src/nsMenuFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuFrame.cpp @@ -453,7 +453,6 @@ nsMenuFrame::ActivateMenu(PRBool aActivateFlag) if (!menuPopup) return NS_OK; - if (aActivateFlag) { nsRect rect; menuPopup->GetRect(rect); @@ -484,6 +483,8 @@ nsMenuFrame::ActivateMenu(PRBool aActivateFlag) view->GetViewManager(*getter_AddRefs(viewManager)); viewManager->SetViewVisibility(view, nsViewVisibility_kHide); viewManager->ResizeView(view, 0, 0); + // set here so hide chain can close the menu as well. + mMenuOpen = PR_FALSE; } return NS_OK; @@ -693,10 +694,9 @@ nsMenuFrame::OpenMenuInternal(PRBool aActivateFlag) menuPopup->RemoveKeyboardNavigator(); } + // activate false will also set the mMenuOpen to false. ActivateMenu(PR_FALSE); - mMenuOpen = PR_FALSE; - if (nsMenuFrame::mDismissalListener) nsMenuFrame::mDismissalListener->EnableListener(PR_TRUE); diff --git a/mozilla/layout/xul/base/src/nsSprocketLayout.cpp b/mozilla/layout/xul/base/src/nsSprocketLayout.cpp index 7c8078f1091..56d29ab1307 100644 --- a/mozilla/layout/xul/base/src/nsSprocketLayout.cpp +++ b/mozilla/layout/xul/base/src/nsSprocketLayout.cpp @@ -93,6 +93,20 @@ nsSprocketLayout::SetFrameState(nsIBox* aBox, nsFrameState aState) NS_IMETHODIMP nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) { + // see if we are collapsed. If we are? its easy. Layout out each child at 0,0,0,0; + PRBool collapsed = PR_FALSE; + aBox->IsCollapsed(aState, collapsed); + if (collapsed) { + nsIBox* child; + aBox->GetChildBox(&child); + while(child) + { + nsContainerBox::LayoutChildAt(aState, child, nsRect(0,0,0,0)); + child->GetNextBox(&child); + } + return NS_OK; + } + aState.PushStackMemory(); // ----- figure out our size ---------- @@ -272,7 +286,7 @@ nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) nsRect childRect(x, y, width, height); - if (!childBoxSize->collapsed) { + // if (!childBoxSize->collapsed) { if (childRect.width > clientRect.width || childRect.height > clientRect.height) { if (childRect.width > clientRect.width) @@ -281,7 +295,7 @@ nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) if (childRect.height > clientRect.height) clientRect.height = childRect.height; } - } + // } ComputeChildsNextPosition(aBox, child, x, @@ -312,7 +326,8 @@ nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) PRBool layout = PR_TRUE; child->GetMargin(margin); - childRect.Deflate(margin); + if (childRect.width >= margin.left + margin.right && childRect.height >= margin.top + margin.bottom) + childRect.Deflate(margin); if (passes > 0) { layout = PR_FALSE; @@ -330,11 +345,11 @@ nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) nsRect oldRect(0,0,0,0); PRBool sizeChanged = PR_FALSE; - if (!childBoxSize->collapsed || layout) { + // if (childBoxSize->collapsed || layout) { child->GetBounds(oldRect); child->SetBounds(aState, childRect); sizeChanged = (childRect.width != oldRect.width || childRect.height != oldRect.height); - } + // } if (sizeChanged) { nsSize maxSize; @@ -353,21 +368,22 @@ nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) needsRedraw = PR_TRUE; } - if (childBoxSize) - if(!childBoxSize->collapsed) - child->UnCollapse(aState); + // if (childBoxSize) + // if(!childBoxSize->collapsed) + // child->UnCollapse(aState); if (layout || sizeChanged) { child->Layout(aState); } // make collapsed children not show up - if (childBoxSize && childBoxSize->collapsed) { - if (layout || sizeChanged) - child->Collapse(aState); - else - child->SetBounds(aState, nsRect(0,0,0,0)); - } else { + // if (childBoxSize && childBoxSize->collapsed) { + // if (layout || sizeChanged) + // child->Collapse(aState); + // else + // child->SetBounds(aState, nsRect(0,0,0,0)); + //} else + { // if the child was html it may have changed its rect. Lets look nsRect newChildRect; child->GetBounds(newChildRect); @@ -416,8 +432,12 @@ nsSprocketLayout::Layout(nsIBox* aBox, nsBoxLayoutState& aState) newChildRect.x = x; newChildRect.y = y; - newChildRect.Deflate(margin); - childRect.Deflate(margin); + if (newChildRect.width >= margin.left + margin.right && newChildRect.height >= margin.top + margin.bottom) + newChildRect.Deflate(margin); + + if (childRect.width >= margin.left + margin.right && childRect.height >= margin.top + margin.bottom) + childRect.Deflate(margin); + child->SetBounds(aState, newChildRect); @@ -626,25 +646,31 @@ nsSprocketLayout::PopulateBoxSizes(nsIBox* aBox, nsBoxLayoutState& aState, nsBox nsSize pref(0,0); nsSize min(0,0); nsSize max(NS_INTRINSICSIZE,NS_INTRINSICSIZE); + nscoord ascent = 0; + PRBool collapsed = PR_FALSE; + child->IsCollapsed(aState, collapsed); + + if (!collapsed) { // only one flexible child? Cool we will just make its preferred size // 0 then and not even have to ask for it. //if (flexes != 1) { - nscoord ascent = 0; - child->GetPrefSize(aState, pref); - child->GetMinSize(aState, min); - child->GetMaxSize(aState, max); - child->GetAscent(aState, ascent); - nsMargin margin; - child->GetMargin(margin); - ascent += margin.top + margin.bottom; + + child->GetPrefSize(aState, pref); + child->GetMinSize(aState, min); + child->GetMaxSize(aState, max); + child->GetAscent(aState, ascent); + nsMargin margin; + child->GetMargin(margin); + ascent += margin.top + margin.bottom; //} - nsBox::BoundsCheck(min, pref, max); + nsBox::BoundsCheck(min, pref, max); - AddMargin(child, pref); - AddMargin(child, min); - AddMargin(child, max); + AddMargin(child, pref); + AddMargin(child, min); + AddMargin(child, max); + } if (!currentBox) { // create one. @@ -674,16 +700,19 @@ nsSprocketLayout::PopulateBoxSizes(nsIBox* aBox, nsBoxLayoutState& aState, nsBox nscoord flex = 0; child->GetFlex(aState, flex); - PRBool collapsed = PR_FALSE; - child->IsCollapsed(aState, collapsed); - // set them - currentBox->flex = flex; - currentBox->collapsed = collapsed; + // set them if you collapsed you are not flexible. + if (collapsed) + currentBox->flex = 0; + else + currentBox->flex = flex; + + //currentBox->collapsed = PR_FALSE; currentBox->pref = prefWidth; currentBox->min = minWidth; currentBox->max = maxWidth; + NS_ASSERTION(minWidth <= prefWidth && prefWidth <= maxWidth,"Bad min, pref, max widths!"); } @@ -897,7 +926,9 @@ nsSprocketLayout::ChildResized(nsIBox* aBox, nsMargin margin(0,0,0,0); aChild->GetMargin(margin); nsRect rect(aChildActualRect); - rect.Deflate(margin); + if (rect.width >= margin.left + margin.right && rect.height >= margin.top + margin.bottom) + rect.Deflate(margin); + aChild->SetBounds(aState, rect); aChild->Layout(aState); } @@ -939,13 +970,16 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox, NS_ASSERTION((boxSizes->min <= boxSizes->pref && boxSizes->pref <= boxSizes->max),"bad pref, min, max size"); + // ignore collapsed children - if (boxSizes->collapsed) - { - computedBoxSizes->valid = PR_TRUE; - computedBoxSizes->size = boxSizes->pref; - validCount++; - } else { + // if (boxSizes->collapsed) + // { + // computedBoxSizes->valid = PR_TRUE; + // computedBoxSizes->size = boxSizes->pref; + // validCount++; + // boxSizes->flex = 0; + // }// else { + if (computedBoxSizes->valid) { sizeRemaining -= computedBoxSizes->size; validCount++; @@ -960,7 +994,7 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox, springConstantsRemaining += boxSizes->flex; sizeRemaining -= boxSizes->pref; } - } + //} boxSizes = boxSizes->next; @@ -987,7 +1021,7 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox, // ignore collapsed springs - if (!boxSizes->collapsed) { + // if (!boxSizes->collapsed) { nscoord pref = 0; nscoord max = NS_INTRINSICSIZE; @@ -1018,7 +1052,7 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox, limit = PR_TRUE; } } - } + // } boxSizes = boxSizes->next; computedBoxSizes = computedBoxSizes->next; } @@ -1034,7 +1068,7 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox, while (boxSizes) { // ignore collapsed springs - if (!(boxSizes && boxSizes->collapsed)) { + // if (!(boxSizes && boxSizes->collapsed)) { nscoord pref = 0; nscoord flex = 0; @@ -1047,7 +1081,7 @@ nsSprocketLayout::ComputeChildSizes(nsIBox* aBox, } aGivenSize += computedBoxSizes->size; - } + // } boxSizes = boxSizes->next; computedBoxSizes = computedBoxSizes->next; @@ -1072,16 +1106,16 @@ nsSprocketLayout::GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aState, nsSize& aS while (child) { // ignore collapsed children - PRBool isCollapsed = PR_FALSE; - child->IsCollapsed(aState, isCollapsed); + //PRBool isCollapsed = PR_FALSE; + //child->IsCollapsed(aState, isCollapsed); - if (!isCollapsed) - { + //if (!isCollapsed) + //{ nsSize pref(0,0); child->GetPrefSize(aState, pref); AddMargin(child, pref); AddLargestSize(aSize, pref, isHorizontal); - } + //} child->GetNextBox(&child); } @@ -1111,11 +1145,11 @@ nsSprocketLayout::GetMinSize(nsIBox* aBox, nsBoxLayoutState& aState, nsSize& aSi while (child) { // ignore collapsed children - PRBool isCollapsed = PR_FALSE; - aBox->IsCollapsed(aState, isCollapsed); + //PRBool isCollapsed = PR_FALSE; + //aBox->IsCollapsed(aState, isCollapsed); - if (!isCollapsed) - { + //if (!isCollapsed) + //{ nsSize min(0,0); nsSize pref(0,0); nscoord flex = 0; @@ -1135,7 +1169,7 @@ nsSprocketLayout::GetMinSize(nsIBox* aBox, nsBoxLayoutState& aState, nsSize& aSi AddMargin(child, min); AddLargestSize(aSize, min, isHorizontal); - } + //} child->GetNextBox(&child); } @@ -1167,18 +1201,18 @@ nsSprocketLayout::GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aState, nsSize& aSi while (child) { // ignore collapsed children - PRBool isCollapsed = PR_FALSE; - aBox->IsCollapsed(aState, isCollapsed); + //PRBool isCollapsed = PR_FALSE; + //aBox->IsCollapsed(aState, isCollapsed); - if (!isCollapsed) - { + //if (!isCollapsed) + //{ // if completely redefined don't even ask our child for its size. nsSize max(NS_INTRINSICSIZE, NS_INTRINSICSIZE); child->GetMaxSize(aState, max); AddMargin(child, max); AddSmallestSize(aSize, max, isHorizontal); - } + //} child->GetNextBox(&child); @@ -1209,11 +1243,11 @@ nsSprocketLayout::GetAscent(nsIBox* aBox, nsBoxLayoutState& aState, nscoord& aAs while (child) { // ignore collapsed children - PRBool isCollapsed = PR_FALSE; - aBox->IsCollapsed(aState, isCollapsed); + //PRBool isCollapsed = PR_FALSE; + //aBox->IsCollapsed(aState, isCollapsed); - if (!isCollapsed) - { + //if (!isCollapsed) + //{ // if completely redefined don't even ask our child for its size. nscoord ascent = 0; child->GetAscent(aState, ascent); @@ -1230,7 +1264,7 @@ nsSprocketLayout::GetAscent(nsIBox* aBox, nsBoxLayoutState& aState, nscoord& aAs if (aAscent == 0) aAscent = ascent; } - } + //} child->GetNextBox(&child); } @@ -1394,7 +1428,7 @@ nsBoxSize::Clear() pref = 0; min = 0; max = NS_INTRINSICSIZE; - collapsed = PR_FALSE; + //collapsed = PR_FALSE; ascent = 0; left = 0; right = 0; diff --git a/mozilla/layout/xul/base/src/nsSprocketLayout.h b/mozilla/layout/xul/base/src/nsSprocketLayout.h index 84ccaaed90b..1f5ccd0c8ad 100644 --- a/mozilla/layout/xul/base/src/nsSprocketLayout.h +++ b/mozilla/layout/xul/base/src/nsSprocketLayout.h @@ -42,7 +42,7 @@ public: nscoord flex; nscoord left; nscoord right; - PRBool collapsed; + //PRBool collapsed; PRBool bogus; nsBoxSize* next; diff --git a/mozilla/layout/xul/base/src/nsStackLayout.cpp b/mozilla/layout/xul/base/src/nsStackLayout.cpp index 5ebe88eeedc..34bc9ccd084 100644 --- a/mozilla/layout/xul/base/src/nsStackLayout.cpp +++ b/mozilla/layout/xul/base/src/nsStackLayout.cpp @@ -76,16 +76,16 @@ nsStackLayout::GetPrefSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState, nsSi while (child) { // ignore collapsed children - PRBool isCollapsed = PR_FALSE; - child->IsCollapsed(aBoxLayoutState, isCollapsed); + // PRBool isCollapsed = PR_FALSE; + // child->IsCollapsed(aBoxLayoutState, isCollapsed); - if (!isCollapsed) - { + // if (!isCollapsed) + // { nsSize pref(0,0); child->GetPrefSize(aBoxLayoutState, pref); AddMargin(child, pref); AddLargestSize(aSize, pref); - } + // } child->GetNextBox(&child); } @@ -112,16 +112,16 @@ nsStackLayout::GetMinSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState, nsSiz while (child) { // ignore collapsed children - PRBool isCollapsed = PR_FALSE; - aBox->IsCollapsed(aBoxLayoutState, isCollapsed); + //PRBool isCollapsed = PR_FALSE; + //aBox->IsCollapsed(aBoxLayoutState, isCollapsed); - if (!isCollapsed) - { + //if (!isCollapsed) + //{ nsSize min(0,0); child->GetMinSize(aBoxLayoutState, min); AddMargin(child, min); AddLargestSize(aSize, min); - } + //} child->GetNextBox(&child); } @@ -150,18 +150,18 @@ nsStackLayout::GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState, nsSiz while (child) { // ignore collapsed children - PRBool isCollapsed = PR_FALSE; - aBox->IsCollapsed(aBoxLayoutState, isCollapsed); + //PRBool isCollapsed = PR_FALSE; + //aBox->IsCollapsed(aBoxLayoutState, isCollapsed); - if (!isCollapsed) - { + //if (!isCollapsed) + //{ // if completely redefined don't even ask our child for its size. nsSize max(NS_INTRINSICSIZE, NS_INTRINSICSIZE); child->GetMaxSize(aBoxLayoutState, max); AddMargin(child, max); AddSmallestSize(aSize, max); - } + //} child->GetNextBox(&child); @@ -189,11 +189,11 @@ nsStackLayout::GetAscent(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState, nscoor while (child) { // ignore collapsed children - PRBool isCollapsed = PR_FALSE; - aBox->IsCollapsed(aBoxLayoutState, isCollapsed); + //PRBool isCollapsed = PR_FALSE; + //aBox->IsCollapsed(aBoxLayoutState, isCollapsed); - if (!isCollapsed) - { + //if (!isCollapsed) + //{ // if completely redefined don't even ask our child for its size. nscoord ascent = 0; child->GetAscent(aBoxLayoutState, ascent); @@ -203,7 +203,7 @@ nsStackLayout::GetAscent(nsIBox* aBox, nsBoxLayoutState& aBoxLayoutState, nscoor if (ascent > aAscent) aAscent = ascent; - } + //} child->GetNextBox(&child);