diff options
author | Pyfisch <pyfisch@gmail.com> | 2018-11-06 13:01:35 +0100 |
---|---|---|
committer | Pyfisch <pyfisch@gmail.com> | 2018-11-06 22:30:31 +0100 |
commit | cb07debcb6f3d3561177ce536c320986720791b7 (patch) | |
tree | ccac4d5a48b3112230f3fc2e873753dd7263e9fb /components/script/dom/htmlscriptelement.rs | |
parent | bf47f90da667e95eaffc8fee36ca8a88e72e276c (diff) | |
download | servo-cb07debcb6f3d3561177ce536c320986720791b7.tar.gz servo-cb07debcb6f3d3561177ce536c320986720791b7.zip |
Format remaining files
Diffstat (limited to 'components/script/dom/htmlscriptelement.rs')
-rw-r--r-- | components/script/dom/htmlscriptelement.rs | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index 2b941b909dc..dca27b6b7cd 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -184,7 +184,8 @@ impl FetchResponseListener for ScriptContext { .and_then(|m| match m.status { Some((c, _)) => Some(c), _ => None, - }).unwrap_or(0); + }) + .unwrap_or(0); self.status = match status_code { 0 => Err(NetworkError::Internal( @@ -437,20 +438,22 @@ impl HTMLScriptElement { }; // Preparation for step 23. - let kind = - 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 && !r#async { - // Step 23.c: classic, has src, was parser-inserted, is not async. - ExternalScriptKind::ParsingBlocking - } else if !r#async && !self.non_blocking.get() { - // Step 23.d: classic, has src, is not async, is not non-blocking. - ExternalScriptKind::AsapInOrder - } else { - // Step 23.f: classic, has src. - ExternalScriptKind::Asap - }; + let kind = 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 && !r#async { + // Step 23.c: classic, has src, was parser-inserted, is not async. + ExternalScriptKind::ParsingBlocking + } else if !r#async && !self.non_blocking.get() { + // Step 23.d: classic, has src, is not async, is not non-blocking. + ExternalScriptKind::AsapInOrder + } else { + // Step 23.f: classic, has src. + ExternalScriptKind::Asap + }; // Step 21.6. fetch_a_classic_script( |