Repository navigation
Fire 'select' event in SetSelection{Start,End} - #19202
Conversation
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @emilio (or someone else) soon. |
| [onselect should fire when selectionStart is changed on input-appended-prefocused] | ||
| expected: NOTRUN | ||
| expected: PASS | ||
|
|
There was a problem hiding this comment.
If Pass, You can delete it directly
KiChjang
left a comment
There was a problem hiding this comment.
👍 Great start! I only have minor comments about adding comments ;). Once you've addressed them, you can r=me.
| self.textinput.borrow().selection_direction | ||
| } | ||
|
|
||
| fn set_selection_range(&self, start: u32, end: u32, direction: SelectionDirection) { |
There was a problem hiding this comment.
Let's add a spec link comment above this function (https://html.spec.whatwg.org/multipage/#set-the-selection-range).
| self.textinput.borrow_mut().selection_direction = direction; | ||
| self.textinput.borrow_mut().set_selection_range(start, end); | ||
| let window = window_from_node(self); | ||
| let _ = window.user_interaction_task_source().queue_event( |
There was a problem hiding this comment.
Let's also add step annotations for this function. For example, this particular line here follows step 6 of the linked algorithm (albeit incorrectly).
45f4483 to
f135348
Compare
|
Thanks, requested changes implemented |
|
r? @KiChjang |
| [selection-start-end.html] | ||
| type: testharness | ||
| expected: TIMEOUT | ||
| expected: OK |
There was a problem hiding this comment.
You can remove this line now.
|
Also, after you've made the changes, can you squash your commits into one, please? |
f135348 to
93b047a
Compare
|
Sure, done |
|
@bors-servo r+ Thanks! |
|
📌 Commit 93b047a has been approved by |
Fire 'select' event in SetSelection{Start,End}
See #19171.
<!-- 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/19202)
<!-- Reviewable:end -->
|
☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev |
See #19171.
This change is