mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +01:00
Remove IndexSizeError in CanvasRenderingContext2D::drawImage
This commit is contained in:
parent
33c6abb1a8
commit
49820a6797
3 changed files with 2 additions and 13 deletions
|
@ -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;
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
[2d.voidreturn.html]
|
|
||||||
type: testharness
|
|
||||||
bug: https://github.com/servo/servo/issues/10600
|
|
||||||
[void methods return undefined]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[2d.drawImage.zerosource.html]
|
|
||||||
type: testharness
|
|
||||||
[drawImage with zero-sized source rectangle draws nothing without exception]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue