Update prefs API to return an Option<bool>.

This allows for situations where there is no reasonable default
to apply for the pref value e.g. when we are just listing values
This commit is contained in:
James Graham 2015-09-04 15:21:35 +01:00
parent cc1eb3f741
commit a208379f46
7 changed files with 12 additions and 12 deletions

View file

@ -429,7 +429,7 @@ impl<'a, 'b> AtRuleParser for NestedRuleParser<'a, 'b> {
Ok(AtRuleType::WithBlock(AtRulePrelude::FontFace))
},
"viewport" => {
if ::util::prefs::get_pref("layout.viewport.enabled", false) {
if ::util::prefs::get_pref("layout.viewport.enabled").unwrap_or(false) {
Ok(AtRuleType::WithBlock(AtRulePrelude::Viewport))
} else {
Err(())