Auto merge of #5801 - Ms2ger:range, r=pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5801)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-04-22 18:24:21 -05:00
commit 43e664cda1
17 changed files with 27 additions and 28 deletions

View file

@ -23,7 +23,7 @@ pub fn start_transitions_if_applicable(new_animations_sender: &Sender<Animation>
node: OpaqueNode,
old_style: &ComputedValues,
new_style: &mut ComputedValues) {
for i in range(0, new_style.get_animation().transition_property.0.len()) {
for i in 0..new_style.get_animation().transition_property.0.len() {
// Create any property animations, if applicable.
let property_animations = PropertyAnimation::from_transition(i, old_style, new_style);
for property_animation in property_animations.into_iter() {

View file

@ -1199,7 +1199,7 @@ impl<'a> ImmutableFlowUtils for &'a (Flow + 'a) {
/// Dumps the flow tree for debugging, with a prefix to indicate that we're at the given level.
fn dump_with_level(self, level: u32) {
let mut indent = String::new();
for _ in range(0, level) {
for _ in 0..level {
indent.push_str("| ")
}

View file

@ -530,7 +530,7 @@ fn push_alphabetic_representation(mut value: i32, system: &[char], accumulator:
value = ((value as usize) / system.len()) as i32;
}
for i in range(0, string.len()).rev() {
for i in (0..string.len()).rev() {
accumulator.push(*string.get(i))
}
}

View file

@ -919,7 +919,7 @@ impl InlineFlow {
}
}
for fragment_index in range(line.range.begin(), line.range.end()) {
for fragment_index in line.range.begin()..line.range.end() {
let fragment = fragments.get_mut(fragment_index.to_usize());
let size = fragment.border_box.size;
fragment.border_box = LogicalRect::new(fragment.style.writing_mode,
@ -1008,7 +1008,7 @@ impl InlineFlow {
line_distance_from_flow_block_start: Au,
baseline_distance_from_block_start: Au,
largest_depth_below_baseline: Au) {
for fragment_index in range(line.range.begin(), line.range.end()) {
for fragment_index in line.range.begin()..line.range.end() {
// If any of the inline styles say `top` or `bottom`, adjust the vertical align
// appropriately.
//
@ -1224,7 +1224,7 @@ impl Flow for InlineFlow {
// Now, go through each line and lay out the fragments inside.
let mut line_distance_from_flow_block_start = Au(0);
let line_count = self.lines.len();
for line_index in range(0, line_count) {
for line_index in 0..line_count {
let line = &mut self.lines[line_index];
// Lay out fragments in the inline direction, and justify them if necessary.
@ -1248,7 +1248,7 @@ impl Flow for InlineFlow {
let (mut largest_block_size_for_top_fragments,
mut largest_block_size_for_bottom_fragments) = (Au(0), Au(0));
for fragment_index in range(line.range.begin(), line.range.end()) {
for fragment_index in line.range.begin()..line.range.end() {
let fragment = &mut self.fragments.fragments[fragment_index.to_usize()];
let InlineMetrics {

View file

@ -98,7 +98,7 @@ impl TableFlow {
let mut total_inline_sizes = IntrinsicISizes::new();
let mut column_index = 0;
for child_cell_inline_size in child_cell_inline_sizes.iter() {
for _ in range(0, child_cell_inline_size.column_span) {
for _ in 0..child_cell_inline_size.column_span {
if column_index < parent_inline_sizes.len() {
// We already have some intrinsic size information for this column. Merge it in
// according to the rules specified in INTRINSIC § 4.

View file

@ -73,7 +73,7 @@ impl Flow for TableColGroupFlow {
SpecificFragmentInfo::TableColumn(col_fragment) => max(col_fragment.span, 1),
_ => panic!("non-table-column fragment inside table column?!"),
};
for _ in range(0, span) {
for _ in 0..span {
self.inline_sizes.push(inline_size)
}
}

View file

@ -266,7 +266,7 @@ impl Flow for TableRowFlow {
};
// Add in computed inline sizes for any extra columns in the span.
for _ in range(1, cell_intrinsic_inline_size.column_span) {
for _ in 1..cell_intrinsic_inline_size.column_span {
let extra_column_computed_inline_size =
match column_computed_inline_size_iterator.next() {
Some(column_computed_inline_size) => column_computed_inline_size,

View file

@ -250,7 +250,7 @@ impl<'ln> LayoutNode<'ln> {
fn dump_indent(self, indent: u32) {
let mut s = String::new();
for _ in range(0, indent) {
for _ in 0..indent {
s.push_str(" ");
}