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 ChildNode::before & ChildNode::after #6800
Conversation
|
-S-awaiting-review +S-needs-code-changes Reviewed 5 of 5 files at r1. components/script/dom/bindings/utils.rs, line 983 [r1] (raw file): components/script/dom/bindings/utils.rs, line 987 [r1] (raw file): nodes.find(|node| {
not_in.iter().all(|n| {
match n {
&NodeOrString::eNode(ref n) => *n != node,
_ => true,
}
})
})? (I like my iterator methods.) components/script/dom/node.rs, line 818 [r1] (raw file): tests/wpt/web-platform-tests/dom/nodes/ChildNode-after.html, line 110 [r1] (raw file): tests/wpt/web-platform-tests/dom/nodes/ChildNode-before.html, line 110 [r1] (raw file): tests/wpt/web-platform-tests/dom/nodes/ChildNode-before.html, line 112 [r1] (raw file): var parent = document.createElement("div")
var x = parent.appendChild(document.createElement("a"));
var y = parent.appendChild(document.createElement("b"));
var z = parent.appendChild(document.createElement("c"));
var u = parent.appendChild(document.createElement("d"));
parent.appendChild(child);
child.before(z, u);from #6536 (comment). Comments from the review on Reviewable.io |
|
tests/wpt/web-platform-tests/dom/nodes/ChildNode-before.html, line 112 [r1] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/node.rs, line 818 [r1] (raw file): Comments from the review on Reviewable.io |
ae2ca78
to
e785a4b
|
tests/wpt/web-platform-tests/dom/nodes/ChildNode-before.html, line 112 [r1] (raw file): Comments from the review on Reviewable.io |
|
Addressed all the comments in the latest force push, with exception to the Comments from the review on Reviewable.io |
|
Reviewed 4 of 4 files at r2. components/script/dom/node.rs, line 818 [r1] (raw file): tests/wpt/web-platform-tests/dom/nodes/ChildNode-after.html, line 111 [r2] (raw file): tests/wpt/web-platform-tests/dom/nodes/ChildNode-before.html, line 111 [r2] (raw file): tests/wpt/web-platform-tests/dom/nodes/ChildNode-before.html, line 126 [r1] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/node.rs, line 818 [r1] (raw file): Comments from the review on Reviewable.io |
|
tests/wpt/web-platform-tests/dom/nodes/ChildNode-before.html, line 112 [r1] (raw file): Comments from the review on Reviewable.io |
Continued from #6536 The current implementations of `ChildNode::before` and `ChildNode::after` do not match the WHATWG spec. This commit updates the implementations to match the spec. Our current implementation of `ChildNode::after` passes all the WPT tests. So I made sure to add a regression test that failed with the current implementation. There are a few other unit tests I added to exhaust other corner cases I encountered.
e785a4b
to
8cfccda
|
The latest force push addresses the second round of comments Comments from the review on Reviewable.io |
|
Thank you for your PR. -S-awaiting-review +S-awaiting-merge @bors-servo r+ Reviewed 3 of 3 files at r3. Comments from the review on Reviewable.io |
|
|
…2ger Implement ChildNode::before & ChildNode::after Continued from #6536 The current implementations of `ChildNode::before` and `ChildNode::after` do not match the WHATWG spec. This commit updates the implementations to match the spec. Our current implementation of `ChildNode::after` passes all the WPT tests. So I made sure to add a regression test that failed with the current implementation. There are a few other unit tests I added to exhaust other corner cases I encountered. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6800) <!-- Reviewable:end -->
frewsxcv commentedJul 28, 2015
Continued from #6536
The current implementations of
ChildNode::beforeandChildNode::afterdo not match the WHATWG spec. This commit updates theimplementations to match the spec.
Our current implementation of
ChildNode::afterpasses all the WPTtests. So I made sure to add a regression test that failed with the
current implementation. There are a few other unit tests I added
to exhaust other corner cases I encountered.