Bug 865503: Simplify logic (and remove else-after-return) in nsTableFrame::AncestorsHaveStyleHeight. r=mats
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 25 Apr 2013 09:03:34 -0700
changeset 129875 de487abe67a2bc8888315eb822dbd031b48f2e67
parent 129874 6594045f097555ebf346e6e1d2652b7553d43e6d
child 129876 21b54ce74c1870cb16697f3986fe55657ff3ffd5
push id27064
push userdholbert@mozilla.com
push dateThu, 25 Apr 2013 16:04:14 +0000
treeherdermozilla-inbound@de487abe67a2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmats
bugs865503
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 865503: Simplify logic (and remove else-after-return) in nsTableFrame::AncestorsHaveStyleHeight. r=mats
layout/tables/nsTableFrame.cpp
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1531,20 +1531,17 @@ nsTableFrame::AncestorsHaveStyleHeight(c
       // calc() with percentages treated like 'auto' on internal table elements
       if (height.GetUnit() != eStyleUnit_Auto &&
           (!height.IsCalcUnit() || !height.HasPercent())) {
         return true;
       }
     }
     else if (nsGkAtoms::tableFrame == frameType) {
       // we reached the containing table, so always return
-      if (rs->mStylePosition->mHeight.GetUnit() != eStyleUnit_Auto) {
-        return true;
-      }
-      else return false;
+      return rs->mStylePosition->mHeight.GetUnit() != eStyleUnit_Auto;
     }
   }
   return false;
 }
 
 // See if a special height reflow needs to occur and if so, call RequestSpecialHeightReflow
 void
 nsTableFrame::CheckRequestSpecialHeightReflow(const nsHTMLReflowState& aReflowState)