Changeset 202712 in webkit
- Timestamp:
- Jun 30, 2016 3:18:12 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 8 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202694 r202712 1 2016-06-30 Antoine Quint <graouts@apple.com> 2 3 Drawing an SVG image into a <canvas> that is not in the DOM draws the wrong region 4 https://bugs.webkit.org/show_bug.cgi?id=159276 5 6 Reviewed by Dean Jackson. 7 8 Adding a series of new tests to check we correctly respect mismatching source and 9 destination rectangles with SVG images as sources, both with the source <img> element 10 being present and absent from the DOM, and explicit sizes being set or not set. 11 12 * svg/as-image/img-with-svg-resource-in-dom-and-drawImage-expected.html: Added. 13 * svg/as-image/img-with-svg-resource-in-dom-and-drawImage.html: Added. 14 * svg/as-image/img-with-svg-resource-in-dom-no-size-and-drawImage-expected.html: Added. 15 * svg/as-image/img-with-svg-resource-in-dom-no-size-and-drawImage.html: Added. 16 * svg/as-image/img-with-svg-resource-not-in-dom-and-drawImage-expected.html: Added. 17 * svg/as-image/img-with-svg-resource-not-in-dom-and-drawImage.html: Added. 18 * svg/as-image/img-with-svg-resource-not-in-dom-no-size-and-drawImage-expected.html: Added. 19 * svg/as-image/img-with-svg-resource-not-in-dom-no-size-and-drawImage.html: Added. 20 1 21 2016-06-30 Antoine Quint <graouts@apple.com> 2 22 -
trunk/Source/WebCore/ChangeLog
r202704 r202712 1 2016-06-30 Antoine Quint <graouts@apple.com> 2 3 Drawing an SVG image into a <canvas> that is not in the DOM draws the wrong region 4 https://bugs.webkit.org/show_bug.cgi?id=159276 5 6 Reviewed by Dean Jackson. 7 8 In the event where the <img> element that we are passing to CanvasRenderingContext2D.drawImage() 9 points to an SVG resource, we ensure that the container for the SVG image is sized to match the 10 HTML element. The necessity for setting this container size, explained in webkit.org/b/148845, 11 is that we must ensure a cached image does not have an outdated container size. 12 13 Tests: svg/as-image/img-with-svg-resource-in-dom-and-drawImage.html 14 svg/as-image/img-with-svg-resource-in-dom-no-size-and-drawImage.html 15 svg/as-image/img-with-svg-resource-not-in-dom-and-drawImage.html 16 svg/as-image/img-with-svg-resource-not-in-dom-no-size-and-drawImage.html 17 18 * html/canvas/CanvasRenderingContext2D.cpp: 19 (WebCore::CanvasRenderingContext2D::drawImage): 20 1 21 2016-06-30 Eric Carlson <eric.carlson@apple.com> 2 22 -
trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
r202102 r202712 1399 1399 if (image->isSVGImage()) { 1400 1400 image->setImageObserver(nullptr); 1401 image->setContainerSize( normalizedSrcRect.size());1401 image->setContainerSize(imageRect.size()); 1402 1402 } 1403 1403
Note: See TracChangeset
for help on using the changeset viewer.