diff --git a/components/script/dom/servoparser/html.rs b/components/script/dom/servoparser/html.rs index 688e2aba788..6142dba20f6 100644 --- a/components/script/dom/servoparser/html.rs +++ b/components/script/dom/servoparser/html.rs @@ -33,6 +33,7 @@ use html5ever::tree_builder::{NodeOrText, QuirksMode}; use html5ever::tree_builder::{Tracer as HtmlTracer, TreeBuilder, TreeBuilderOpts, TreeSink}; use js::jsapi::JSTracer; use servo_url::ServoUrl; +use std::ascii::AsciiExt; use std::borrow::Cow; use std::io::{self, Write}; use style::context::QuirksMode as ServoQuirksMode; @@ -264,6 +265,16 @@ impl TreeSink for Sink { } } + /// https://html.spec.whatwg.org/multipage/#html-integration-point + /// Specifically, the cases. + fn is_mathml_annotation_xml_integration_point(&self, handle: JS) -> bool { + let elem = handle.downcast::().unwrap(); + elem.get_attribute(&ns!(), &local_name!("encoding")).map_or(false, |attr| { + attr.value().eq_ignore_ascii_case("text/html") + || attr.value().eq_ignore_ascii_case("application/xhtml+xml") + }) + } + fn set_current_line(&mut self, line_number: u64) { self.current_line = line_number; } diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests20.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_tests20.html.ini deleted file mode 100644 index 34df6efa61d..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/html5lib_tests20.html.ini +++ /dev/null @@ -1,56 +0,0 @@ -[html5lib_tests20.html?run_type=write_single] - type: testharness - [html5lib_tests20.html a7e70930137ff8338778253ac93dc66f11eef966] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - [html5lib_tests20.html b92100bddc318e13996fbe96c087c35152cbb4e3] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - [html5lib_tests20.html f55b68de8cf9ec17e0512a6caae94e0fbf151260] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - [html5lib_tests20.html 7fb0d4342e3ed3fabee650b83ce66ffb2f66c173] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - -[html5lib_tests20.html?run_type=write] - type: testharness - [html5lib_tests20.html a7e70930137ff8338778253ac93dc66f11eef966] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - [html5lib_tests20.html b92100bddc318e13996fbe96c087c35152cbb4e3] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - [html5lib_tests20.html f55b68de8cf9ec17e0512a6caae94e0fbf151260] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - [html5lib_tests20.html 7fb0d4342e3ed3fabee650b83ce66ffb2f66c173] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - -[html5lib_tests20.html?run_type=uri] - type: testharness - [html5lib_tests20.html a7e70930137ff8338778253ac93dc66f11eef966] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - [html5lib_tests20.html b92100bddc318e13996fbe96c087c35152cbb4e3] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - [html5lib_tests20.html f55b68de8cf9ec17e0512a6caae94e0fbf151260] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - - [html5lib_tests20.html 7fb0d4342e3ed3fabee650b83ce66ffb2f66c173] - expected: FAIL - bug: https://github.com/servo/servo/issues/15980 - diff --git a/tests/wpt/metadata/html/syntax/parsing/math-parse01.html.ini b/tests/wpt/metadata/html/syntax/parsing/math-parse01.html.ini deleted file mode 100644 index 87111b80e10..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/math-parse01.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[math-parse01.html] - type: testharness - [html tags allowed in annotation-xml/@encoding='text/html'.] - expected: FAIL - diff --git a/tests/wpt/metadata/html/syntax/parsing/math-parse03.html.ini b/tests/wpt/metadata/html/syntax/parsing/math-parse03.html.ini deleted file mode 100644 index 7caeb476ccc..00000000000 --- a/tests/wpt/metadata/html/syntax/parsing/math-parse03.html.ini +++ /dev/null @@ -1,11 +0,0 @@ -[math-parse03.html] - type: testharness - [p in annotation-xml encoding=text/html stays as child of annotation-xml] - expected: FAIL - - [p in annotation-xml encoding=TEXT/HTML stays as child of annotation-xml] - expected: FAIL - - [p in annotation-xml encoding=application/xhtml+xml stays as child of annotation-xml] - expected: FAIL -