mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Handle failure to parse the value of the width and height attributes on canvas elements (fixes #3200).
The remaining failures are due to the tests's use of getComputedStyle.
This commit is contained in:
parent
e1b5b5183f
commit
2d50e33902
23 changed files with 44 additions and 40 deletions
|
@ -133,11 +133,11 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLCanvasElement> {
|
|||
|
||||
let recreate = match name.as_slice() {
|
||||
"width" => {
|
||||
self.width.set(parse_unsigned_integer(value.as_slice().chars()).unwrap());
|
||||
self.width.set(parse_unsigned_integer(value.as_slice().chars()).unwrap_or(DefaultWidth));
|
||||
true
|
||||
}
|
||||
"height" => {
|
||||
self.height.set(parse_unsigned_integer(value.as_slice().chars()).unwrap());
|
||||
self.height.set(parse_unsigned_integer(value.as_slice().chars()).unwrap_or(DefaultHeight));
|
||||
true
|
||||
}
|
||||
_ => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue