RESOLVED FIXED 119080
[CSS Masking] -webkit-mask-repeat: round does not work
https://bugs.webkit.org/show_bug.cgi?id=119080
Summary [CSS Masking] -webkit-mask-repeat: round does not work
Andrei Parvu
Reported 2013-07-25 04:49:31 PDT
When using -webkit-mask-repeat with a value of 'round' the image isn't scaled to fit a whole number of times in the background but isn't repeated at all. Looking through the code, I noticed that everything different from -webkit-mask-repeat: repeat is treated like -webkit-mask-repeat: no-repeat, so the space repeat style is not implemented.
Attachments
Example of -webkit-mask-repeat: round usage which doesn't work. (814 bytes, text/html)
2013-07-25 04:54 PDT, Andrei Parvu
no flags
Patch (23.53 KB, patch)
2013-07-29 03:37 PDT, Andrei Parvu
no flags
Patch (40.90 KB, patch)
2013-08-01 02:02 PDT, Andrei Parvu
no flags
Andrei Parvu
Comment 1 2013-07-25 04:54:01 PDT
Created attachment 207449 [details] Example of -webkit-mask-repeat: round usage which doesn't work.
Andrei Parvu
Comment 2 2013-07-29 03:37:42 PDT
Dirk Schulze
Comment 3 2013-07-31 05:38:35 PDT
Comment on attachment 207633 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207633&action=review > Source/WebCore/ChangeLog:7 > + Added the round functionality to -webkit-mask-repeat. > + https://bugs.webkit.org/show_bug.cgi?id=119080 > + Please add some more lines of comments what you did and how it influenced the bahavior on the dimension calculation code. > Source/WebCore/rendering/RenderBoxModelObject.cpp:1312 > + if (backgroundRepeatX == RoundFill && positioningAreaSize.width() > 0 && fillTileSize.width() > 0) { Doesn't background call the same code path? When it works for background, why doesn't it work for -webkit-mask? If the code exists for background somewhere, we should make sure that we reuse the code. Do we have tests for background-repeat and "round"? > Source/WebCore/rendering/RenderBoxModelObject.cpp:1314 > + int nrTiles = ceil((double)positioningAreaSize.width() / > + fillTileSize.width()); why do you split the line here? You don't do it later?
Andrei Parvu
Comment 4 2013-08-01 02:02:09 PDT
Andrei Parvu
Comment 5 2013-08-01 02:04:20 PDT
This also fixes the background-repeat. I added background-repeat tests and addressed your comments.
Dirk Schulze
Comment 6 2013-08-01 05:38:46 PDT
Comment on attachment 207907 [details] Patch r=me.
WebKit Commit Bot
Comment 7 2013-08-01 06:02:31 PDT
Comment on attachment 207907 [details] Patch Clearing flags on attachment: 207907 Committed r153582: <http://trac.webkit.org/changeset/153582>
WebKit Commit Bot
Comment 8 2013-08-01 06:02:35 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.