Bug 1398623 - Remove several unused variables in nsSprocketLayout::PopulateBoxSizes r=xidorn
authorsajattack <sajattack@gmail.com>
Sun, 10 Sep 2017 22:33:13 -0700
changeset 662955 f0531bd87c9b2cfbfe4441b5d70c7f2dcf573693
parent 662954 dad72fdc1cbf8fdbe31a810e5c990a4807a99393
child 662956 817a2c4234121c4fabf35922c170503f70e46b3f
push id79254
push userbmo:mh+mozilla@glandium.org
push dateTue, 12 Sep 2017 09:42:10 +0000
reviewersxidorn
bugs1398623
milestone57.0a1
Bug 1398623 - Remove several unused variables in nsSprocketLayout::PopulateBoxSizes r=xidorn MozReview-Commit-ID: 3VXaVgBhgTL
layout/xul/nsSprocketLayout.cpp
--- a/layout/xul/nsSprocketLayout.cpp
+++ b/layout/xul/nsSprocketLayout.cpp
@@ -731,31 +731,27 @@ nsSprocketLayout::PopulateBoxSizes(nsIFr
     while (currentBox && currentBox->bogus) {
       last = currentBox;
       currentBox = currentBox->next;
     }
     ++childCount;
     nsSize pref(0,0);
     nsSize minSize(0,0);
     nsSize maxSize(NS_INTRINSICSIZE,NS_INTRINSICSIZE);
-    nscoord ascent = 0;
     bool collapsed = child->IsXULCollapsed();
 
     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)  {
 
       pref = child->GetXULPrefSize(aState);
       minSize = child->GetXULMinSize(aState);
       maxSize = nsBox::BoundsCheckMinMax(minSize, child->GetXULMaxSize(aState));
-      ascent = child->GetXULBoxAscent(aState);
-      nsMargin margin;
-      child->GetXULMargin(margin);
-      ascent += margin.top;
+      child->GetXULBoxAscent(aState);
     //}
 
       pref = nsBox::BoundsCheck(minSize, pref, maxSize);
 
       AddMargin(child, pref);
       AddMargin(child, minSize);
       AddMargin(child, maxSize);
     }