Remove IndexSizeError in CanvasRenderingContext2D::drawImage

This commit is contained in:
n0max 2017-04-29 18:06:54 +02:00
parent 33c6abb1a8
commit 49820a6797
3 changed files with 2 additions and 13 deletions

View file

@ -350,7 +350,7 @@ impl CanvasRenderingContext2D {
dh); dh);
if !is_rect_valid(source_rect) || !is_rect_valid(dest_rect) { if !is_rect_valid(source_rect) || !is_rect_valid(dest_rect) {
return Err(Error::IndexSize); return Ok(());
} }
let smoothing_enabled = self.state.borrow().image_smoothing_enabled; let smoothing_enabled = self.state.borrow().image_smoothing_enabled;
@ -407,7 +407,7 @@ impl CanvasRenderingContext2D {
dh); dh);
if !is_rect_valid(source_rect) || !is_rect_valid(dest_rect) { if !is_rect_valid(source_rect) || !is_rect_valid(dest_rect) {
return Err(Error::IndexSize); return Ok(());
} }
let smoothing_enabled = self.state.borrow().image_smoothing_enabled; let smoothing_enabled = self.state.borrow().image_smoothing_enabled;

View file

@ -1,6 +0,0 @@
[2d.voidreturn.html]
type: testharness
bug: https://github.com/servo/servo/issues/10600
[void methods return undefined]
expected: FAIL

View file

@ -1,5 +0,0 @@
[2d.drawImage.zerosource.html]
type: testharness
[drawImage with zero-sized source rectangle draws nothing without exception]
expected: FAIL