servo/components/layout
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
..
animation.rs Move AnimationState to script_traits 2016-01-13 18:14:12 -05:00
block.rs layout: Translate floats flowing out of blocks to compensate for inline 2016-04-28 10:25:49 -07:00
Cargo.toml Simplify TOML syntax 2016-04-26 23:51:36 +02:00
construct.rs Do not render the contents of block-level replaced elements. 2016-04-22 22:24:09 -07:00
context.rs ComputedValues is now ServoComputedValues 2016-03-27 10:55:43 +03:00
data.rs Get the fundamentals of the HTMLDetailsElement rendering stuff working. 2016-03-19 16:02:11 -07:00
display_list_builder.rs Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton 2016-04-28 20:22:09 -07:00
flex.rs Implement flexbox reordering 2016-04-11 16:55:16 -04:00
floats.rs layout: Reset the speculated inline size of floats out to compensate for 2016-04-28 10:25:49 -07:00
flow.rs Rename imm_child_iter() and child_iter(). Fixes #10286 2016-04-09 01:18:00 +05:30
flow_list.rs Add support for vertical alignment within table cells. 2016-04-20 14:40:02 -07:00
flow_ref.rs Remove explicit lifetimes which can be elided. 2015-10-21 01:27:48 +02:00
fragment.rs Use byte indices instead of char indices for text runs 2016-04-28 14:32:14 -07:00
generated_content.rs Implement ::selection pseudo-element 2016-03-30 14:28:11 +02:00
incremental.rs Add style property for flex-basis 2016-04-24 14:04:40 -04:00
inline.rs Auto merge of #10320 - malayaleecoder:master, r=KiChjang 2016-04-09 03:54:40 +05:30
layout_debug.rs Update to rustc 1.7.0-nightly (b4707ebca 2015-12-27) 2016-01-14 14:56:18 -06:00
layout_thread.rs Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
lib.rs Remove references to unused crates. 2016-04-22 22:20:06 +02:00
list_item.rs Renamed TComputedValues to ComputedValues 2016-03-29 23:30:13 +03:00
model.rs Add support for vertical alignment within table cells. 2016-04-20 14:40:02 -07:00
multicol.rs Renamed TComputedValues to ComputedValues 2016-03-29 23:30:13 +03:00
opaque_node.rs use self.0 instead of destructing single item tuple structs 2016-03-27 11:50:08 +01:00
parallel.rs Rename imm_child_iter() and child_iter(). Fixes #10286 2016-04-09 01:18:00 +05:30
persistent_list.rs Move util::persistent_list to layout 2016-02-20 19:20:38 +01:00
query.rs Implement ScrollTop and ScrollLeft getters: 2016-04-19 12:27:35 +08:00
sequential.rs Merge DisplayListEntry into DisplayItem 2016-04-22 10:28:27 -07:00
table.rs Rename imm_child_iter() and child_iter(). Fixes #10286 2016-04-09 01:18:00 +05:30
table_caption.rs Renamed TComputedValues to ComputedValues 2016-03-29 23:30:13 +03:00
table_cell.rs Add support for vertical alignment within table cells. 2016-04-20 14:40:02 -07:00
table_colgroup.rs Renamed TComputedValues to ComputedValues 2016-03-29 23:30:13 +03:00
table_row.rs Rename imm_child_iter() and child_iter(). Fixes #10286 2016-04-09 01:18:00 +05:30
table_rowgroup.rs Renamed TComputedValues to ComputedValues 2016-03-29 23:30:13 +03:00
table_wrapper.rs Rename imm_child_iter() and child_iter(). Fixes #10286 2016-04-09 01:18:00 +05:30
text.rs Use byte indices instead of char indices for text runs 2016-04-28 14:32:14 -07:00
traversal.rs Move '&&' to the end of the previous line. 2016-04-22 14:28:18 +02:00
webrender_helpers.rs Use byte indices instead of char indices for text runs 2016-04-28 14:32:14 -07:00
wrapper.rs Replace range::Range with std::ops::Range in script 2016-04-28 14:54:07 -07:00