-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #5603, added support for tabindex field #5858
Conversation
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 |
7d2d648
to
5d25df4
Compare
updated and squashed, r+? |
I'm partway through reviewing this. |
☔ The latest upstream changes (presumably #5888) made this pull request unmergeable. Please resolve the merge conflicts. |
5d25df4
to
d0b5b87
Compare
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 |
0d25b40
to
286338c
Compare
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 -->
💔 Test failed - mac1 |
|
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). |
20df02a
to
078f3ae
Compare
df56a58
to
89529b8
Compare
89529b8
to
1c96eed
Compare
@bors-servo: r+ |
📌 Commit 1c96eed has been approved by |
⌛ Testing commit 1c96eed with merge fada391... |
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 -->
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.