Changeset 156097 in webkit
- Timestamp:
- Sep 19, 2013 7:41:36 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r156096 r156097 1 2013-09-19 Andrei Parvu <parvu@adobe.com> 2 3 [CSS Masking/Background] Position property should be ignored when using repeat: space 4 https://bugs.webkit.org/show_bug.cgi?id=120623 5 6 Reviewed by Dirk Schulze. 7 8 * css3/masking/mask-repeat-one-copy-expected.html: 9 * css3/masking/mask-repeat-one-copy.html: Only one copy of the mask should be drawn, and background position should determine its position. 10 * css3/masking/mask-repeat-space-padding.html: Added a mask-position which should be ignored. 11 1 12 2013-09-19 Michał Pakuła vel Rutka <m.pakula@samsung.com> 2 13 -
trunk/LayoutTests/css3/masking/mask-repeat-one-copy-expected.html
r156096 r156097 15 15 padding: 50px; 16 16 -webkit-mask-image: url("resources/circle.png"); 17 -webkit-mask-size: 153px 127px;18 -webkit-mask-repeat: space;17 -webkit-mask-size: 400px 300px; 18 -webkit-mask-repeat: no-repeat; 19 19 -webkit-mask-origin: padding-box; 20 -webkit-mask-position: 100px 100px; 20 21 -webkit-mask-clip: padding-box; 21 22 } -
trunk/LayoutTests/css3/masking/mask-repeat-one-copy.html
r156096 r156097 15 15 padding: 50px; 16 16 -webkit-mask-image: url("resources/circle.png"); 17 -webkit-mask-size: 153px 127px;17 -webkit-mask-size: 400px 300px; 18 18 -webkit-mask-repeat: space; 19 19 -webkit-mask-origin: padding-box; 20 -webkit-mask-position: 100px 100px; 20 21 -webkit-mask-clip: padding-box; 21 22 } -
trunk/LayoutTests/css3/masking/mask-repeat-space-padding.html
r154875 r156097 18 18 -webkit-mask-repeat: space; 19 19 -webkit-mask-origin: padding-box; 20 -webkit-mask-position: 150px 150px; /* This should be igonored because of repeat: space */ 20 21 -webkit-mask-clip: padding-box; 21 22 } -
trunk/Source/WebCore/ChangeLog
r156095 r156097 1 2013-09-19 Andrei Parvu <parvu@adobe.com> 2 3 [CSS Masking/Background] Position property should be ignored when using repeat: space 4 https://bugs.webkit.org/show_bug.cgi?id=120623 5 6 The background/mask-position should be ignored when using repeat: space, 7 unless there is not enough space for two copies of the image. In that case, 8 only one image is placed and background/mask-position determines its position. 9 10 Reviewed by Dirk Schulze. 11 12 Test: css3/masking/mask-repeat-one-copy.html 13 14 * rendering/RenderBoxModelObject.cpp: Ignored position property if space value is positive, set no-repeat otherwise. 15 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): 16 1 17 2013-09-19 Andreas Kling <akling@apple.com> 2 18 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r155802 r156097 1038 1038 { 1039 1039 int numberOfTiles = areaSize / tileSize; 1040 int space = 0;1040 int space = -1; 1041 1041 1042 1042 if (numberOfTiles > 1) … … 1158 1158 int actualWidth = geometry.tileSize().width() + space; 1159 1159 1160 geometry.setSpaceSize(FloatSize(space, 0)); 1161 geometry.setPhaseX(actualWidth ? actualWidth - roundToInt(computedXPosition + left) % actualWidth : 0); 1162 } else if (backgroundRepeatX == NoRepeatFill) { 1160 if (space >= 0) { 1161 computedXPosition = minimumValueForLength(Length(), availableWidth, &view(), true); 1162 geometry.setSpaceSize(FloatSize(space, 0)); 1163 geometry.setPhaseX(actualWidth ? actualWidth - roundToInt(computedXPosition + left) % actualWidth : 0); 1164 } else 1165 backgroundRepeatX = NoRepeatFill; 1166 } 1167 if (backgroundRepeatX == NoRepeatFill) { 1163 1168 int xOffset = fillLayer->backgroundXOrigin() == RightEdge ? availableWidth - computedXPosition : computedXPosition; 1164 1169 geometry.setNoRepeatX(left + xOffset); … … 1173 1178 int actualHeight = geometry.tileSize().height() + space; 1174 1179 1175 geometry.setSpaceSize(FloatSize(geometry.spaceSize().width(), space)); 1176 geometry.setPhaseY(actualHeight ? actualHeight - roundToInt(computedYPosition + top) % actualHeight : 0); 1177 } else if (backgroundRepeatY == NoRepeatFill) { 1180 if (space >= 0) { 1181 computedYPosition = minimumValueForLength(Length(), availableHeight, &view(), true); 1182 geometry.setSpaceSize(FloatSize(geometry.spaceSize().width(), space)); 1183 geometry.setPhaseY(actualHeight ? actualHeight - roundToInt(computedYPosition + top) % actualHeight : 0); 1184 } else 1185 backgroundRepeatY = NoRepeatFill; 1186 } 1187 if (backgroundRepeatY == NoRepeatFill) { 1178 1188 int yOffset = fillLayer->backgroundYOrigin() == BottomEdge ? availableHeight - computedYPosition : computedYPosition; 1179 1189 geometry.setNoRepeatY(top + yOffset);
Note: See TracChangeset
for help on using the changeset viewer.