Auto merge of #18946 - cynicaldevil:update-h5e, r=nox

Update h5e version

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./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/18946)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-10-20 08:49:09 -05:00 committed by GitHub
commit 91077ee418
11 changed files with 39 additions and 45 deletions

View file

@ -44,7 +44,7 @@ euclid = "0.15"
fnv = "1.0"
gleam = "0.4"
half = "1.0"
html5ever = "0.20"
html5ever = "0.21"
hyper = "0.10"
hyper_serde = "0.7"
image = "0.16"
@ -93,7 +93,7 @@ unicode-segmentation = "1.1.0"
url = {version = "1.2", features = ["query_encoding"]}
utf-8 = "0.7"
uuid = {version = "0.5", features = ["v4"]}
xml5ever = {version = "0.10"}
xml5ever = {version = "0.11"}
webrender_api = {git = "https://github.com/servo/webrender", features = ["ipc"]}
webvr_traits = {path = "../webvr_traits"}

View file

@ -586,10 +586,6 @@ impl TreeSink for Sink {
target.qual_name.as_ref().expect("Expected qual name of node!").expanded()
}
fn same_tree(&self, _: &Self::Handle, _: &Self::Handle) -> bool {
unreachable!();
}
fn create_element(&mut self, name: QualName, html_attrs: Vec<HtmlAttribute>, _flags: ElementFlags)
-> Self::Handle {
let mut node = self.new_parse_node();
@ -632,10 +628,6 @@ impl TreeSink for Sink {
node
}
fn has_parent_node(&self, _: &Self::Handle) -> bool {
unreachable!();
}
fn associate_with_form(
&mut self,
target: &Self::Handle,

View file

@ -751,6 +751,19 @@ pub struct Sink {
script: MutNullableDom<HTMLScriptElement>,
}
impl Sink {
fn same_tree(&self, x: &Dom<Node>, y: &Dom<Node>) -> bool {
let x = x.downcast::<Element>().expect("Element node expected");
let y = y.downcast::<Element>().expect("Element node expected");
x.is_in_same_home_subtree(y)
}
fn has_parent_node(&self, node: &Dom<Node>) -> bool {
node.GetParentNode().is_some()
}
}
#[allow(unrooted_must_root)] // FIXME: really?
impl TreeSink for Sink {
type Output = Self;
@ -781,13 +794,6 @@ impl TreeSink for Sink {
}
}
fn same_tree(&self, x: &Dom<Node>, y: &Dom<Node>) -> bool {
let x = x.downcast::<Element>().expect("Element node expected");
let y = y.downcast::<Element>().expect("Element node expected");
x.is_in_same_home_subtree(y)
}
fn create_element(&mut self, name: QualName, attrs: Vec<Attribute>, _flags: ElementFlags)
-> Dom<Node> {
let is = attrs.iter()
@ -820,10 +826,6 @@ impl TreeSink for Sink {
Dom::from_ref(pi.upcast())
}
fn has_parent_node(&self, node: &Dom<Node>) -> bool {
node.GetParentNode().is_some()
}
fn associate_with_form(&mut self, target: &Dom<Node>, form: &Dom<Node>, nodes: (&Dom<Node>, Option<&Dom<Node>>)) {
let (element, prev_element) = nodes;
let tree_node = prev_element.map_or(element, |prev| {