servo/components
bors-servo cf121ad8df Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton
Use byte indices instead of char indices for text runs

Replace character indices with UTF-8 byte offsets throughout all code dealing with text runs.  This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.

For most code this is just a simple replacement of char indices with byte indices.  In a few places like glyph storage and text fragment scanning, it also lets us get rid of code that existed only to map between bytes and chars.

Also includes some related fixes to text shaping, discovered while working on this conversion.  See the commit messages for details.

r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10895)
<!-- Reviewable:end -->
2016-04-28 20:22:09 -07:00
..
canvas Simplify TOML syntax 2016-04-26 23:51:36 +02:00
canvas_traits Simplify TOML syntax 2016-04-26 23:51:36 +02:00
compositing script: Make iframes know their pipeline IDs at all times, even after 2016-04-28 10:53:13 -07:00
devtools Simplify TOML syntax 2016-04-26 23:51:36 +02:00
devtools_traits Simplify TOML syntax 2016-04-26 23:51:36 +02:00
gfx Use byte indices instead of char indices for text runs 2016-04-28 14:32:14 -07:00
gfx_traits Simplify TOML syntax 2016-04-26 23:51:36 +02:00
layout Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton 2016-04-28 20:22:09 -07:00
layout_traits Simplify TOML syntax 2016-04-26 23:51:36 +02:00
msg Remove superfluous end-of-file whitespace. 2016-04-27 00:26:37 -04:00
net Auto merge of #10867 - danlrobertson:sandbox, r=KiChjang 2016-04-28 13:36:05 -07:00
net_traits Auto merge of #10867 - danlrobertson:sandbox, r=KiChjang 2016-04-28 13:36:05 -07:00
plugins Simplify TOML syntax 2016-04-26 23:51:36 +02:00
profile Add a method for dumping self-contained HTML timeline profiles 2016-04-27 18:35:17 -07:00
profile_traits Add a method for dumping self-contained HTML timeline profiles 2016-04-27 18:35:17 -07:00
range Use num-traits in range. 2016-04-20 14:59:05 +02:00
script Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton 2016-04-28 20:22:09 -07:00
script_traits script: Make iframes know their pipeline IDs at all times, even after 2016-04-28 10:53:13 -07:00
servo Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton 2016-04-28 20:22:09 -07:00
style Specialize text node style resolution so geckolib can avoid inheriting non-inherited structs. 2016-04-29 10:07:59 +10:00
style_traits Simplify TOML syntax 2016-04-26 23:51:36 +02:00
util Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton 2016-04-28 20:22:09 -07:00
webdriver_server Simplify TOML syntax 2016-04-26 23:51:36 +02:00