Bug 368902: Unnecessary looping over collapsed children in nsSprocketLayout, patch by Andreas Lange <anlan@lange.cx>, r+sr=bzbarsky

This commit is contained in:
philringnalda%gmail.com 2007-02-01 07:24:28 +00:00
parent 145446532d
commit b7f60f5415

View File

@ -1400,7 +1400,7 @@ nsSprocketLayout::GetMinSize(nsIBox* aBox, nsBoxLayoutState& aState, nsSize& aSi
while (child)
{
// ignore collapsed children
if (!aBox->IsCollapsed(aState))
if (!child->IsCollapsed(aState))
{
nsSize min = child->GetMinSize(aState);
nsSize pref(0,0);
@ -1474,7 +1474,7 @@ nsSprocketLayout::GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aState, nsSize& aSi
while (child)
{
// ignore collapsed children
if (!aBox->IsCollapsed(aState))
if (!child->IsCollapsed(aState))
{
// if completely redefined don't even ask our child for its size.
nsSize max = child->GetMaxSize(aState);
@ -1539,7 +1539,7 @@ nsSprocketLayout::GetAscent(nsIBox* aBox, nsBoxLayoutState& aState, nscoord& aAs
while (child)
{
// ignore collapsed children
//if (!aBox->IsCollapsed(aStatew))
//if (!child->IsCollapsed(aState))
//{
// if completely redefined don't even ask our child for its size.
nscoord ascent = child->GetBoxAscent(aState);