diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2015-04-23 00:14:02 +0200 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2015-05-05 10:07:34 -0400 |
commit | ef8edd4e87aeb3cc71dfd9da2f69437080f5410e (patch) | |
tree | 9146cdd7126ead59c57cacbaa04eda0f16761f65 /components/layout/inline.rs | |
parent | 7b87085c1880c60aa3be5b3ec4572a0d93fd5537 (diff) | |
download | servo-ef8edd4e87aeb3cc71dfd9da2f69437080f5410e.tar.gz servo-ef8edd4e87aeb3cc71dfd9da2f69437080f5410e.zip |
Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.
Diffstat (limited to 'components/layout/inline.rs')
-rw-r--r-- | components/layout/inline.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/components/layout/inline.rs b/components/layout/inline.rs index 8c0d5723695..82a236ac001 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -25,8 +25,6 @@ use gfx::text::text_run::TextRun; use std::cmp::max; use std::fmt; use std::mem; -use std::num::ToPrimitive; -use std::ops::{Add, Sub, Mul, Div, Rem, Neg, Shl, Shr, Not, BitOr, BitAnd, BitXor}; use std::sync::Arc; use std::u16; use style::computed_values::{display, overflow_x, text_align, text_justify, text_overflow}; @@ -38,8 +36,8 @@ use util::range::{Range, RangeIndex}; use util; // From gfxFontConstants.h in Firefox -static FONT_SUBSCRIPT_OFFSET_RATIO: f64 = 0.20; -static FONT_SUPERSCRIPT_OFFSET_RATIO: f64 = 0.34; +static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20; +static FONT_SUPERSCRIPT_OFFSET_RATIO: f32 = 0.34; /// `Line`s are represented as offsets into the child list, rather than /// as an object that "owns" fragments. Choosing a different set of line @@ -928,7 +926,7 @@ impl InlineFlow { text_align::T::left | text_align::T::right => unreachable!() } - for fragment_index in line.range.begin()..line.range.end() { + for fragment_index in line.range.each_index() { let fragment = fragments.get_mut(fragment_index.to_usize()); let size = fragment.border_box.size; fragment.border_box = LogicalRect::new(fragment.style.writing_mode, @@ -1017,7 +1015,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 line.range.begin()..line.range.end() { + for fragment_index in line.range.each_index() { // If any of the inline styles say `top` or `bottom`, adjust the vertical align // appropriately. // @@ -1295,7 +1293,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 line.range.begin()..line.range.end() { + for fragment_index in line.range.each_index() { let fragment = &mut self.fragments.fragments[fragment_index.to_usize()]; let InlineMetrics { |