diff options
author | CYBAI <cyb.ai.815@gmail.com> | 2018-03-20 22:24:37 +0800 |
---|---|---|
committer | CYBAI <cyb.ai.815@gmail.com> | 2018-03-20 22:24:52 +0800 |
commit | aad6efa8f3e9d79bc8a1a2c23f831de509192ca5 (patch) | |
tree | 65eb149be97104cceb656bc8b6726e83503b8506 | |
parent | 65da9b5acbd788517e39cd70ad69fdf0acd245b3 (diff) | |
download | servo-aad6efa8f3e9d79bc8a1a2c23f831de509192ca5.tar.gz servo-aad6efa8f3e9d79bc8a1a2c23f831de509192ca5.zip |
Update steps with new spec
-rw-r--r-- | components/script/dom/document.rs | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 01b234e5cc0..6895a71fddb 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -3709,7 +3709,7 @@ impl DocumentMethods for Document { // Step 6. // TODO: ignore-opens-during-unload counter check. - // Step 8. + // Step 7, 8. // TODO: check session history's state. let replace = replace.eq_ignore_ascii_case("replace"); @@ -3738,11 +3738,11 @@ impl DocumentMethods for Document { // Step 15. Node::replace_all(None, self.upcast::<Node>()); - // Steps 16-18. + // Steps 16, 17. // Let's not? // TODO: https://github.com/whatwg/html/issues/1698 - // Step 19. + // Step 18. self.implementation.set(None); self.images.set(None); self.embeds.set(None); @@ -3758,55 +3758,59 @@ impl DocumentMethods for Document { self.target_element.set(None); *self.last_click_info.borrow_mut() = None; + // Step 19. + // TODO: Set the active document of document's browsing context to document with window. + // Step 20. - self.set_encoding(UTF_8); + // TODO: Replace document's singleton objects with new instances of those objects, created in window's Realm. // Step 21. - // TODO: reload override buffer. + self.set_encoding(UTF_8); // Step 22. + // TODO: reload override buffer. + + // Step 23. // TODO: salvageable flag. let url = entry_responsible_document.url(); - // Step 23. + // Step 24. self.set_url(url.clone()); - // Step 24. + // Step 25. // TODO: mute iframe load. - // Step 25. + // Step 26. let resource_threads = self.window.upcast::<GlobalScope>().resource_threads().clone(); *self.loader.borrow_mut() = DocumentLoader::new_with_threads(resource_threads, Some(url.clone())); ServoParser::parse_html_script_input(self, url, "text/html"); - // Step 26. + // Step 27. self.ready_state.set(DocumentReadyState::Interactive); - // Step 28 is handled when creating the parser in step 25. + // Step 28. + // TODO: remove history traversal tasks. // Step 29. // TODO: truncate session history. // Step 30. - // TODO: remove history traversal tasks. - - // Step 31. // TODO: remove earlier entries. if !replace { - // Step 32. + // Step 31. // TODO: add history entry. } - // Step 33. + // Step 32. // TODO: clear fired unload flag. - // Step 34 is handled when creating the parser in step 25. + // Step 33 is handled when creating the parser in step 26. - // Step 35. + // Step 34. Ok(DomRoot::from_ref(self)) } |