WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 120668
122857
Mask/background-repeat: round should round the number of tiles of an image to the nearest natural number greater than 0
https://bugs.webkit.org/show_bug.cgi?id=122857
Summary
Mask/background-repeat: round should round the number of tiles of an image to...
Ryosuke Niwa
Reported
2013-10-15 12:59:55 PDT
Consider merging
https://chromium.googlesource.com/chromium/blink/+/ef18a9ac1bb234f9baf15833fd3e5bf58792e351
index aada216..f978c7a 100644 --- a/Source/core/rendering/RenderBoxModelObject.cpp +++ b/Source/core/rendering/RenderBoxModelObject.cpp @@ -1062,8 +1062,7 @@ 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()); if (fillLayer->size().size.height().isAuto() && backgroundRepeatY != RoundFill) { fillTileSize.setHeight(fillTileSize.height() * positioningAreaSize.width() / (nrTiles * fillTileSize.width())); @@ -1076,8 +1075,7 @@ 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())); Powered by Gitiles
Attachments
Add attachment
proposed patch, testcase, etc.
Dean Jackson
Comment 1
2013-10-15 14:48:30 PDT
*** This bug has been marked as a duplicate of
bug 120668
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug