mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 368902: Unnecessary looping over collapsed children in nsSprocketLayout, patch by Andreas Lange <anlan@lange.cx>, r+sr=bzbarsky
This commit is contained in:
parent
145446532d
commit
b7f60f5415
@ -1400,7 +1400,7 @@ nsSprocketLayout::GetMinSize(nsIBox* aBox, nsBoxLayoutState& aState, nsSize& aSi
|
|||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
// ignore collapsed children
|
// ignore collapsed children
|
||||||
if (!aBox->IsCollapsed(aState))
|
if (!child->IsCollapsed(aState))
|
||||||
{
|
{
|
||||||
nsSize min = child->GetMinSize(aState);
|
nsSize min = child->GetMinSize(aState);
|
||||||
nsSize pref(0,0);
|
nsSize pref(0,0);
|
||||||
@ -1474,7 +1474,7 @@ nsSprocketLayout::GetMaxSize(nsIBox* aBox, nsBoxLayoutState& aState, nsSize& aSi
|
|||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
// ignore collapsed children
|
// ignore collapsed children
|
||||||
if (!aBox->IsCollapsed(aState))
|
if (!child->IsCollapsed(aState))
|
||||||
{
|
{
|
||||||
// if completely redefined don't even ask our child for its size.
|
// if completely redefined don't even ask our child for its size.
|
||||||
nsSize max = child->GetMaxSize(aState);
|
nsSize max = child->GetMaxSize(aState);
|
||||||
@ -1539,7 +1539,7 @@ nsSprocketLayout::GetAscent(nsIBox* aBox, nsBoxLayoutState& aState, nscoord& aAs
|
|||||||
while (child)
|
while (child)
|
||||||
{
|
{
|
||||||
// ignore collapsed children
|
// ignore collapsed children
|
||||||
//if (!aBox->IsCollapsed(aStatew))
|
//if (!child->IsCollapsed(aState))
|
||||||
//{
|
//{
|
||||||
// if completely redefined don't even ask our child for its size.
|
// if completely redefined don't even ask our child for its size.
|
||||||
nscoord ascent = child->GetBoxAscent(aState);
|
nscoord ascent = child->GetBoxAscent(aState);
|
||||||
|
Loading…
Reference in New Issue
Block a user