Index: Source/core/rendering/RenderBoxModelObject.cpp |
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp |
index f978c7a4ffd12272bd05d5d0e7921ffc3b84b580..415f526aea75777c0fc7930c0fc4b7b8af54f060 100644 |
--- a/Source/core/rendering/RenderBoxModelObject.cpp |
+++ b/Source/core/rendering/RenderBoxModelObject.cpp |
@@ -934,7 +934,7 @@ IntSize RenderBoxModelObject::calculateFillTileSize(const FillLayer* fillLayer, |
float verticalScaleFactor = imageIntrinsicSize.height() |
? static_cast<float>(positioningAreaSize.height()) / imageIntrinsicSize.height() : 1; |
float scaleFactor = type == Contain ? min(horizontalScaleFactor, verticalScaleFactor) : max(horizontalScaleFactor, verticalScaleFactor); |
- return IntSize(max(1, static_cast<int>(imageIntrinsicSize.width() * scaleFactor)), max(1, static_cast<int>(imageIntrinsicSize.height() * scaleFactor))); |
+ return IntSize(max(1l, lround(imageIntrinsicSize.width() * scaleFactor)), max(1l, lround(imageIntrinsicSize.height() * scaleFactor))); |
} |
} |