From d966f1fae2559873515d4faced02d7c2a7921621 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Fri, 27 Jan 2017 10:26:37 +0200 Subject: [PATCH] dom/document: scripting_enabled can be a bool. #15260 --- components/script/dom/document.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 6bf8c841d4d..5fda27953b3 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -232,7 +232,7 @@ pub struct Document { asap_scripts_set: DOMRefCell>>, /// https://html.spec.whatwg.org/multipage/#concept-n-noscript /// True if scripting is enabled for all scripts in this document - scripting_enabled: Cell, + scripting_enabled: bool, /// https://html.spec.whatwg.org/multipage/#animation-frame-callback-identifier /// Current identifier of animation frame callback animation_frame_ident: Cell, @@ -689,7 +689,7 @@ impl Document { /// Return whether scripting is enabled or not pub fn is_scripting_enabled(&self) -> bool { - self.scripting_enabled.get() + self.scripting_enabled } /// Return the element that currently has focus. @@ -1948,7 +1948,7 @@ impl Document { deferred_scripts: Default::default(), asap_in_order_scripts_list: Default::default(), asap_scripts_set: Default::default(), - scripting_enabled: Cell::new(browsing_context.is_some()), + scripting_enabled: browsing_context.is_some(), animation_frame_ident: Cell::new(0), animation_frame_list: DOMRefCell::new(vec![]), running_animation_callbacks: Cell::new(false),