WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
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
Summary
[CSS Background] repeat: round should round the number of tiles to the neares...
Andrei Parvu
Reported
2013-09-04 01:42:40 PDT
According to the spec [1] repeat: round should round the number of tiles of an image to the nearest natural number greater than 0. [1] -
http://www.w3.org/TR/css3-background/#background-size
Attachments
Patch
(13.28 KB, patch)
2013-09-04 02:07 PDT
,
Andrei Parvu
no flags
Details
Formatted Diff
Diff
Patch
(13.24 KB, patch)
2013-09-17 03:35 PDT
,
Andrei Parvu
no flags
Details
Formatted Diff
Diff
Patch
(13.21 KB, patch)
2013-09-17 23:50 PDT
,
Andrei Parvu
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion
(634.51 KB, application/zip)
2013-09-18 00:56 PDT
,
Build Bot
no flags
Details
Patch
(13.30 KB, patch)
2013-09-23 23:29 PDT
,
Andrei Parvu
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Andrei Parvu
Comment 1
2013-09-04 02:07:26 PDT
Created
attachment 210439
[details]
Patch
Andrei Parvu
Comment 2
2013-09-17 03:35:20 PDT
Created
attachment 211880
[details]
Patch
Darin Adler
Comment 3
2013-09-17 08:55:08 PDT
Comment on
attachment 211880
[details]
Patch 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.
Darin Adler
Comment 4
2013-09-17 08:56:29 PDT
Comment on
attachment 211880
[details]
Patch I’d like to see test cases right on the boundary, demonstrating the rounding behavior. So things just below and just above the place where we round in two different directions. Something that would fail if we used the wrong rounding function.
Andrei Parvu
Comment 5
2013-09-17 23:45:20 PDT
(In reply to
comment #4
)
> (From update of
attachment 211880
[details]
) > I’d like to see test cases right on the boundary, demonstrating the rounding behavior. So things just below and just above the place where we round in two different directions. Something that would fail if we used the wrong rounding function.
Thanks for the comments, Darin! Actually, the tests handle this: if we use ceil instead of round, mask-repeat-round-auto1.html, mask-repeat-round-auto2.html, mask-repeat-round-border.html and mask-repeat-round-content.html fail. If we use floor instead of round mask-repeat-round-padding.html fails. Regarding the round function, we can use lroundf, which takes a float and also does the conversion to long - I'll upload a patch for this.
Andrei Parvu
Comment 6
2013-09-17 23:50:00 PDT
Created
attachment 211975
[details]
Patch
Build Bot
Comment 7
2013-09-18 00:56:30 PDT
Comment on
attachment 211975
[details]
Patch
Attachment 211975
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/1886361
New failing tests: svg/batik/text/smallFonts.svg
Build Bot
Comment 8
2013-09-18 00:56:32 PDT
Created
attachment 211980
[details]
Archive of layout-test-results from webkit-ews-08 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-08 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Andrei Parvu
Comment 9
2013-09-23 23:29:35 PDT
Created
attachment 212430
[details]
Patch
WebKit Commit Bot
Comment 10
2013-09-24 00:46:01 PDT
Comment on
attachment 212430
[details]
Patch Clearing flags on attachment: 212430 Committed
r156322
: <
http://trac.webkit.org/changeset/156322
>
WebKit Commit Bot
Comment 11
2013-09-24 00:46:03 PDT
All reviewed patches have been landed. Closing bug.
Dean Jackson
Comment 12
2013-10-15 14:48:30 PDT
***
Bug 122857
has been marked as a duplicate of this bug. ***
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