Files
servo/components/script/dom
bors-servo f24f517965 Auto merge of #23272 - tdelacour:ISSUE-20455, r=SimonSapin
ISSUE-20455: introduce stronger types for textinput indexing

<!-- Please describe your changes on the following line: -->
Added two new types:
- ByteOffset
- UTF16CodeUnitOffset

I've replaced any instance of `usize` that would be better represented by one or the other of these. I also updated any downstream code, including the unit tests for `textinput.rs`. Along the way, I tried to add or edit comments to better reflect my understanding of this file - happy to revisit if I have misrepresented anything.

I did not end up finding any places where types were very obviously being mixed, as the issue description suggested I should do... LMK if I should re-audit the file for that (might need a bit of guidance)!

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #20455 (GitHub issue number if applicable)

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/23272)
<!-- Reviewable:end -->
2019-05-23 12:01:29 -04:00
..
2019-05-19 22:14:28 +02:00
2019-03-10 17:51:35 +01:00
2019-05-10 22:43:43 -04:00
2019-04-25 11:37:35 +02:00
2019-04-30 16:54:52 -07:00
2019-04-30 16:54:52 -07:00
2019-05-10 22:43:43 -04:00
2019-04-25 11:37:35 +02:00
2019-05-13 14:17:12 -04:00
2018-11-19 14:47:12 +01:00
2019-05-10 22:43:43 -04:00
2018-11-19 14:47:12 +01:00
2018-11-19 14:47:12 +01:00
2019-05-07 12:56:10 +02:00
2019-03-26 09:39:07 +02:00
2019-05-10 22:43:43 -04:00
2019-05-10 22:43:43 -04:00
2018-11-19 14:47:12 +01:00
2019-05-10 22:43:43 -04:00
2019-03-10 17:51:35 +01:00
2019-01-23 00:38:44 +08:00
2019-01-23 00:38:44 +08:00
2019-05-10 22:43:43 -04:00
2019-03-10 17:51:35 +01:00
2019-04-19 16:50:38 -07:00
2019-04-25 11:37:35 +02:00
2019-03-10 17:51:35 +01:00
2019-05-10 15:03:19 +02:00
2019-04-25 11:37:35 +02:00
2018-11-19 14:47:12 +01:00
2019-05-10 22:43:43 -04:00
2019-04-19 16:50:38 -07:00
2019-01-29 11:37:00 -08:00
2019-05-08 08:15:01 -07:00
2018-11-27 17:33:13 -08:00
2019-04-26 12:00:26 +02:00
2019-04-30 16:54:52 -07:00
2019-01-04 15:27:23 +01:00
2019-04-25 11:37:35 +02:00
2018-11-19 14:47:12 +01:00
2019-01-04 15:27:23 +01:00
2019-03-10 17:51:35 +01:00
2019-01-10 22:43:29 +08:00
2018-11-19 14:47:12 +01:00
2019-05-10 22:43:43 -04:00
2019-05-10 22:43:43 -04:00
2019-05-10 22:43:43 -04:00
2019-04-25 11:37:35 +02:00
2019-04-04 17:22:08 -07:00
2019-01-03 23:53:50 -08:00
2019-05-03 18:46:31 -07:00
2019-05-03 18:46:31 -07:00
2019-03-26 00:09:15 -07:00
2019-01-03 23:53:50 -08:00