mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Stop using u/i suffixes in layout.
This commit is contained in:
parent
7fabf6071e
commit
a65c80231a
4 changed files with 5 additions and 6 deletions
|
@ -92,8 +92,8 @@ impl ConstructionResult {
|
||||||
|
|
||||||
pub fn debug_id(&self) -> usize {
|
pub fn debug_id(&self) -> usize {
|
||||||
match self {
|
match self {
|
||||||
&ConstructionResult::None => 0u,
|
&ConstructionResult::None => 0,
|
||||||
&ConstructionResult::ConstructionItem(_) => 0u,
|
&ConstructionResult::ConstructionItem(_) => 0,
|
||||||
&ConstructionResult::Flow(ref flow_ref, _) => flow::base(&**flow_ref).debug_id(),
|
&ConstructionResult::Flow(ref flow_ref, _) => flow::base(&**flow_ref).debug_id(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1601,7 +1601,7 @@ impl Fragment {
|
||||||
let inline_end_fragment_text =
|
let inline_end_fragment_text =
|
||||||
text_fragment_info.run.text.slice_chars(inline_end_range.begin().to_usize(),
|
text_fragment_info.run.text.slice_chars(inline_end_range.begin().to_usize(),
|
||||||
inline_end_range.end().to_usize());
|
inline_end_range.end().to_usize());
|
||||||
let mut leading_whitespace_character_count = 0i;
|
let mut leading_whitespace_character_count = 0;
|
||||||
for ch in inline_end_fragment_text.chars() {
|
for ch in inline_end_fragment_text.chars() {
|
||||||
if ch.is_whitespace() {
|
if ch.is_whitespace() {
|
||||||
leading_whitespace_character_count += 1
|
leading_whitespace_character_count += 1
|
||||||
|
@ -2128,7 +2128,7 @@ pub enum CoordinateSystem {
|
||||||
fn strip_trailing_whitespace(text_run: &TextRun, range: &mut Range<CharIndex>) -> bool {
|
fn strip_trailing_whitespace(text_run: &TextRun, range: &mut Range<CharIndex>) -> bool {
|
||||||
// FIXME(pcwalton): Is there a more clever (i.e. faster) way to do this?
|
// FIXME(pcwalton): Is there a more clever (i.e. faster) way to do this?
|
||||||
let text = text_run.text.slice_chars(range.begin().to_usize(), range.end().to_usize());
|
let text = text_run.text.slice_chars(range.begin().to_usize(), range.end().to_usize());
|
||||||
let mut trailing_whitespace_character_count = 0i;
|
let mut trailing_whitespace_character_count = 0;
|
||||||
for ch in text.chars().rev() {
|
for ch in text.chars().rev() {
|
||||||
if ch.is_whitespace() {
|
if ch.is_whitespace() {
|
||||||
trailing_whitespace_character_count += 1
|
trailing_whitespace_character_count += 1
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#![feature(box_syntax)]
|
#![feature(box_syntax)]
|
||||||
#![feature(collections)]
|
#![feature(collections)]
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
#![feature(int_uint)]
|
|
||||||
#![feature(io)]
|
#![feature(io)]
|
||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
|
|
|
@ -104,7 +104,7 @@ fn insert_ancestors_into_bloom_filter(bf: &mut Box<BloomFilter>,
|
||||||
mut n: LayoutNode,
|
mut n: LayoutNode,
|
||||||
layout_context: &LayoutContext) {
|
layout_context: &LayoutContext) {
|
||||||
debug!("[{}] Inserting ancestors.", tid());
|
debug!("[{}] Inserting ancestors.", tid());
|
||||||
let mut ancestors = 0u;
|
let mut ancestors = 0;
|
||||||
loop {
|
loop {
|
||||||
ancestors += 1;
|
ancestors += 1;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue