servo/components/util
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
..
cache.rs Upgrade to new Hasher API 2016-02-03 20:06:39 +01:00
Cargo.toml Auto merge of #10857 - servo:toml, r=nox 2016-04-26 15:46:37 -07:00
debug_utils.rs Issue #9042: Report incorrect number of spaces around => in the style checker. 2015-12-23 20:54:26 +01:00
geometry.rs Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +01:00
ipc.rs Update ipc-channel to pick up the improved error reporting. 2015-11-23 16:38:39 -08:00
lib.rs Auto merge of #10847 - servo:rustup-20160424, r=nox 2016-04-26 14:41:54 -07:00
linked_list.rs util: Remove the old broken SerializableLinkedList code in favor of 2015-07-31 08:42:29 -07:00
non_geckolib.rs Say farewell to in-tree HeapSizeOf 2016-02-04 22:03:32 +01:00
opts.rs Add a method for dumping self-contained HTML timeline profiles 2016-04-27 18:35:17 -07:00
panicking.rs Communicate a backtrace to the constellation when panicking. 2016-04-26 11:31:36 -05:00
prefs.rs Share prefs to content processes 2016-04-12 09:26:30 +02:00
print_tree.rs Flatten display list structure 2016-03-01 14:50:07 -08:00
resource_files.rs Remove references to unused crates. 2016-04-22 22:20:06 +02:00
str.rs Use byte indices instead of char indices for text runs 2016-04-28 14:32:14 -07:00
thread.rs Communicate a backtrace to the constellation when panicking. 2016-04-26 11:31:36 -05:00
thread_state.rs task -> thread 2016-01-10 17:58:13 +09:00
tid.rs task -> thread 2016-01-10 17:58:13 +09:00
time.rs Use thread::sleep instead of deprecated sleep_ms 2015-11-29 13:41:04 -07:00
vec.rs Remove util::vec::Comparator 2016-03-01 14:28:16 +01:00
workqueue.rs Switch to external deque crate 2016-02-17 11:05:37 -05:00