aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorJames Graham <james@hoppipolla.co.uk>2015-09-17 00:49:05 +0100
committerJames Graham <james@hoppipolla.co.uk>2015-09-25 00:58:48 +0100
commit79e548905e3c5c9891eef2fcbf20203c56f952ee (patch)
tree1ed4e133772e6b7b6f060ae7204ae64c76dd14f3 /components/script/dom/htmliframeelement.rs
parentd811f2d1baac6dcb501f3588eb509086bd1b2a66 (diff)
downloadservo-79e548905e3c5c9891eef2fcbf20203c56f952ee.tar.gz
servo-79e548905e3c5c9891eef2fcbf20203c56f952ee.zip
Enable resetable and String prefs.
This allows both boolean and string-type preferences. It also implements a system where prefs that are read from a configuration file can be reset back to their initial value, which is useful in a number of cases e.g. when running tests to ensure that each test starts with the same values for the prefs.
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index a5d2941e2ce..8e0016f4bb0 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -40,7 +40,7 @@ use util::str::DOMString;
use util::str::{self, LengthOrPercentageOrAuto};
pub fn mozbrowser_enabled() -> bool {
- prefs::get_pref("dom.mozbrowser.enabled").unwrap_or(false)
+ prefs::get_pref("dom.mozbrowser.enabled").as_boolean().unwrap_or(false)
}
#[derive(HeapSizeOf)]