Bug 1323186 - ensure the result of the operation is floating point.
MozReview-Commit-ID: 59Cn494rh5l
--- 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) {