Bug 1531025 part 1: Add braces around conditions in nsIFrame::ComputeBorderRadii(). r=boris
☠☠ backed out by 1003ed8243c5 ☠ ☠
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 28 Feb 2019 23:50:39 +0000
changeset 519718 e4028e1ca6c7f6b62ba06ab10abfcb2301a4257d
parent 519717 a456a1594cb1960c465dc7a582134710f286fcf9
child 519719 fd71937c6f25db7365001a491e32f283a41397e7
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersboris
bugs1531025
milestone67.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 1531025 part 1: Add braces around conditions in nsIFrame::ComputeBorderRadii(). r=boris This patch doesn't change any logic/behavior -- it's just adding braces for clarity. Differential Revision: https://phabricator.services.mozilla.com/D21578
layout/generic/nsFrame.cpp
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -1688,20 +1688,24 @@ bool nsIFrame::ComputeBorderRadii(const 
   bool haveRadius = false;
   double ratio = 1.0f;
   NS_FOR_CSS_SIDES(side) {
     uint32_t hc1 = SideToHalfCorner(side, false, true);
     uint32_t hc2 = SideToHalfCorner(side, true, true);
     nscoord length =
         SideIsVertical(side) ? aBorderArea.height : aBorderArea.width;
     nscoord sum = aRadii[hc1] + aRadii[hc2];
-    if (sum) haveRadius = true;
+    if (sum) {
+      haveRadius = true;
+    }
 
     // avoid floating point division in the normal case
-    if (length < sum) ratio = std::min(ratio, double(length) / sum);
+    if (length < sum) {
+      ratio = std::min(ratio, double(length) / sum);
+    }
   }
   if (ratio < 1.0) {
     NS_FOR_CSS_HALF_CORNERS(corner) { aRadii[corner] *= ratio; }
   }
 
   return haveRadius;
 }