[Webkit-unassigned] [Bug 160804] New: ctx.drawImage fails silently if arguments are non-integers
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 12 08:49:46 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=160804
Bug ID: 160804
Summary: ctx.drawImage fails silently if arguments are
non-integers
Classification: Unclassified
Product: WebKit
Version: Safari Technology Preview
Hardware: Macintosh
OS: OS X 10.11
Status: NEW
Severity: Major
Priority: P2
Component: Canvas
Assignee: webkit-unassigned at lists.webkit.org
Reporter: richard.a.harris at gmail.com
CC: dino at apple.com
Overview:
Using ctx.drawImage(image, sx, sy, swidth, sheight, dx, dy, dwidth, dheight), where ctx is a CanvasRenderingContext2D, fails if any of sx, sy, swidth or sheight are non-integers. No error is given.
Steps to Reproduce:
Create an HTML page with the following code, and open it in Safari or Safari Technology Preview:
<canvas id='target' width='100' height='100'/>
<script>
image = new Image();
image.onload = function () {
// Changing 0.1 to 0 will cause the image to appear
target.getContext( '2d' ).drawImage( image, 0.1, 0, 100, 100, 0, 0, 100, 100 );
};
image.src = 'http://placehold.it/100x100';
</script>
Actual Results:
The canvas remains blank.
Expected Results:
The image is drawn to the canvas (albeit possibly with some sampling artifacts).
Build Date & Platform: Date and platform of the build in which you first encountered the bug.
Safari Version 9.1.2 (11601.7.7) on Mac OS 10.
Additional Information:
This works as expected in all other browsers. The dx, dy, dwidth and dheight arguments work whether or not they are integers.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160812/86f22ef9/attachment.html>
More information about the webkit-unassigned
mailing list