mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
replace DocumentSource::NotFromParser with DocumentSource::FromParser
This commit is contained in:
parent
97bba5fdc1
commit
97482f9b91
3 changed files with 25 additions and 2 deletions
|
@ -77,7 +77,6 @@ impl DOMParserMethods for DOMParser {
|
||||||
Ok(document)
|
Ok(document)
|
||||||
}
|
}
|
||||||
Text_xml | Application_xml | Application_xhtml_xml => {
|
Text_xml | Application_xml | Application_xhtml_xml => {
|
||||||
// FIXME: this should probably be FromParser when we actually parse the string (#3756).
|
|
||||||
let document = Document::new(&self.window,
|
let document = Document::new(&self.window,
|
||||||
HasBrowsingContext::No,
|
HasBrowsingContext::No,
|
||||||
Some(url.clone()),
|
Some(url.clone()),
|
||||||
|
@ -86,12 +85,13 @@ impl DOMParserMethods for DOMParser {
|
||||||
Some(content_type),
|
Some(content_type),
|
||||||
None,
|
None,
|
||||||
DocumentActivity::Inactive,
|
DocumentActivity::Inactive,
|
||||||
DocumentSource::NotFromParser,
|
DocumentSource::FromParser,
|
||||||
loader,
|
loader,
|
||||||
None,
|
None,
|
||||||
None,
|
None,
|
||||||
Default::default());
|
Default::default());
|
||||||
ServoParser::parse_xml_document(&document, s, url);
|
ServoParser::parse_xml_document(&document, s, url);
|
||||||
|
document.set_ready_state(DocumentReadyState::Complete);
|
||||||
Ok(document)
|
Ok(document)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -307371,6 +307371,12 @@
|
||||||
{}
|
{}
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
"domparsing/xmldomparser.html": [
|
||||||
|
[
|
||||||
|
"/domparsing/xmldomparser.html",
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
],
|
||||||
"domxpath/001.html": [
|
"domxpath/001.html": [
|
||||||
[
|
[
|
||||||
"/domxpath/001.html",
|
"/domxpath/001.html",
|
||||||
|
@ -525006,6 +525012,10 @@
|
||||||
"b62d4cf898f819ccaf02769de3af12cdc80cea7e",
|
"b62d4cf898f819ccaf02769de3af12cdc80cea7e",
|
||||||
"testharness"
|
"testharness"
|
||||||
],
|
],
|
||||||
|
"domparsing/xmldomparser.html": [
|
||||||
|
"bf343e8d7f4488fc2e2755fc2dc3c8fc83a8cb17",
|
||||||
|
"testharness"
|
||||||
|
],
|
||||||
"domxpath/001.html": [
|
"domxpath/001.html": [
|
||||||
"f7161655a8955dd5a028b2e7dd5ada945176a930",
|
"f7161655a8955dd5a028b2e7dd5ada945176a930",
|
||||||
"testharness"
|
"testharness"
|
||||||
|
|
13
tests/wpt/web-platform-tests/domparsing/xmldomparser.html
Normal file
13
tests/wpt/web-platform-tests/domparsing/xmldomparser.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<!doctype html>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>XML Dom Parse readyState Test</title>
|
||||||
|
<script src="/resources/testharness.js"></script>
|
||||||
|
<script src="/resources/testharnessreport.js"></script>
|
||||||
|
<script>
|
||||||
|
test(function () {
|
||||||
|
assert_equals(
|
||||||
|
(new DOMParser()).parseFromString("<html></html>", "text/xml").readyState,
|
||||||
|
"complete"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue