Bug 1398623 - Remove several unused variables in nsSprocketLayout::PopulateBoxSizes draft
authorsajattack <sajattack@gmail.com>
Sun, 10 Sep 2017 22:33:13 -0700
changeset 662355 e6c95b27987bb958d8b8fb576b67721ecb6e495d
parent 662089 a5f163da8a9be5d2e86138c57d59be69723b5457
child 662718 6e2460c08d95baf48479a3be92c4a508c331492a
child 664257 2cf5f47ae65fd33b2399847839fdf9ef3b39be7c
child 664362 179f2521de77cb8f1940191f10ff09feb0e3dacf
child 664363 fedb01f0401a7771d4ef65daf6b26c76d62f3fce
push id79041
push userbmo:sajattack@gmail.com
push dateMon, 11 Sep 2017 13:15:45 +0000
bugs1398623
milestone57.0a1
Bug 1398623 - Remove several unused variables in nsSprocketLayout::PopulateBoxSizes 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);
     }