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 upfixes #5603, added support for tabindex field #5858
Conversation
hoppipolla-critic-bot
commented
Apr 26, 2015
|
Critic review: https://critic.hoppipolla.co.uk/r/4808 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
|
updated and squashed, r+? |
|
I'm partway through reviewing this. |
|
|
|
Ok, this generally looks good, but there are a few subtleties that I don't think we're dealing with. The flag should be updated whenever the value of tabindex or draggable is updated/removed (we'll need a before_remove_attr method too, as mentioned in one of my comments). I think we should extract all of the checks from after_set_attr/bind_to_tree into a helper method named udpate_sequentially_focusable_status, which gets called from after_set_attr/before_remove_attr and takes arguments for the presence/values of tabindex/draggable. Does that make sense? -S-awaiting-review +S-needs-code-changes Reviewed files:
components/script/dom/htmlelement.rs, line 239 [r3] (raw file): components/script/dom/htmlelement.rs, line 240 [r3] (raw file): components/script/dom/htmlelement.rs, line 241 [r3] (raw file): components/script/dom/htmlelement.rs, line 248 [r3] (raw file): components/script/dom/htmlelement.rs, line 249 [r3] (raw file): components/script/dom/htmlelement.rs, line 250 [r3] (raw file): components/script/dom/htmlelement.rs, line 258 [r3] (raw file): components/script/dom/htmlelement.rs, line 263 [r3] (raw file): components/script/dom/htmlelement.rs, line 267 [r3] (raw file): components/script/dom/node.rs, line 162 [r5] (raw file): Comments from the review on Reviewable.io |
|
@jdm How does that look? I extracted all the logic out into one method that works for both default values if no tabindex flag is present or if a flag is added/removed |
|
@jdm r? |
|
Sorry, I've started reviewing this several times and realized that I didn't have enough time to think carefully about how all the parts fit together. I'll have a review finished before Wednesday. |
|
No problem! Take your time no worries. |
|
Sorry about the delay! Reviewed files:
components/script/dom/htmlelement.rs, line 82 [r6] (raw file): components/script/dom/htmlelement.rs, line 83 [r6] (raw file): components/script/dom/htmlelement.rs, line 95 [r6] (raw file): components/script/dom/htmlelement.rs, line 99 [r6] (raw file): components/script/dom/htmlelement.rs, line 113 [r6] (raw file): components/script/dom/htmlelement.rs, line 266 [r6] (raw file): Comments from the review on Reviewable.io |
|
I added the new virtual method after_remove_attr do In VirtualMethods.rs do I need to implement/class this somewhere else other than htmlelement.rs? |
|
I don't think so. |
|
Oh, I wasn't thinking - this will need to be called (just like before_remove_attr) from element.rs. -S-awaiting-review -S-needs-rebase +S-needs-code-changes Reviewed files:
Comments from the review on Reviewable.io |
Added support for the tabindex field, also added its correct defaults (-2 TODOs for things not supported in Servo yet). Also added tabindex logic into Element::is_focusable_area. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5858) <!-- Reviewable:end -->
|
|
|
|
This is supposed to PASS now, how can I change that? |
|
Modify the contents of http://mxr.mozilla.org/servo/source/tests/wpt/metadata/html/semantics/disabled-elements/disabledElement.html.ini and http://mxr.mozilla.org/servo/source/tests/wpt/metadata/html/semantics/selectors/pseudo-classes/focus.html.ini (and remove any "expected: PASS" statements, or the whole file if there are no remaining failures). |
df56a58
to
89529b8
|
@bors-servo: r+ |
|
|
|
|
Added support for the tabindex field, also added its correct defaults (-2 TODOs for things not supported in Servo yet). Also added tabindex logic into Element::is_focusable_area. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5858) <!-- Reviewable:end -->
pgonda commentedApr 26, 2015
Added support for the tabindex field, also added its correct defaults (-2 TODOs for things not supported in Servo yet). Also added tabindex logic into Element::is_focusable_area.