mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Implement DocumentFragment XML serialization.
This commit is contained in:
parent
dd2deeabca
commit
1dd1cb4f4f
3 changed files with 11 additions and 2 deletions
|
@ -10,6 +10,7 @@ use crate::dom::bindings::root::{Dom, DomRoot};
|
|||
use crate::dom::bindings::trace::JSTraceable;
|
||||
use crate::dom::characterdata::CharacterData;
|
||||
use crate::dom::document::Document;
|
||||
use crate::dom::documentfragment::DocumentFragment;
|
||||
use crate::dom::documenttype::DocumentType;
|
||||
use crate::dom::element::Element;
|
||||
use crate::dom::htmlscriptelement::HTMLScriptElement;
|
||||
|
@ -166,7 +167,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.is::<DocumentFragment>() {
|
||||
for c in rev_children_iter(node) {
|
||||
ret.push_node(&*c);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue