Bug 1323186 - ensure the result of the operation is floating point. r=mattwoodrow
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 13 Dec 2016 16:11:22 +0200
changeset 370728 6a1b2bb85201417598eee814111f658027d629d3
parent 370727 9dbdd7f47e779bf1f33bee2ec3c0427d61a42bc3
child 370729 9e4a2f72702f4e3be3098aa1d9e0b5c7112f28ca
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1323186
milestone53.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 1323186 - ensure the result of the operation is floating point. r=mattwoodrow MozReview-Commit-ID: 59Cn494rh5l
layout/painting/nsCSSRendering.cpp
--- a/layout/painting/nsCSSRendering.cpp
+++ b/layout/painting/nsCSSRendering.cpp
@@ -765,20 +765,20 @@ ConstructBorderRenderer(nsPresContext* a
                "don't have borders but those shouldn't reach this point. "
                "Overflow containers do reach this point though.");
     border.ApplySkipSides(aSkipSides);
   }
 
   // Convert to dev pixels.
   nscoord twipsPerPixel = aPresContext->DevPixelsToAppUnits(1);
   Rect joinedBorderAreaPx = NSRectToRect(joinedBorderArea, twipsPerPixel);
-  Float borderWidths[4] = { Float(border.top / twipsPerPixel),
-                                   Float(border.right / twipsPerPixel),
-                                   Float(border.bottom / twipsPerPixel),
-                                   Float(border.left / twipsPerPixel) };
+  Float borderWidths[4] = { Float(border.top) / twipsPerPixel,
+                                   Float(border.right) / twipsPerPixel,
+                                   Float(border.bottom) / twipsPerPixel,
+                                   Float(border.left) / twipsPerPixel };
   Rect dirtyRect = NSRectToRect(aDirtyRect, twipsPerPixel);
 
   uint8_t borderStyles[4];
   nscolor borderColors[4];
   nsBorderColors* compositeColors[4];
 
   // pull out styles, colors, composite colors
   NS_FOR_CSS_SIDES (i) {