[webkit-reviews] review granted: [Bug 120668] [CSS Background] repeat: round should round the number of tiles to the nearest natural number : [Attachment 211880] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 17 08:55:59 PDT 2013


Darin Adler <darin at apple.com> has granted Andrei Parvu <parvu at adobe.com>'s
request for review:
Bug 120668: [CSS Background] repeat: round should round the number of tiles to
the nearest natural number
https://bugs.webkit.org/show_bug.cgi?id=120668

Attachment 211880: Patch
https://bugs.webkit.org/attachment.cgi?id=211880&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=211880&action=review


> Source/WebCore/rendering/RenderBoxModelObject.cpp:1129
> +	   int nrTiles =
static_cast<int>(round((float)positioningAreaSize.width() /
fillTileSize.width()));

I believe the round function takes, and returns, a double. So casting to float
and then calling round doesn't make good sense. If we want to use float, then
it should be roundf, or if we want to stay with double, we should cast to
double, not float.


More information about the webkit-reviews mailing list