aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlscriptelement.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-11-01 23:45:06 +0100
committerSimon Sapin <simon.sapin@exyr.org>2018-11-06 15:26:02 +0100
commit45f7199eee82c66637ec68287eafa40a651001c4 (patch)
tree8c0802f4ac7b89c2ce4d73063c8f65b9ee5face9 /components/script/dom/htmlscriptelement.rs
parent86f148fb97601413c0d983f21b760d973ade7a75 (diff)
downloadservo-45f7199eee82c66637ec68287eafa40a651001c4.tar.gz
servo-45f7199eee82c66637ec68287eafa40a651001c4.zip
`cargo fix --edition`
Diffstat (limited to 'components/script/dom/htmlscriptelement.rs')
-rw-r--r--components/script/dom/htmlscriptelement.rs54
1 files changed, 27 insertions, 27 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs
index d78a04e93e0..10ecc1786c0 100644
--- a/components/script/dom/htmlscriptelement.rs
+++ b/components/script/dom/htmlscriptelement.rs
@@ -2,26 +2,26 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use document_loader::LoadType;
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
-use dom::bindings::codegen::Bindings::HTMLScriptElementBinding;
-use dom::bindings::codegen::Bindings::HTMLScriptElementBinding::HTMLScriptElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element, ElementCreator};
-use dom::element::{cors_setting_for_element, reflect_cross_origin_attribute, set_cross_origin_attribute};
-use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
-use dom::globalscope::GlobalScope;
-use dom::htmlelement::HTMLElement;
-use dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
-use dom::node::{document_from_node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::document_loader::LoadType;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLScriptElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLScriptElementBinding::HTMLScriptElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element, ElementCreator};
+use crate::dom::element::{cors_setting_for_element, reflect_cross_origin_attribute, set_cross_origin_attribute};
+use crate::dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
+use crate::dom::node::{document_from_node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use encoding_rs::Encoding;
use html5ever::{LocalName, Prefix};
@@ -30,7 +30,7 @@ use ipc_channel::router::ROUTER;
use js::jsval::UndefinedValue;
use net_traits::{FetchMetadata, FetchResponseListener, Metadata, NetworkError};
use net_traits::request::{CorsSettings, CredentialsMode, Destination, RequestInit, RequestMode};
-use network_listener::{NetworkListener, PreInvoke};
+use crate::network_listener::{NetworkListener, PreInvoke};
use servo_atoms::Atom;
use servo_config::opts;
use servo_url::ServoUrl;
@@ -41,7 +41,7 @@ use std::path::PathBuf;
use std::process::{Command, Stdio};
use std::sync::{Arc, Mutex};
use style::str::{HTML_SPACE_CHARACTERS, StaticStringVec};
-use task_source::TaskSourceName;
+use crate::task_source::TaskSourceName;
use uuid::Uuid;
#[dom_struct]
@@ -320,9 +320,9 @@ impl HTMLScriptElement {
// Step 3.
let element = self.upcast::<Element>();
- let async = element.has_attribute(&local_name!("async"));
+ let r#async = element.has_attribute(&local_name!("async"));
// Note: confusingly, this is done if the element does *not* have an "async" attribute.
- if was_parser_inserted && !async {
+ if was_parser_inserted && !r#async {
self.non_blocking.set(true);
}
@@ -438,13 +438,13 @@ impl HTMLScriptElement {
// Preparation for step 23.
let kind =
- if element.has_attribute(&local_name!("defer")) && was_parser_inserted && !async {
+ if element.has_attribute(&local_name!("defer")) && was_parser_inserted && !r#async {
// Step 23.a: classic, has src, has defer, was parser-inserted, is not async.
ExternalScriptKind::Deferred
- } else if was_parser_inserted && !async {
+ } else if was_parser_inserted && !r#async {
// Step 23.c: classic, has src, was parser-inserted, is not async.
ExternalScriptKind::ParsingBlocking
- } else if !async && !self.non_blocking.get() {
+ } else if !r#async && !self.non_blocking.get() {
// Step 23.d: classic, has src, is not async, is not non-blocking.
ExternalScriptKind::AsapInOrder
} else {