diff options
author | Ms2ger <Ms2ger@gmail.com> | 2017-01-27 12:33:20 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-01-30 12:43:49 +0100 |
commit | 69e31730479fbe9afda715f2c146b44562143316 (patch) | |
tree | c0a74918b2598351394301a498afd670fc198eec /components/script/script_thread.rs | |
parent | c853337d644757c4b09d18dd7c0b2f90ea0de442 (diff) | |
download | servo-69e31730479fbe9afda715f2c146b44562143316.tar.gz servo-69e31730479fbe9afda715f2c146b44562143316.zip |
Always set the Document::contentType attribute in ScriptThread::load().
There's no good reason to limit this to a few particular content types.
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 7af80f5f7fc..ae9db34c134 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -1718,15 +1718,9 @@ impl ScriptThread { headers.get().map(|&LastModified(HttpDate(ref tm))| dom_last_modified(tm)) }); - let content_type = metadata.content_type.as_ref().and_then(|&Serde(ContentType(ref mimetype))| { - match *mimetype { - Mime(TopLevel::Application, SubLevel::Xml, _) | - Mime(TopLevel::Application, SubLevel::Ext(_), _) | - Mime(TopLevel::Text, SubLevel::Xml, _) | - Mime(TopLevel::Text, SubLevel::Plain, _) => Some(DOMString::from(mimetype.to_string())), - _ => None, - } - }); + let content_type = metadata.content_type + .as_ref() + .map(|&Serde(ContentType(ref mimetype))| DOMString::from(mimetype.to_string())); let loader = DocumentLoader::new_with_threads(self.resource_threads.clone(), Some(final_url.clone())); |