Bug 1323186 - ensure the result of the operation is floating point. draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 13 Dec 2016 16:11:22 +0200
changeset 448963 e26fb95dad369ee1ff8fabb433a930cc5f234855
parent 448717 f46f85dcfbc2b3098ea758825d18be6fab33cbc6
child 539441 8bf03d88486486184b5a5ac6e7a9af975771169b
push id38508
push userbmo:bpostelnicu@mozilla.com
push dateTue, 13 Dec 2016 14:11:55 +0000
bugs1323186
milestone53.0a1
Bug 1323186 - ensure the result of the operation is floating point. 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) {