https://bugs.webkit.org/show_bug.cgi?id=120668
Source/WebCore:
Patch by Andrei Parvu <parvu@adobe.com> on 2013-09-24
Reviewed by Darin Adler.
Tests already available in css3/masking and css3/background
* rendering/RenderBoxModelObject.cpp: Rounded the number of tiles to the nearest natural number.
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
LayoutTests:
Changed the sizes of the images/masks in the tests to be compliant with the new behaviour.
Patch by Andrei Parvu <parvu@adobe.com> on 2013-09-24
Reviewed by Darin Adler.
* css3/background/background-repeat-round-auto1-expected.html:
* css3/background/background-repeat-round-auto2-expected.html:
* css3/background/background-repeat-round-border-expected.html:
* css3/background/background-repeat-round-content-expected.html:
* css3/background/background-repeat-round-padding-expected.html:
* css3/background/background-repeat-round-padding.html:
* css3/masking/mask-repeat-round-auto1-expected.html:
* css3/masking/mask-repeat-round-auto2-expected.html:
* css3/masking/mask-repeat-round-border-expected.html:
* css3/masking/mask-repeat-round-content-expected.html:
* css3/masking/mask-repeat-round-padding-expected.html:
* css3/masking/mask-repeat-round-padding.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156322
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-09-24 Andrei Parvu <parvu@adobe.com>
+
+ [CSS Background] repeat: round should round the number of tiles to the nearest natural number
+ https://bugs.webkit.org/show_bug.cgi?id=120668
+
+ Changed the sizes of the images/masks in the tests to be compliant with the new behaviour.
+
+ Reviewed by Darin Adler.
+
+ * css3/background/background-repeat-round-auto1-expected.html:
+ * css3/background/background-repeat-round-auto2-expected.html:
+ * css3/background/background-repeat-round-border-expected.html:
+ * css3/background/background-repeat-round-content-expected.html:
+ * css3/background/background-repeat-round-padding-expected.html:
+ * css3/background/background-repeat-round-padding.html:
+ * css3/masking/mask-repeat-round-auto1-expected.html:
+ * css3/masking/mask-repeat-round-auto2-expected.html:
+ * css3/masking/mask-repeat-round-border-expected.html:
+ * css3/masking/mask-repeat-round-content-expected.html:
+ * css3/masking/mask-repeat-round-padding-expected.html:
+ * css3/masking/mask-repeat-round-padding.html:
+
2013-09-23 Gurpreet Kaur <k.gurpreet@samsung.com>
CSS Unit vh, vw, vmin and vmax in box-shadow are not applied.
padding: 50px;
border: 50px solid transparent;
background-image: url(resources/circle.png);
- background-size: 100px 79px;
+ background-size: 111px 88px;
background-repeat: repeat;
background-origin: border-box;
background-clip: border-box;
padding: 50px;
border: 50px solid transparent;
background-image: url(resources/circle.png);
- background-size: 106px 85px;
+ background-size: 124px 100px;
background-repeat: repeat;
background-origin: border-box;
background-clip: border-box;
padding: 50px;
border: 50px solid transparent;
background-image: url(resources/circle.png);
- background-size: 100px 75px;
+ background-size: 111px 85px;
background-repeat: repeat;
background-origin: border-box;
background-clip: border-box;
padding: 50px;
border: 50px solid transparent;
background-image: url(resources/circle.png);
- background-size: 66px 40px;
+ background-size: 72px 40px;
background-repeat: repeat;
background-origin: content-box;
background-clip: content-box;
padding: 50px;
border: 50px solid transparent;
background-image: url(resources/circle.png);
- background-size: 100px 83px;
+ background-size: 90px 83px;
background-repeat: repeat;
background-origin: padding-box;
background-clip: padding-box;
padding: 50px;
border: 50px solid transparent;
background-image: url(resources/circle.png);
- background-size: 100px 93px;
+ background-size: 93px 87px;
background-repeat: round;
background-origin: padding-box;
background-clip: padding-box;
border: 50px solid blue;
padding: 50px;
-webkit-mask-image: url(resources/circle.png);
- -webkit-mask-size: 100px 79px;
+ -webkit-mask-size: 111px 88px;
-webkit-mask-repeat: repeat;
-webkit-mask-origin: border-box;
-webkit-mask-clip: border-box;
border: 50px solid blue;
padding: 50px;
-webkit-mask-image: url(resources/circle.png);
- -webkit-mask-size: 106px 85px;
+ -webkit-mask-size: 124px 100px;
-webkit-mask-repeat: repeat;
-webkit-mask-origin: border-box;
-webkit-mask-clip: border-box;
border: 50px solid blue;
padding: 50px;
-webkit-mask-image: url(resources/circle.png);
- -webkit-mask-size: 100px 75px;
+ -webkit-mask-size: 111px 85px;
-webkit-mask-repeat: repeat;
-webkit-mask-origin: border-box;
-webkit-mask-clip: border-box;
border: 50px solid blue;
padding: 50px;
-webkit-mask-image: url(resources/circle.png);
- -webkit-mask-size: 66px 40px;
+ -webkit-mask-size: 72px 40px;
-webkit-mask-repeat: repeat;
-webkit-mask-origin: content-box;
-webkit-mask-clip: content-box;
border: 50px solid blue;
padding: 50px;
-webkit-mask-image: url(resources/circle.png);
- -webkit-mask-size: 100px 83px;
+ -webkit-mask-size: 90px 83px;
-webkit-mask-repeat: repeat;
-webkit-mask-origin: padding-box;
-webkit-mask-clip: padding-box;
border: 50px solid blue;
padding: 50px;
-webkit-mask-image: url(resources/circle.png);
- -webkit-mask-size: 100px 93px;
+ -webkit-mask-size: 93px 87px;
-webkit-mask-repeat: round;
-webkit-mask-origin: padding-box;
-webkit-mask-clip: padding-box;
+2013-09-24 Andrei Parvu <parvu@adobe.com>
+
+ [CSS Background] repeat: round should round the number of tiles to the nearest natural number
+ https://bugs.webkit.org/show_bug.cgi?id=120668
+
+ Reviewed by Darin Adler.
+
+ Tests already available in css3/masking and css3/background
+
+ * rendering/RenderBoxModelObject.cpp: Rounded the number of tiles to the nearest natural number.
+ (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
+
2013-09-24 Ryuan Choi <ryuan.choi@samsung.com>
Remove ScrollView::platformInit() and ScrollView::platformDestroy()
LayoutUnit computedXPosition = minimumValueForLength(fillLayer->xPosition(), availableWidth, 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 (!nrTiles)
+ nrTiles = 1;
if (fillLayer->size().size.height().isAuto() && backgroundRepeatY != RoundFill)
fillTileSize.setHeight(fillTileSize.height() * positioningAreaSize.width() / (nrTiles * fillTileSize.width()));
LayoutUnit computedYPosition = minimumValueForLength(fillLayer->yPosition(), availableHeight, 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 (!nrTiles)
+ nrTiles = 1;
if (fillLayer->size().size.width().isAuto() && backgroundRepeatX != RoundFill)
fillTileSize.setWidth(fillTileSize.width() * positioningAreaSize.height() / (nrTiles * fillTileSize.height()));