Auto merge of #19647 - tigercosmos:x3, r=jdm

replace DocumentSource::NotFromParser with DocumentSource::FromParser

<!-- Please describe your changes on the following line: -->
per https://github.com/servo/servo/pull/4297/files#r158729975

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19647)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-01-08 11:23:21 -06:00 committed by GitHub
commit d41f720ee4
3 changed files with 25 additions and 2 deletions

View file

@ -77,7 +77,6 @@ impl DOMParserMethods for DOMParser {
Ok(document)
}
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,
HasBrowsingContext::No,
Some(url.clone()),
@ -86,12 +85,13 @@ impl DOMParserMethods for DOMParser {
Some(content_type),
None,
DocumentActivity::Inactive,
DocumentSource::NotFromParser,
DocumentSource::FromParser,
loader,
None,
None,
Default::default());
ServoParser::parse_xml_document(&document, s, url);
document.set_ready_state(DocumentReadyState::Complete);
Ok(document)
}
}

View file

@ -307439,6 +307439,12 @@
{}
]
],
"domparsing/xmldomparser.html": [
[
"/domparsing/xmldomparser.html",
{}
]
],
"domxpath/001.html": [
[
"/domxpath/001.html",
@ -525106,6 +525112,10 @@
"b62d4cf898f819ccaf02769de3af12cdc80cea7e",
"testharness"
],
"domparsing/xmldomparser.html": [
"bf343e8d7f4488fc2e2755fc2dc3c8fc83a8cb17",
"testharness"
],
"domxpath/001.html": [
"f7161655a8955dd5a028b2e7dd5ada945176a930",
"testharness"

View 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>