Changeset 117855 in webkit
- Timestamp:
- May 21, 2012 5:24:49 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r117846 r117855 1 2012-05-21 Emil A Eklund <eae@chromium.org> 2 3 Fix bug in paintNinePieceImage exposed by subpixel change 4 https://bugs.webkit.org/show_bug.cgi?id=87060 5 6 Reviewed by Levi Weintraub. 7 8 * platform/chromium-linux/fast/borders/inline-mask-overlay-image-outset-expected.png: Removed. 9 * platform/chromium-linux/fast/borders/inline-mask-overlay-image-outset-vertical-rl-expected.png: 10 * platform/chromium-win/fast/borders/border-image-side-reduction-expected.png: 11 * platform/chromium-win/fast/borders/inline-mask-overlay-image-outset-expected.png: 12 1 13 2012-05-21 Levi Weintraub <leviw@chromium.org> 2 14 -
trunk/Source/WebCore/ChangeLog
r117832 r117855 1 2012-05-21 Emil A Eklund <eae@chromium.org> 2 3 Fix bug in paintNinePieceImage exposed by subpixel change 4 https://bugs.webkit.org/show_bug.cgi?id=87060 5 6 Reviewed by Levi Weintraub. 7 8 Fix rounding in paintNinePieceImage where the left/right images where 9 drawn on subpixel bounds. 10 11 Covered by existing tests. 12 13 * rendering/RenderBoxModelObject.cpp: 14 (WebCore::RenderBoxModelObject::paintNinePieceImage): 15 1 16 2012-05-21 Emil A Eklund <eae@chromium.org> 2 17 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r117482 r117855 1271 1271 ENinePieceImageRule vRule = ninePieceImage.verticalRule(); 1272 1272 1273 LayoutUnit topWidth = computeBorderImageSide(ninePieceImage.borderSlices().top(), style->borderTopWidth(), topSlice, borderImageRect.height(), renderView);1274 LayoutUnit rightWidth = computeBorderImageSide(ninePieceImage.borderSlices().right(), style->borderRightWidth(), rightSlice, borderImageRect.width(), renderView);1275 LayoutUnit bottomWidth = computeBorderImageSide(ninePieceImage.borderSlices().bottom(), style->borderBottomWidth(), bottomSlice, borderImageRect.height(), renderView);1276 LayoutUnit leftWidth = computeBorderImageSide(ninePieceImage.borderSlices().left(), style->borderLeftWidth(), leftSlice, borderImageRect.width(), renderView);1273 int topWidth = computeBorderImageSide(ninePieceImage.borderSlices().top(), style->borderTopWidth(), topSlice, borderImageRect.height(), renderView); 1274 int rightWidth = computeBorderImageSide(ninePieceImage.borderSlices().right(), style->borderRightWidth(), rightSlice, borderImageRect.width(), renderView); 1275 int bottomWidth = computeBorderImageSide(ninePieceImage.borderSlices().bottom(), style->borderBottomWidth(), bottomSlice, borderImageRect.height(), renderView); 1276 int leftWidth = computeBorderImageSide(ninePieceImage.borderSlices().left(), style->borderLeftWidth(), leftSlice, borderImageRect.width(), renderView); 1277 1277 1278 1278 // Reduce the widths if they're too large. … … 1280 1280 // offset for the side, let f = min(Lwidth/(Wleft+Wright), Lheight/(Wtop+Wbottom)). If f < 1, then all W are reduced by 1281 1281 // multiplying them by f. 1282 LayoutUnit borderSideWidth = max<LayoutUnit>(1, leftWidth + rightWidth);1283 LayoutUnit borderSideHeight = max<LayoutUnit>(1, topWidth + bottomWidth);1282 int borderSideWidth = max(1, leftWidth + rightWidth); 1283 int borderSideHeight = max(1, topWidth + bottomWidth); 1284 1284 float borderSideScaleFactor = min((float)borderImageRect.width() / borderSideWidth, (float)borderImageRect.height() / borderSideHeight); 1285 1285 if (borderSideScaleFactor < 1) { … … 1317 1317 // The rect to use from within the image is obtained from our slice, and is (0, 0, leftSlice, topSlice) 1318 1318 if (drawTop) 1319 graphicsContext->drawImage(image.get(), colorSpace, LayoutRect(borderImageRect.location(), LayoutSize(leftWidth, topWidth)),1319 graphicsContext->drawImage(image.get(), colorSpace, IntRect(borderImageRect.location(), IntSize(leftWidth, topWidth)), 1320 1320 LayoutRect(0, 0, leftSlice, topSlice), op); 1321 1321 … … 1323 1323 // The rect to use from within the image is (0, imageHeight - bottomSlice, leftSlice, botomSlice) 1324 1324 if (drawBottom) 1325 graphicsContext->drawImage(image.get(), colorSpace, LayoutRect(borderImageRect.x(), borderImageRect.maxY() - bottomWidth, leftWidth, bottomWidth),1325 graphicsContext->drawImage(image.get(), colorSpace, IntRect(borderImageRect.x(), borderImageRect.maxY() - bottomWidth, leftWidth, bottomWidth), 1326 1326 LayoutRect(0, imageHeight - bottomSlice, leftSlice, bottomSlice), op); 1327 1327 … … 1340 1340 // The rect to use from within the image is obtained from our slice, and is (imageWidth - rightSlice, 0, rightSlice, topSlice) 1341 1341 if (drawTop) 1342 graphicsContext->drawImage(image.get(), colorSpace, LayoutRect(borderImageRect.maxX() - rightWidth, borderImageRect.y(), rightWidth, topWidth),1342 graphicsContext->drawImage(image.get(), colorSpace, IntRect(borderImageRect.maxX() - rightWidth, borderImageRect.y(), rightWidth, topWidth), 1343 1343 LayoutRect(imageWidth - rightSlice, 0, rightSlice, topSlice), op); 1344 1344 … … 1346 1346 // The rect to use from within the image is (imageWidth - rightSlice, imageHeight - bottomSlice, rightSlice, bottomSlice) 1347 1347 if (drawBottom) 1348 graphicsContext->drawImage(image.get(), colorSpace, LayoutRect(borderImageRect.maxX() - rightWidth, borderImageRect.maxY() - bottomWidth, rightWidth, bottomWidth),1348 graphicsContext->drawImage(image.get(), colorSpace, IntRect(borderImageRect.maxX() - rightWidth, borderImageRect.maxY() - bottomWidth, rightWidth, bottomWidth), 1349 1349 LayoutRect(imageWidth - rightSlice, imageHeight - bottomSlice, rightSlice, bottomSlice), op); 1350 1350
Note: See TracChangeset
for help on using the changeset viewer.