Skip to content

Commit

Permalink
Auto merge of #15262 - alon:master, r=Ms2ger
Browse files Browse the repository at this point in the history
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 -->
  • Loading branch information
bors-servo committed Jan 27, 2017
2 parents 556a46f + d966f1f commit a1187c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/script/dom/document.rs
Expand Up @@ -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>,
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit a1187c1

Please sign in to comment.