mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Don't crash when Firefox doesn't send autoMargins.
This commit is contained in:
parent
9af229b830
commit
602c8bb415
1 changed files with 2 additions and 1 deletions
|
@ -459,7 +459,8 @@ impl Actor for PageStyleActor {
|
|||
.unwrap();
|
||||
let (width, height) = rx.recv().unwrap();
|
||||
|
||||
let auto_margins = msg.get(&"autoMargins".to_string()).unwrap().as_boolean().unwrap();
|
||||
let auto_margins = msg.get(&"autoMargins".to_string())
|
||||
.and_then(&Json::as_boolean).unwrap_or(false);
|
||||
|
||||
//TODO: the remaining layout properties (margin, border, padding, position)
|
||||
// as specified in getLayout in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue