diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-01-27 08:57:38 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-27 08:57:38 -0800 |
commit | a1187c12ee4156a6e633f19dae5f48faa34cd2e7 (patch) | |
tree | 61df3cf7c25c08d05ff6c5cac542de724b70779c /components/script | |
parent | 556a46f537009bfc0c5cffadcd1a640c2b0c3029 (diff) | |
parent | d966f1fae2559873515d4faced02d7c2a7921621 (diff) | |
download | servo-a1187c12ee4156a6e633f19dae5f48faa34cd2e7.tar.gz servo-a1187c12ee4156a6e633f19dae5f48faa34cd2e7.zip |
Auto merge of #15262 - alon:master, r=Ms2ger
dom/document: scripting_enabled can be a bool. #15260
Fix #15260 - scripting_enabled can be a bool
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #15260
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because - there were no tests previously (not a real good excuse :)
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15262)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/document.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 692c24f052a..53aa4af882d 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -232,7 +232,7 @@ pub struct Document { asap_scripts_set: DOMRefCell<Vec<JS<HTMLScriptElement>>>, /// https://html.spec.whatwg.org/multipage/#concept-n-noscript /// True if scripting is enabled for all scripts in this document - scripting_enabled: Cell<bool>, + scripting_enabled: bool, /// https://html.spec.whatwg.org/multipage/#animation-frame-callback-identifier /// Current identifier of animation frame callback animation_frame_ident: Cell<u32>, @@ -684,7 +684,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. @@ -1952,7 +1952,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), |