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 ask_for_reset for HTMLSelectElement. #7963
Conversation
highfive
commented
Oct 10, 2015
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @SimonSapin (or someone else) soon. |
|
|
|
Hmmm Review status: 0 of 1 files reviewed at latest revision, all discussions resolved, some commit checks pending. Comments from the review on Reviewable.io |
You could add a Comments from the review on Reviewable.io |
|
components/script/dom/htmloptionelement.rs, line 153 [r4] (raw file): http://doc.servo.org/std/iter/trait.Iterator.html#method.filter_map Let me know if you need help Comments from the review on Reviewable.io |
|
Review status: 0 of 2 files reviewed at latest revision, 1 unresolved discussion, some commit checks pending. components/script/dom/htmloptionelement.rs, line 153 [r4] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/htmlselectelement.rs, line 78 [r5] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/htmlselectelement.rs, line 72 [r5] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/htmlselectelement.rs, line 78 [r5] (raw file): Comments from the review on Reviewable.io |
|
Review status: 0 of 2 files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. components/script/dom/htmlselectelement.rs, line 72 [r5] (raw file): components/script/dom/htmlselectelement.rs, line 78 [r5] (raw file): Comments from the review on Reviewable.io |
|
FYI, the latest commit doesn't pass the style checker, one of the lines is too long |
|
Hi @frewsxcv, is there anything else needed for this PR? |
|
Have you tried running the web-platform-tests ( |
|
I'm running Thanks! |
|
(to anyone who is reading this PR and wondering why we haven't responded, we just chatted 1 on 1 on IRC) |
|
|
369d5cb
to
e1fbad2
|
@frewsxcv, I've added some tests, please take a look. Only the third one passes at the moment because |
|
The relevant hooks for node insert and remove are |
|
Thanks! |
|
FYI, in case you missed it, there are merge conflicts that will eventually need to be addressed |
0a1ced2
to
2855e2d
- Whitespace and indentation issues - call as_for_reset on option insert - add link to 'pick' in standard
|
Review status: 0 of 5 files reviewed at latest revision, 7 unresolved discussions, all commit checks successful. components/script/dom/htmloptionelement.rs, line 147 [r14] (raw file): components/script/dom/htmloptionelement.rs, line 208 [r14] (raw file): components/script/dom/htmlselectelement.rs, line 67 [r14] (raw file): components/script/dom/htmlselectelement.rs, line 73 [r14] (raw file): components/script/dom/htmlselectelement.rs, line 85 [r14] (raw file): Comments from the review on Reviewable.io |
|
Review status: 0 of 5 files reviewed at latest revision, 7 unresolved discussions, some commit checks pending. components/script/dom/htmlselectelement.rs, line 73 [r14] (raw file): Comments from the review on Reviewable.io |
|
Review status: 0 of 5 files reviewed at latest revision, 7 unresolved discussions, some commit checks pending. components/script/dom/htmlselectelement.rs, line 73 [r14] (raw file): Comments from the review on Reviewable.io |
|
Review status: 0 of 5 files reviewed at latest revision, 7 unresolved discussions, some commit checks pending. components/script/dom/htmlselectelement.rs, line 73 [r14] (raw file): Comments from the review on Reviewable.io |
|
components/script/dom/htmlselectelement.rs, line 73 [r14] (raw file): I disagree, I think they're both perfectly valid. Comments from the review on Reviewable.io |
|
Thanks for looking at this @eefriedman, I've been busy these past few days and haven't had time to review this. |
You're right. I'll narrow it a bit; "if let" is preferred over "match" for |
|
@frewsxcv @eefriedman okay to leave, or should I change it? |
|
Please change it. Also, please refactor the identical code in |
|
@eefriedman I'm not sure what identical code you're referring to; unless you mean the option element traversal in |
|
SetSelected:
bind_to_tree:
|
|
Err, oops, I meant SetSelected and bind_to_tree. |
- Use if let instead of match for Option - Refactor common code into pick_if_selected_and_reset
|
Thanks, done. Review status: 0 of 5 files reviewed at latest revision, 7 unresolved discussions, some commit checks pending. Comments from the review on Reviewable.io |
|
@bors-servo r+ |
|
|
Implement ask_for_reset for HTMLSelectElement. Fixes #7774 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7963) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
|
|
|
|
|
For future reference:
is not true. It is preferred only for (some) cases where only a single variant has code associated with it. |
dagnir commentedOct 10, 2015
Fixes #7774