Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement DocumentFragment XML serialization. #23192
Conversation
highfive
commented
Apr 11, 2019
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @ferjm (or someone else) soon. |
highfive
commented
Apr 11, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Apr 11, 2019
|
@bors-servo try=wpt |
Implement DocumentFragment XML serialization. When serializing a DocumentFragment node, we should follow [this guy](https://w3c.github.io/DOM-Parsing/#dfn-xml-serializing-a-documentfragment-node) and serialize the node's immediate children. This commit makes that change. --- <!-- 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 - [ ] `./mach test-tidy` does not report any errors - [X] These changes fix #23134 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because ___ well, they probably do, but I don't know how to do that and could use some help. <!-- 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/23192) <!-- Reviewable:end -->
|
|
|
I recommend following the example of #23153 and adding a test to tests/wpt/web-platform-tests/domparsing/XMLSerializer-serializeToString.html. You can run those tests with |
|
@bors-servo try=wpt |
|
Cool, I'll get to it |
|
Opened new PR for upstreamable changes. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#16333. |
|
This looks great! One small change and then it's ready to merge :) Please squash the commits into one, as well. |
| @@ -166,7 +166,7 @@ fn rev_children_iter(n: &Node) -> impl Iterator<Item = DomRoot<Node>> { | |||
| impl SerializationIterator { | |||
| fn new(node: &Node, skip_first: bool) -> SerializationIterator { | |||
| let mut ret = SerializationIterator { stack: vec![] }; | |||
| if skip_first { | |||
| if skip_first || node.type_id() == NodeTypeId::DocumentFragment { | |||
This comment has been minimized.
This comment has been minimized.
|
You will need to run |
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#16333. |
|
@bors-servo r+ |
|
|
Implement DocumentFragment XML serialization. When serializing a DocumentFragment node, we should follow [this guy](https://w3c.github.io/DOM-Parsing/#dfn-xml-serializing-a-documentfragment-node) and serialize the node's immediate children. This commit makes that change. --- <!-- 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 - [X] These changes fix #23134 (GitHub issue number if applicable) <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because ___ well, they probably do, but I don't know how to do that and could use some help. <!-- 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/23192) <!-- Reviewable:end -->
|
|
jackxbritton commentedApr 11, 2019
•
edited by jdm
When serializing a DocumentFragment node, we should follow this guy and serialize the node's immediate children. This commit makes that change.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is