diff options
Diffstat (limited to 'components/script/dom/htmlformelement.rs')
-rw-r--r-- | components/script/dom/htmlformelement.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index 515d49c0f7c..90baba4ebb1 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -51,10 +51,10 @@ use std::cell::Cell; use std::sync::mpsc::Sender; use string_cache::Atom; use style::attr::AttrValue; +use style::str::split_html_space_chars; use task_source::TaskSource; use task_source::dom_manipulation::DOMManipulationTask; use url::form_urlencoded; -use util::str::split_html_space_chars; #[derive(JSTraceable, PartialEq, Clone, Copy, HeapSizeOf)] pub struct GenerationId(u32); @@ -324,9 +324,9 @@ impl HTMLFormElement { content_disposition, content_type)); - let slice = f.upcast::<Blob>().get_slice_or_empty(); + let bytes = &f.upcast::<Blob>().get_bytes().unwrap_or(vec![])[..]; - let decoded = encoding.decode(&slice.get_bytes(), DecoderTrap::Replace) + let decoded = encoding.decode(bytes, DecoderTrap::Replace) .expect("Invalid encoding in file"); result.push_str(&decoded); } @@ -484,8 +484,7 @@ impl HTMLFormElement { }; // Step 3 - window.dom_manipulation_task_source().queue( - DOMManipulationTask::PlannedNavigation(nav)).unwrap(); + window.dom_manipulation_task_source().queue(DOMManipulationTask::Runnable(nav)).unwrap(); } /// Interactively validate the constraints of form elements |