Chromium Code Reviews| Index: Source/core/rendering/RenderBoxModelObject.cpp |
| diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp |
| index aada21668d2aeabe3d149fa3e8ad5fe5988748ad..f978c7a4ffd12272bd05d5d0e7921ffc3b84b580 100644 |
| --- a/Source/core/rendering/RenderBoxModelObject.cpp |
| +++ b/Source/core/rendering/RenderBoxModelObject.cpp |
| @@ -1062,8 +1062,7 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fil |
| LayoutUnit computedXPosition = minimumValueForLength(fillLayer->xPosition(), availableWidth, renderView, true); |
| if (backgroundRepeatX == RoundFill && positioningAreaSize.width() > 0 && fillTileSize.width() > 0) { |
| - int nrTiles = ceil((double)positioningAreaSize.width() / |
| - fillTileSize.width()); |
| + long nrTiles = lroundf((float)positioningAreaSize.width() / fillTileSize.width()); |
|
eseidel
2013/09/17 18:07:00
So this is intentionally causing whitespace when t
eseidel
2013/09/17 18:08:32
I see. The author has *specifically* requested th
Julien - ping for review
2013/09/17 18:37:48
This mandated by the specification.
Thanks for ma
|
| if (fillLayer->size().size.height().isAuto() && backgroundRepeatY != RoundFill) { |
| fillTileSize.setHeight(fillTileSize.height() * positioningAreaSize.width() / (nrTiles * fillTileSize.width())); |
| @@ -1076,8 +1075,7 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fil |
| LayoutUnit computedYPosition = minimumValueForLength(fillLayer->yPosition(), availableHeight, renderView, true); |
| if (backgroundRepeatY == RoundFill && positioningAreaSize.height() > 0 && fillTileSize.height() > 0) { |
| - int nrTiles = ceil((double)positioningAreaSize.height() / |
| - fillTileSize.height()); |
| + long nrTiles = lroundf((float)positioningAreaSize.height() / fillTileSize.height()); |
| if (fillLayer->size().size.width().isAuto() && backgroundRepeatX != RoundFill) { |
| fillTileSize.setWidth(fillTileSize.width() * positioningAreaSize.height() / (nrTiles * fillTileSize.height())); |