mirror of
https://github.com/servo/servo.git
synced 2025-07-08 16:03:40 +01:00
Implement document.open and document.close (fixes #14591)
This commit is contained in:
parent
8c3abd6c79
commit
ac254046e4
52 changed files with 351 additions and 296 deletions
|
@ -170,11 +170,16 @@ impl DOMString {
|
||||||
self.0.push_str(string)
|
self.0.push_str(string)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Truncates this `DOMString`, removing all contents.
|
/// Clears this `DOMString`, removing all contents.
|
||||||
pub fn clear(&mut self) {
|
pub fn clear(&mut self) {
|
||||||
self.0.clear()
|
self.0.clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Shortens this String to the specified length.
|
||||||
|
pub fn truncate(&mut self, new_len: usize) {
|
||||||
|
self.0.truncate(new_len);
|
||||||
|
}
|
||||||
|
|
||||||
/// An iterator over the bytes of this `DOMString`.
|
/// An iterator over the bytes of this `DOMString`.
|
||||||
pub fn bytes(&self) -> Bytes {
|
pub fn bytes(&self) -> Bytes {
|
||||||
self.0.bytes()
|
self.0.bytes()
|
||||||
|
|
|
@ -16,6 +16,7 @@ use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, Documen
|
||||||
use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
|
use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
|
||||||
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
|
||||||
use dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull;
|
use dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull;
|
||||||
|
use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementBinding::HTMLIFrameElementMethods;
|
||||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||||
use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter;
|
use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter;
|
||||||
use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceMethods;
|
use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceMethods;
|
||||||
|
@ -131,7 +132,7 @@ use style::attr::AttrValue;
|
||||||
use style::context::{QuirksMode, ReflowGoal};
|
use style::context::{QuirksMode, ReflowGoal};
|
||||||
use style::restyle_hints::{RestyleHint, RESTYLE_STYLE_ATTRIBUTE};
|
use style::restyle_hints::{RestyleHint, RESTYLE_STYLE_ATTRIBUTE};
|
||||||
use style::selector_parser::{RestyleDamage, Snapshot};
|
use style::selector_parser::{RestyleDamage, Snapshot};
|
||||||
use style::str::{split_html_space_chars, str_join};
|
use style::str::{HTML_SPACE_CHARACTERS, split_html_space_chars, str_join};
|
||||||
use style::stylesheets::Stylesheet;
|
use style::stylesheets::Stylesheet;
|
||||||
use task_source::TaskSource;
|
use task_source::TaskSource;
|
||||||
use time;
|
use time;
|
||||||
|
@ -1756,6 +1757,37 @@ impl Document {
|
||||||
// TODO: client message queue.
|
// TODO: client message queue.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#abort-a-document
|
||||||
|
fn abort(&self) {
|
||||||
|
// We need to inhibit the loader before anything else.
|
||||||
|
self.loader.borrow_mut().inhibit_events();
|
||||||
|
|
||||||
|
// Step 1.
|
||||||
|
for iframe in self.iter_iframes() {
|
||||||
|
if let Some(document) = iframe.GetContentDocument() {
|
||||||
|
// TODO: abort the active documents of every child browsing context.
|
||||||
|
document.abort();
|
||||||
|
// TODO: salvageable flag.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 2.
|
||||||
|
self.script_blocking_stylesheets_count.set(0);
|
||||||
|
*self.pending_parsing_blocking_script.borrow_mut() = None;
|
||||||
|
*self.asap_scripts_set.borrow_mut() = vec![];
|
||||||
|
self.asap_in_order_scripts_list.clear();
|
||||||
|
self.deferred_scripts.clear();
|
||||||
|
|
||||||
|
// TODO: https://github.com/servo/servo/issues/15236
|
||||||
|
self.window.cancel_all_tasks();
|
||||||
|
|
||||||
|
// Step 3.
|
||||||
|
if let Some(parser) = self.get_current_parser() {
|
||||||
|
parser.abort();
|
||||||
|
// TODO: salvageable flag.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn notify_constellation_load(&self) {
|
pub fn notify_constellation_load(&self) {
|
||||||
let global_scope = self.window.upcast::<GlobalScope>();
|
let global_scope = self.window.upcast::<GlobalScope>();
|
||||||
let pipeline_id = global_scope.pipeline_id();
|
let pipeline_id = global_scope.pipeline_id();
|
||||||
|
@ -3280,6 +3312,149 @@ impl DocumentMethods for Document {
|
||||||
elements
|
elements
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#dom-document-open
|
||||||
|
fn Open(&self, type_: DOMString, replace: DOMString) -> Fallible<Root<Document>> {
|
||||||
|
if !self.is_html_document() {
|
||||||
|
// Step 1.
|
||||||
|
return Err(Error::InvalidState);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 2.
|
||||||
|
// TODO: handle throw-on-dynamic-markup-insertion counter.
|
||||||
|
|
||||||
|
if !self.is_active() {
|
||||||
|
// Step 3.
|
||||||
|
return Ok(Root::from_ref(self));
|
||||||
|
}
|
||||||
|
|
||||||
|
let entry_responsible_document = GlobalScope::entry().as_window().Document();
|
||||||
|
|
||||||
|
if !self.origin.same_origin(&entry_responsible_document.origin) {
|
||||||
|
// Step 4.
|
||||||
|
return Err(Error::Security);
|
||||||
|
}
|
||||||
|
|
||||||
|
if self.get_current_parser().map_or(false, |parser| parser.script_nesting_level() > 0) {
|
||||||
|
// Step 5.
|
||||||
|
return Ok(Root::from_ref(self));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 6.
|
||||||
|
// TODO: ignore-opens-during-unload counter check.
|
||||||
|
|
||||||
|
// Step 7: first argument already bound to `type_`.
|
||||||
|
|
||||||
|
// Step 8.
|
||||||
|
// TODO: check session history's state.
|
||||||
|
let replace = replace.eq_ignore_ascii_case("replace");
|
||||||
|
|
||||||
|
// Step 9.
|
||||||
|
// TODO: salvageable flag.
|
||||||
|
|
||||||
|
// Step 10.
|
||||||
|
// TODO: prompt to unload.
|
||||||
|
|
||||||
|
// Step 11.
|
||||||
|
// TODO: unload.
|
||||||
|
|
||||||
|
// Step 12.
|
||||||
|
self.abort();
|
||||||
|
|
||||||
|
// Step 13.
|
||||||
|
for node in self.upcast::<Node>().traverse_preorder() {
|
||||||
|
node.upcast::<EventTarget>().remove_all_listeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 14.
|
||||||
|
// TODO: remove any tasks associated with the Document in any task source.
|
||||||
|
|
||||||
|
// Step 15.
|
||||||
|
Node::replace_all(None, self.upcast::<Node>());
|
||||||
|
|
||||||
|
// Steps 16-18.
|
||||||
|
// Let's not?
|
||||||
|
// TODO: https://github.com/whatwg/html/issues/1698
|
||||||
|
|
||||||
|
// Step 19.
|
||||||
|
self.implementation.set(None);
|
||||||
|
self.location.set(None);
|
||||||
|
self.images.set(None);
|
||||||
|
self.embeds.set(None);
|
||||||
|
self.links.set(None);
|
||||||
|
self.forms.set(None);
|
||||||
|
self.scripts.set(None);
|
||||||
|
self.anchors.set(None);
|
||||||
|
self.applets.set(None);
|
||||||
|
*self.stylesheets.borrow_mut() = None;
|
||||||
|
self.stylesheets_changed_since_reflow.set(true);
|
||||||
|
self.animation_frame_ident.set(0);
|
||||||
|
self.animation_frame_list.borrow_mut().clear();
|
||||||
|
self.pending_restyles.borrow_mut().clear();
|
||||||
|
self.target_element.set(None);
|
||||||
|
*self.last_click_info.borrow_mut() = None;
|
||||||
|
|
||||||
|
// Step 20.
|
||||||
|
self.set_encoding(UTF_8);
|
||||||
|
|
||||||
|
// Step 21.
|
||||||
|
// TODO: reload override buffer.
|
||||||
|
|
||||||
|
// Step 22.
|
||||||
|
// TODO: salvageable flag.
|
||||||
|
|
||||||
|
let url = entry_responsible_document.url();
|
||||||
|
|
||||||
|
// Step 23.
|
||||||
|
self.set_url(url.clone());
|
||||||
|
|
||||||
|
// Step 24.
|
||||||
|
// TODO: mute iframe load.
|
||||||
|
|
||||||
|
// Step 27.
|
||||||
|
let type_ = if type_.eq_ignore_ascii_case("replace") {
|
||||||
|
"text/html"
|
||||||
|
} else if let Some(position) = type_.find(';') {
|
||||||
|
&type_[0..position]
|
||||||
|
} else {
|
||||||
|
&*type_
|
||||||
|
};
|
||||||
|
let type_ = type_.trim_matches(HTML_SPACE_CHARACTERS);
|
||||||
|
|
||||||
|
// Step 25.
|
||||||
|
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, type_);
|
||||||
|
|
||||||
|
// Step 26.
|
||||||
|
self.ready_state.set(DocumentReadyState::Interactive);
|
||||||
|
|
||||||
|
// Step 28 is handled when creating the parser in step 25.
|
||||||
|
|
||||||
|
// Step 29.
|
||||||
|
// TODO: truncate session history.
|
||||||
|
|
||||||
|
// Step 30.
|
||||||
|
// TODO: remove history traversal tasks.
|
||||||
|
|
||||||
|
// Step 31.
|
||||||
|
// TODO: remove earlier entries.
|
||||||
|
|
||||||
|
if !replace {
|
||||||
|
// Step 32.
|
||||||
|
// TODO: add history entry.
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 33.
|
||||||
|
// TODO: clear fired unload flag.
|
||||||
|
|
||||||
|
// Step 34 is handled when creating the parser in step 25.
|
||||||
|
|
||||||
|
// Step 35.
|
||||||
|
Ok(Root::from_ref(self))
|
||||||
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-document-write
|
// https://html.spec.whatwg.org/multipage/#dom-document-write
|
||||||
fn Write(&self, text: Vec<DOMString>) -> ErrorResult {
|
fn Write(&self, text: Vec<DOMString>) -> ErrorResult {
|
||||||
if !self.is_html_document() {
|
if !self.is_html_document() {
|
||||||
|
@ -3294,9 +3469,8 @@ impl DocumentMethods for Document {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
let parser = self.get_current_parser();
|
let parser = match self.get_current_parser() {
|
||||||
let parser = match parser.as_ref() {
|
Some(ref parser) if parser.can_write() => Root::from_ref(&**parser),
|
||||||
Some(parser) if parser.script_nesting_level() > 0 => parser,
|
|
||||||
_ => {
|
_ => {
|
||||||
// Either there is no parser, which means the parsing ended;
|
// Either there is no parser, which means the parsing ended;
|
||||||
// or script nesting level is 0, which means the method was
|
// or script nesting level is 0, which means the method was
|
||||||
|
@ -3307,8 +3481,8 @@ impl DocumentMethods for Document {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
// Step 5.
|
// Step 5.
|
||||||
// TODO: call document.open().
|
self.Open("text/html".into(), "".into())?;
|
||||||
return Err(Error::InvalidState);
|
self.get_current_parser().unwrap()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3328,6 +3502,30 @@ impl DocumentMethods for Document {
|
||||||
self.Write(text)
|
self.Write(text)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#dom-document-close
|
||||||
|
fn Close(&self) -> ErrorResult {
|
||||||
|
if !self.is_html_document() {
|
||||||
|
// Step 1.
|
||||||
|
return Err(Error::InvalidState);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 2.
|
||||||
|
// TODO: handle throw-on-dynamic-markup-insertion counter.
|
||||||
|
|
||||||
|
let parser = match self.get_current_parser() {
|
||||||
|
Some(ref parser) if parser.is_script_created() => Root::from_ref(&**parser),
|
||||||
|
_ => {
|
||||||
|
// Step 3.
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Step 4-6.
|
||||||
|
parser.close();
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers
|
// https://html.spec.whatwg.org/multipage/#documentandelementeventhandlers
|
||||||
document_and_element_event_handlers!();
|
document_and_element_event_handlers!();
|
||||||
|
|
||||||
|
@ -3496,6 +3694,7 @@ impl PendingInOrderScriptVec {
|
||||||
fn is_empty(&self) -> bool {
|
fn is_empty(&self) -> bool {
|
||||||
self.scripts.borrow().is_empty()
|
self.scripts.borrow().is_empty()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn push(&self, element: &HTMLScriptElement) {
|
fn push(&self, element: &HTMLScriptElement) {
|
||||||
self.scripts.borrow_mut().push_back(PendingScript::new(element));
|
self.scripts.borrow_mut().push_back(PendingScript::new(element));
|
||||||
}
|
}
|
||||||
|
@ -3515,6 +3714,10 @@ impl PendingInOrderScriptVec {
|
||||||
scripts.pop_front();
|
scripts.pop_front();
|
||||||
pair
|
pair
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn clear(&self) {
|
||||||
|
*self.scripts.borrow_mut() = Default::default();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(HeapSizeOf, JSTraceable)]
|
#[derive(HeapSizeOf, JSTraceable)]
|
||||||
|
|
|
@ -306,6 +306,10 @@ impl EventTarget {
|
||||||
event.dispatch(self, None)
|
event.dispatch(self, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn remove_all_listeners(&self) {
|
||||||
|
*self.handlers.borrow_mut() = Default::default();
|
||||||
|
}
|
||||||
|
|
||||||
/// https://html.spec.whatwg.org/multipage/#event-handler-attributes:event-handlers-11
|
/// https://html.spec.whatwg.org/multipage/#event-handler-attributes:event-handlers-11
|
||||||
fn set_inline_event_listener(&self,
|
fn set_inline_event_listener(&self,
|
||||||
ty: Atom,
|
ty: Atom,
|
||||||
|
|
|
@ -38,6 +38,7 @@ use script_thread::ScriptThread;
|
||||||
use script_traits::DocumentActivity;
|
use script_traits::DocumentActivity;
|
||||||
use servo_config::resource_files::read_resource_file;
|
use servo_config::resource_files::read_resource_file;
|
||||||
use servo_url::ServoUrl;
|
use servo_url::ServoUrl;
|
||||||
|
use std::ascii::AsciiExt;
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
|
@ -75,6 +76,10 @@ pub struct ServoParser {
|
||||||
suspended: Cell<bool>,
|
suspended: Cell<bool>,
|
||||||
/// https://html.spec.whatwg.org/multipage/#script-nesting-level
|
/// https://html.spec.whatwg.org/multipage/#script-nesting-level
|
||||||
script_nesting_level: Cell<usize>,
|
script_nesting_level: Cell<usize>,
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#abort-a-parser
|
||||||
|
aborted: Cell<bool>,
|
||||||
|
/// https://html.spec.whatwg.org/multipage/#script-created-parser
|
||||||
|
script_created_parser: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq)]
|
#[derive(PartialEq)]
|
||||||
|
@ -87,7 +92,8 @@ impl ServoParser {
|
||||||
pub fn parse_html_document(document: &Document, input: DOMString, url: ServoUrl) {
|
pub fn parse_html_document(document: &Document, input: DOMString, url: ServoUrl) {
|
||||||
let parser = ServoParser::new(document,
|
let parser = ServoParser::new(document,
|
||||||
Tokenizer::Html(self::html::Tokenizer::new(document, url, None)),
|
Tokenizer::Html(self::html::Tokenizer::new(document, url, None)),
|
||||||
LastChunkState::NotReceived);
|
LastChunkState::NotReceived,
|
||||||
|
ParserKind::Normal);
|
||||||
parser.parse_chunk(String::from(input));
|
parser.parse_chunk(String::from(input));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +135,8 @@ impl ServoParser {
|
||||||
Tokenizer::Html(self::html::Tokenizer::new(&document,
|
Tokenizer::Html(self::html::Tokenizer::new(&document,
|
||||||
url.clone(),
|
url.clone(),
|
||||||
Some(fragment_context))),
|
Some(fragment_context))),
|
||||||
LastChunkState::Received);
|
LastChunkState::Received,
|
||||||
|
ParserKind::Normal);
|
||||||
parser.parse_chunk(String::from(input));
|
parser.parse_chunk(String::from(input));
|
||||||
|
|
||||||
// Step 14.
|
// Step 14.
|
||||||
|
@ -139,10 +146,23 @@ impl ServoParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn parse_html_script_input(document: &Document, url: ServoUrl, type_: &str) {
|
||||||
|
let parser = ServoParser::new(document,
|
||||||
|
Tokenizer::Html(self::html::Tokenizer::new(document, url, None)),
|
||||||
|
LastChunkState::NotReceived,
|
||||||
|
ParserKind::ScriptCreated);
|
||||||
|
document.set_current_parser(Some(&parser));
|
||||||
|
if !type_.eq_ignore_ascii_case("text/html") {
|
||||||
|
parser.parse_chunk("<pre>\n".to_owned());
|
||||||
|
parser.tokenizer.borrow_mut().set_plaintext_state();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn parse_xml_document(document: &Document, input: DOMString, url: ServoUrl) {
|
pub fn parse_xml_document(document: &Document, input: DOMString, url: ServoUrl) {
|
||||||
let parser = ServoParser::new(document,
|
let parser = ServoParser::new(document,
|
||||||
Tokenizer::Xml(self::xml::Tokenizer::new(document, url)),
|
Tokenizer::Xml(self::xml::Tokenizer::new(document, url)),
|
||||||
LastChunkState::NotReceived);
|
LastChunkState::NotReceived,
|
||||||
|
ParserKind::Normal);
|
||||||
parser.parse_chunk(String::from(input));
|
parser.parse_chunk(String::from(input));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,6 +170,10 @@ impl ServoParser {
|
||||||
self.script_nesting_level.get()
|
self.script_nesting_level.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_script_created(&self) -> bool {
|
||||||
|
self.script_created_parser
|
||||||
|
}
|
||||||
|
|
||||||
/// Corresponds to the latter part of the "Otherwise" branch of the 'An end
|
/// Corresponds to the latter part of the "Otherwise" branch of the 'An end
|
||||||
/// tag whose tag name is "script"' of
|
/// tag whose tag name is "script"' of
|
||||||
/// https://html.spec.whatwg.org/multipage/#parsing-main-incdata
|
/// https://html.spec.whatwg.org/multipage/#parsing-main-incdata
|
||||||
|
@ -186,9 +210,13 @@ impl ServoParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn can_write(&self) -> bool {
|
||||||
|
self.script_created_parser || self.script_nesting_level.get() > 0
|
||||||
|
}
|
||||||
|
|
||||||
/// Steps 6-8 of https://html.spec.whatwg.org/multipage/#document.write()
|
/// Steps 6-8 of https://html.spec.whatwg.org/multipage/#document.write()
|
||||||
pub fn write(&self, text: Vec<DOMString>) {
|
pub fn write(&self, text: Vec<DOMString>) {
|
||||||
assert!(self.script_nesting_level.get() > 0);
|
assert!(self.can_write());
|
||||||
|
|
||||||
if self.document.has_pending_parsing_blocking_script() {
|
if self.document.has_pending_parsing_blocking_script() {
|
||||||
// There is already a pending parsing blocking script so the
|
// There is already a pending parsing blocking script so the
|
||||||
|
@ -225,10 +253,47 @@ impl ServoParser {
|
||||||
assert!(input.is_empty());
|
assert!(input.is_empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Steps 4-6 of https://html.spec.whatwg.org/multipage/#dom-document-close
|
||||||
|
pub fn close(&self) {
|
||||||
|
assert!(self.script_created_parser);
|
||||||
|
|
||||||
|
// Step 4.
|
||||||
|
self.last_chunk_received.set(true);
|
||||||
|
|
||||||
|
if self.suspended.get() {
|
||||||
|
// Step 5.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 6.
|
||||||
|
self.parse_sync();
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/#abort-a-parser
|
||||||
|
pub fn abort(&self) {
|
||||||
|
assert!(!self.aborted.get());
|
||||||
|
self.aborted.set(true);
|
||||||
|
|
||||||
|
// Step 1.
|
||||||
|
*self.script_input.borrow_mut() = BufferQueue::new();
|
||||||
|
*self.network_input.borrow_mut() = BufferQueue::new();
|
||||||
|
|
||||||
|
// Step 2.
|
||||||
|
self.document.set_ready_state(DocumentReadyState::Interactive);
|
||||||
|
|
||||||
|
// Step 3.
|
||||||
|
self.tokenizer.borrow_mut().end();
|
||||||
|
self.document.set_current_parser(None);
|
||||||
|
|
||||||
|
// Step 4.
|
||||||
|
self.document.set_ready_state(DocumentReadyState::Interactive);
|
||||||
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
fn new_inherited(document: &Document,
|
fn new_inherited(document: &Document,
|
||||||
tokenizer: Tokenizer,
|
tokenizer: Tokenizer,
|
||||||
last_chunk_state: LastChunkState)
|
last_chunk_state: LastChunkState,
|
||||||
|
kind: ParserKind)
|
||||||
-> Self {
|
-> Self {
|
||||||
ServoParser {
|
ServoParser {
|
||||||
reflector: Reflector::new(),
|
reflector: Reflector::new(),
|
||||||
|
@ -239,15 +304,18 @@ impl ServoParser {
|
||||||
last_chunk_received: Cell::new(last_chunk_state == LastChunkState::Received),
|
last_chunk_received: Cell::new(last_chunk_state == LastChunkState::Received),
|
||||||
suspended: Default::default(),
|
suspended: Default::default(),
|
||||||
script_nesting_level: Default::default(),
|
script_nesting_level: Default::default(),
|
||||||
|
aborted: Default::default(),
|
||||||
|
script_created_parser: kind == ParserKind::ScriptCreated,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
fn new(document: &Document,
|
fn new(document: &Document,
|
||||||
tokenizer: Tokenizer,
|
tokenizer: Tokenizer,
|
||||||
last_chunk_state: LastChunkState)
|
last_chunk_state: LastChunkState,
|
||||||
|
kind: ParserKind)
|
||||||
-> Root<Self> {
|
-> Root<Self> {
|
||||||
reflect_dom_object(box ServoParser::new_inherited(document, tokenizer, last_chunk_state),
|
reflect_dom_object(box ServoParser::new_inherited(document, tokenizer, last_chunk_state, kind),
|
||||||
document.window(),
|
document.window(),
|
||||||
ServoParserBinding::Wrap)
|
ServoParserBinding::Wrap)
|
||||||
}
|
}
|
||||||
|
@ -301,6 +369,7 @@ impl ServoParser {
|
||||||
{
|
{
|
||||||
loop {
|
loop {
|
||||||
assert!(!self.suspended.get());
|
assert!(!self.suspended.get());
|
||||||
|
assert!(!self.aborted.get());
|
||||||
|
|
||||||
self.document.reflow_if_reflow_timer_expired();
|
self.document.reflow_if_reflow_timer_expired();
|
||||||
let script = match feed(&mut *self.tokenizer.borrow_mut()) {
|
let script = match feed(&mut *self.tokenizer.borrow_mut()) {
|
||||||
|
@ -358,6 +427,12 @@ impl Iterator for FragmentParsingResult {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(HeapSizeOf, JSTraceable, PartialEq)]
|
||||||
|
enum ParserKind {
|
||||||
|
Normal,
|
||||||
|
ScriptCreated,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(HeapSizeOf, JSTraceable)]
|
#[derive(HeapSizeOf, JSTraceable)]
|
||||||
#[must_root]
|
#[must_root]
|
||||||
enum Tokenizer {
|
enum Tokenizer {
|
||||||
|
@ -454,6 +529,9 @@ impl FetchResponseListener for ParserContext {
|
||||||
Some(parser) => parser,
|
Some(parser) => parser,
|
||||||
None => return,
|
None => return,
|
||||||
};
|
};
|
||||||
|
if parser.aborted.get() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
self.parser = Some(Trusted::new(&*parser));
|
self.parser = Some(Trusted::new(&*parser));
|
||||||
|
|
||||||
|
@ -512,15 +590,19 @@ impl FetchResponseListener for ParserContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn process_response_chunk(&mut self, payload: Vec<u8>) {
|
fn process_response_chunk(&mut self, payload: Vec<u8>) {
|
||||||
if !self.is_synthesized_document {
|
if self.is_synthesized_document {
|
||||||
// FIXME: use Vec<u8> (html5ever #34)
|
return;
|
||||||
let data = UTF_8.decode(&payload, DecoderTrap::Replace).unwrap();
|
|
||||||
let parser = match self.parser.as_ref() {
|
|
||||||
Some(parser) => parser.root(),
|
|
||||||
None => return,
|
|
||||||
};
|
|
||||||
parser.parse_chunk(data);
|
|
||||||
}
|
}
|
||||||
|
// FIXME: use Vec<u8> (html5ever #34)
|
||||||
|
let data = UTF_8.decode(&payload, DecoderTrap::Replace).unwrap();
|
||||||
|
let parser = match self.parser.as_ref() {
|
||||||
|
Some(parser) => parser.root(),
|
||||||
|
None => return,
|
||||||
|
};
|
||||||
|
if parser.aborted.get() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
parser.parse_chunk(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn process_response_eof(&mut self, status: Result<(), NetworkError>) {
|
fn process_response_eof(&mut self, status: Result<(), NetworkError>) {
|
||||||
|
@ -528,6 +610,9 @@ impl FetchResponseListener for ParserContext {
|
||||||
Some(parser) => parser.root(),
|
Some(parser) => parser.root(),
|
||||||
None => return,
|
None => return,
|
||||||
};
|
};
|
||||||
|
if parser.aborted.get() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if let Err(NetworkError::Internal(ref reason)) = status {
|
if let Err(NetworkError::Internal(ref reason)) = status {
|
||||||
// Show an error page for network errors,
|
// Show an error page for network errors,
|
||||||
|
|
|
@ -111,9 +111,11 @@ partial /*sealed*/ interface Document {
|
||||||
readonly attribute HTMLScriptElement? currentScript;
|
readonly attribute HTMLScriptElement? currentScript;
|
||||||
|
|
||||||
// dynamic markup insertion
|
// dynamic markup insertion
|
||||||
// Document open(optional DOMString type = "text/html", optional DOMString replace = "");
|
[Throws]
|
||||||
|
Document open(optional DOMString type = "text/html", optional DOMString replace = "");
|
||||||
// WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
|
// WindowProxy open(DOMString url, DOMString name, DOMString features, optional boolean replace = false);
|
||||||
// void close();
|
[Throws]
|
||||||
|
void close();
|
||||||
[Throws]
|
[Throws]
|
||||||
void write(DOMString... text);
|
void write(DOMString... text);
|
||||||
[Throws]
|
[Throws]
|
||||||
|
|
|
@ -60,8 +60,8 @@ use net_traits::storage_thread::StorageType;
|
||||||
use num_traits::ToPrimitive;
|
use num_traits::ToPrimitive;
|
||||||
use open;
|
use open;
|
||||||
use origin::Origin;
|
use origin::Origin;
|
||||||
use profile_traits::mem;
|
use profile_traits::mem::ProfilerChan as MemProfilerChan;
|
||||||
use profile_traits::time::ProfilerChan;
|
use profile_traits::time::ProfilerChan as TimeProfilerChan;
|
||||||
use rustc_serialize::base64::{FromBase64, STANDARD, ToBase64};
|
use rustc_serialize::base64::{FromBase64, STANDARD, ToBase64};
|
||||||
use script_layout_interface::TrustedNodeAddress;
|
use script_layout_interface::TrustedNodeAddress;
|
||||||
use script_layout_interface::message::{Msg, Reflow, ReflowQueryType, ScriptReflow};
|
use script_layout_interface::message::{Msg, Reflow, ReflowQueryType, ScriptReflow};
|
||||||
|
@ -87,6 +87,7 @@ use std::cell::Cell;
|
||||||
use std::collections::{HashMap, HashSet};
|
use std::collections::{HashMap, HashSet};
|
||||||
use std::default::Default;
|
use std::default::Default;
|
||||||
use std::io::{Write, stderr, stdout};
|
use std::io::{Write, stderr, stdout};
|
||||||
|
use std::mem;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::sync::atomic::{AtomicBool, Ordering};
|
use std::sync::atomic::{AtomicBool, Ordering};
|
||||||
|
@ -231,7 +232,7 @@ pub struct Window {
|
||||||
|
|
||||||
/// A flag to prevent async events from attempting to interact with this window.
|
/// A flag to prevent async events from attempting to interact with this window.
|
||||||
#[ignore_heap_size_of = "defined in std"]
|
#[ignore_heap_size_of = "defined in std"]
|
||||||
ignore_further_async_events: Arc<AtomicBool>,
|
ignore_further_async_events: DOMRefCell<Arc<AtomicBool>>,
|
||||||
|
|
||||||
error_reporter: CSSErrorReporter,
|
error_reporter: CSSErrorReporter,
|
||||||
|
|
||||||
|
@ -255,7 +256,7 @@ impl Window {
|
||||||
*self.js_runtime.borrow_for_script_deallocation() = None;
|
*self.js_runtime.borrow_for_script_deallocation() = None;
|
||||||
self.browsing_context.set(None);
|
self.browsing_context.set(None);
|
||||||
self.current_state.set(WindowState::Zombie);
|
self.current_state.set(WindowState::Zombie);
|
||||||
self.ignore_further_async_events.store(true, Ordering::Relaxed);
|
self.ignore_further_async_events.borrow().store(true, Ordering::Relaxed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -917,10 +918,19 @@ impl WindowMethods for Window {
|
||||||
impl Window {
|
impl Window {
|
||||||
pub fn get_runnable_wrapper(&self) -> RunnableWrapper {
|
pub fn get_runnable_wrapper(&self) -> RunnableWrapper {
|
||||||
RunnableWrapper {
|
RunnableWrapper {
|
||||||
cancelled: Some(self.ignore_further_async_events.clone()),
|
cancelled: Some(self.ignore_further_async_events.borrow().clone()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Cancels all the tasks associated with that window.
|
||||||
|
///
|
||||||
|
/// This sets the current `ignore_further_async_events` sentinel value to
|
||||||
|
/// `true` and replaces it with a brand new one for future tasks.
|
||||||
|
pub fn cancel_all_tasks(&self) {
|
||||||
|
let cancelled = mem::replace(&mut *self.ignore_further_async_events.borrow_mut(), Default::default());
|
||||||
|
cancelled.store(true, Ordering::Relaxed);
|
||||||
|
}
|
||||||
|
|
||||||
pub fn clear_js_runtime(&self) {
|
pub fn clear_js_runtime(&self) {
|
||||||
// We tear down the active document, which causes all the attached
|
// We tear down the active document, which causes all the attached
|
||||||
// nodes to dispose of their layout data. This messages the layout
|
// nodes to dispose of their layout data. This messages the layout
|
||||||
|
@ -944,7 +954,7 @@ impl Window {
|
||||||
self.current_state.set(WindowState::Zombie);
|
self.current_state.set(WindowState::Zombie);
|
||||||
*self.js_runtime.borrow_mut() = None;
|
*self.js_runtime.borrow_mut() = None;
|
||||||
self.browsing_context.set(None);
|
self.browsing_context.set(None);
|
||||||
self.ignore_further_async_events.store(true, Ordering::SeqCst);
|
self.ignore_further_async_events.borrow().store(true, Ordering::SeqCst);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// https://drafts.csswg.org/cssom-view/#dom-window-scroll
|
/// https://drafts.csswg.org/cssom-view/#dom-window-scroll
|
||||||
|
@ -1611,8 +1621,8 @@ impl Window {
|
||||||
image_cache_thread: ImageCacheThread,
|
image_cache_thread: ImageCacheThread,
|
||||||
resource_threads: ResourceThreads,
|
resource_threads: ResourceThreads,
|
||||||
bluetooth_thread: IpcSender<BluetoothRequest>,
|
bluetooth_thread: IpcSender<BluetoothRequest>,
|
||||||
mem_profiler_chan: mem::ProfilerChan,
|
mem_profiler_chan: MemProfilerChan,
|
||||||
time_profiler_chan: ProfilerChan,
|
time_profiler_chan: TimeProfilerChan,
|
||||||
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>,
|
||||||
constellation_chan: IpcSender<ConstellationMsg>,
|
constellation_chan: IpcSender<ConstellationMsg>,
|
||||||
control_chan: IpcSender<ConstellationControlMsg>,
|
control_chan: IpcSender<ConstellationControlMsg>,
|
||||||
|
@ -1681,7 +1691,7 @@ impl Window {
|
||||||
devtools_marker_sender: DOMRefCell::new(None),
|
devtools_marker_sender: DOMRefCell::new(None),
|
||||||
devtools_markers: DOMRefCell::new(HashSet::new()),
|
devtools_markers: DOMRefCell::new(HashSet::new()),
|
||||||
webdriver_script_chan: DOMRefCell::new(None),
|
webdriver_script_chan: DOMRefCell::new(None),
|
||||||
ignore_further_async_events: Arc::new(AtomicBool::new(false)),
|
ignore_further_async_events: Default::default(),
|
||||||
error_reporter: error_reporter,
|
error_reporter: error_reporter,
|
||||||
scroll_offsets: DOMRefCell::new(HashMap::new()),
|
scroll_offsets: DOMRefCell::new(HashMap::new()),
|
||||||
media_query_lists: WeakMediaQueryListVec::new(),
|
media_query_lists: WeakMediaQueryListVec::new(),
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[document.close-01.xhtml]
|
|
||||||
type: testharness
|
|
||||||
[document.close in XHTML]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[047.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[048.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[049.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write plaintext]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[050.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write plaintext]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
[document.write-02.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write(null)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[document.write(undefined)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_001.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write into iframe]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_002.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write into iframe]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_003.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write script into iframe]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_004.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write script into iframe write back into parent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_005.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write external script into iframe write back into parent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_006.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write external script into iframe write back into parent]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_007.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write comment into iframe]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_008.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write plaintext into iframe]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_009.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write plaintext into iframe]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[iframe_010.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write plaintext]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[write-active-document.html]
|
|
||||||
type: testharness
|
|
||||||
[document.write only writes to active documents]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
[document.writeln-02.html]
|
|
||||||
type: testharness
|
|
||||||
[document.writeln(null)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[document.writeln(undefined)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[document.writeln-03.html]
|
|
||||||
type: testharness
|
|
||||||
[Calling document.writeln with multiple arguments]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
type: testharness
|
type: testharness
|
||||||
[Replacement of window object after document.open]
|
[Replacement of window object after document.open]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
bug: https://github.com/whatwg/html/issues/1698
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[002.html]
|
|
||||||
type: testharness
|
|
||||||
[document.open during parsing]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[004.html]
|
|
||||||
type: testharness
|
|
||||||
[Reuse of document object after document.open]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[006.html]
|
|
||||||
type: testharness
|
|
||||||
[Cancelling error after document.open]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[007.html]
|
|
||||||
type: testharness
|
|
||||||
[Unregistering event handlers after document.open]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
type: testharness
|
type: testharness
|
||||||
[Replacement of document prototype object after document.open]
|
[Replacement of document prototype object after document.open]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
bug: https://github.com/whatwg/html/issues/1698
|
||||||
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
[011.html]
|
|
||||||
type: testharness
|
|
||||||
expected: TIMEOUT
|
|
||||||
[Timeout after document.open]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[012.html]
|
|
||||||
type: testharness
|
|
||||||
[Timeout after document.open in load event]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[013.html]
|
|
||||||
type: testharness
|
|
||||||
[Timeout after document.open in DOMContentLoaded event]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[014.html]
|
|
||||||
type: testharness
|
|
||||||
[Timeout after document.open after document is completely loaded]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
[015.html]
|
[015.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[global scope unchanged]
|
[global scope unchanged]
|
||||||
expected: TIMEOUT
|
expected: FAIL
|
||||||
|
bug: https://github.com/whatwg/html/issues/1698
|
||||||
[window object changed]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
||||||
[this is the window object]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
[016.html]
|
[016.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
bug: https://github.com/whatwg/html/issues/1698
|
||||||
[Timeout on original window, scope]
|
[Timeout on original window, scope]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
[Timeout on original window, this object]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
||||||
[Timeout on new window, scope]
|
[Timeout on new window, scope]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
|
||||||
[Timeout on new window, this object]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[document.open-01.xhtml]
|
|
||||||
type: testharness
|
|
||||||
[document.open in XHTML]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[document.open-03.html]
|
[document.open-03.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
|
||||||
[document.open and singleton replacement]
|
[document.open and singleton replacement]
|
||||||
expected: NOTRUN
|
expected: FAIL
|
||||||
|
bug: https://github.com/whatwg/html/issues/1698
|
||||||
|
|
||||||
|
|
|
@ -12,15 +12,9 @@
|
||||||
[Document interface: attribute cssElementMap]
|
[Document interface: attribute cssElementMap]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: operation open(DOMString,DOMString)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: operation open(DOMString,DOMString,DOMString,boolean)]
|
[Document interface: operation open(DOMString,DOMString,DOMString,boolean)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: operation close()]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: attribute designMode]
|
[Document interface: attribute designMode]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -216,21 +210,9 @@
|
||||||
[Document interface: iframe.contentDocument must inherit property "cssElementMap" with the proper type (52)]
|
[Document interface: iframe.contentDocument must inherit property "cssElementMap" with the proper type (52)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: iframe.contentDocument must inherit property "open" with the proper type (54)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: calling open(DOMString,DOMString) on iframe.contentDocument with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: iframe.contentDocument must inherit property "open" with the proper type (55)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: calling open(DOMString,DOMString,DOMString,boolean) on iframe.contentDocument with too few arguments must throw TypeError]
|
[Document interface: calling open(DOMString,DOMString,DOMString,boolean) on iframe.contentDocument with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: iframe.contentDocument must inherit property "close" with the proper type (56)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: iframe.contentDocument must inherit property "designMode" with the proper type (62)]
|
[Document interface: iframe.contentDocument must inherit property "designMode" with the proper type (62)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -591,21 +573,9 @@
|
||||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "cssElementMap" with the proper type (52)]
|
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "cssElementMap" with the proper type (52)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "open" with the proper type (54)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: calling open(DOMString,DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "open" with the proper type (55)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: calling open(DOMString,DOMString,DOMString,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError]
|
[Document interface: calling open(DOMString,DOMString,DOMString,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "close" with the proper type (56)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "designMode" with the proper type (62)]
|
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "designMode" with the proper type (62)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -6096,12 +6066,6 @@
|
||||||
[Document interface: new Document() must inherit property "cssElementMap" with the proper type (53)]
|
[Document interface: new Document() must inherit property "cssElementMap" with the proper type (53)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: new Document() must inherit property "open" with the proper type (55)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: calling open(DOMString,DOMString) on new Document() with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: new Document() must inherit property "open" with the proper type (56)]
|
[Document interface: new Document() must inherit property "open" with the proper type (56)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -8151,12 +8115,6 @@
|
||||||
[Document interface: new Document() must inherit property "cssElementMap" with the proper type (52)]
|
[Document interface: new Document() must inherit property "cssElementMap" with the proper type (52)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: new Document() must inherit property "open" with the proper type (54)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: new Document() must inherit property "close" with the proper type (56)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: new Document() must inherit property "designMode" with the proper type (62)]
|
[Document interface: new Document() must inherit property "designMode" with the proper type (62)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -8334,9 +8292,6 @@
|
||||||
[Event interface: calling initEvent(DOMString,boolean,boolean) on new TrackEvent("addtrack", {track:document.createElement("track").track}) with too few arguments must throw TypeError]
|
[Event interface: calling initEvent(DOMString,boolean,boolean) on new TrackEvent("addtrack", {track:document.createElement("track").track}) with too few arguments must throw TypeError]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: operation open(USVString,DOMString,DOMString)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: iframe.contentDocument must inherit property "createCDATASection" with the proper type (18)]
|
[Document interface: iframe.contentDocument must inherit property "createCDATASection" with the proper type (18)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -8361,9 +8316,6 @@
|
||||||
[Document interface: iframe.contentDocument must inherit property "dir" with the proper type (43)]
|
[Document interface: iframe.contentDocument must inherit property "dir" with the proper type (43)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: calling open(USVString,DOMString,DOMString) on iframe.contentDocument with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: iframe.contentDocument must inherit property "linkColor" with the proper type (71)]
|
[Document interface: iframe.contentDocument must inherit property "linkColor" with the proper type (71)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -8403,9 +8355,6 @@
|
||||||
[Document interface: new Document() must inherit property "dir" with the proper type (43)]
|
[Document interface: new Document() must inherit property "dir" with the proper type (43)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: calling open(USVString,DOMString,DOMString) on new Document() with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: new Document() must inherit property "linkColor" with the proper type (71)]
|
[Document interface: new Document() must inherit property "linkColor" with the proper type (71)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
@ -8445,9 +8394,6 @@
|
||||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "dir" with the proper type (43)]
|
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "dir" with the proper type (43)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: calling open(USVString,DOMString,DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "linkColor" with the proper type (71)]
|
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "linkColor" with the proper type (71)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[move_iframe_in_dom_02.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
|
@ -1,3 +0,0 @@
|
||||||
[move_iframe_in_dom_04.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
|
@ -1,6 +1,3 @@
|
||||||
[script-onerror-insertion-point-2.html]
|
[script-onerror-insertion-point-2.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
expected: TIMEOUT
|
expected: TIMEOUT
|
||||||
[Test that the insertion point is not defined in the error event of a\n parser-inserted script that has an unparseable URL]
|
|
||||||
expected: NOTRUN
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
[test_document_open.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
|
@ -1,3 +0,0 @@
|
||||||
[070.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
|
@ -1,3 +0,0 @@
|
||||||
[071.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
|
@ -1,3 +0,0 @@
|
||||||
[072.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
|
@ -1,3 +0,0 @@
|
||||||
[073.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
|
@ -1,3 +0,0 @@
|
||||||
[074.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
|
@ -1,6 +0,0 @@
|
||||||
[075.html]
|
|
||||||
type: testharness
|
|
||||||
expected: ERROR
|
|
||||||
[dispatchEvent from child frame during document.write :-o ]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[094.html]
|
|
||||||
type: testharness
|
|
||||||
[ scheduler: parser-created defer script after document load]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[101.html]
|
|
||||||
type: testharness
|
|
||||||
[ scheduler: defer script after initial onload event]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue