mirror of
https://github.com/servo/servo.git
synced 2025-06-18 22:34:30 +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);
|
||||
|
||||
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;
|
||||
|
@ -407,7 +407,7 @@ impl CanvasRenderingContext2D {
|
|||
dh);
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue