servo: Merge #5437 - Remove some int/uints (from Ms2ger:int); r=jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 7d0d8514565d898123411ece56bfb09e578dbe1c
This commit is contained in:
Ms2ger 2015-03-29 03:49:01 -06:00
Родитель 6a9953cad1
Коммит 6e049e2b87
7 изменённых файлов: 12 добавлений и 16 удалений

Просмотреть файл

@ -72,9 +72,6 @@ pub struct FloatedBlockInfo {
/// box).
pub float_ceiling: Au,
/// Index into the fragment list for inline floats
pub index: Option<uint>,
/// Left or right?
pub float_kind: FloatKind,
}
@ -84,7 +81,6 @@ impl FloatedBlockInfo {
FloatedBlockInfo {
containing_inline_size: Au(0),
float_ceiling: Au(0),
index: None,
float_kind: float_kind,
}
}

Просмотреть файл

@ -88,7 +88,7 @@ impl ConstructionResult {
(*self).clone()
}
pub fn debug_id(&self) -> uint {
pub fn debug_id(&self) -> usize {
match self {
&ConstructionResult::None => 0u,
&ConstructionResult::ConstructionItem(_) => 0u,

Просмотреть файл

@ -86,7 +86,7 @@ pub struct SharedLayoutContext {
/// Starts at zero, and increased by one every time a layout completes.
/// This can be used to easily check for invalid stale data.
pub generation: uint,
pub generation: u32,
}
pub struct SharedLayoutContextWrapper(pub *const SharedLayoutContext);

Просмотреть файл

@ -991,9 +991,9 @@ impl BaseFlow {
&self.weak_ref_count
}
pub fn debug_id(&self) -> uint {
pub fn debug_id(&self) -> usize {
let p = self as *const _;
p as uint
p as usize
}
/// Ensures that all display list items generated by this flow are within the flow's overflow

Просмотреть файл

@ -107,7 +107,7 @@ pub struct LayoutTaskData {
/// Starts at zero, and increased by one every time a layout completes.
/// This can be used to easily check for invalid stale data.
pub generation: uint,
pub generation: u32,
/// A queued response for the union of the content boxes of a node.
pub content_box_response: Rect<Au>,

Просмотреть файл

@ -28,7 +28,7 @@ use std::mem;
/// Every time we do another layout, the old bloom filters are invalid. This is
/// detected by ticking a generation number every layout.
type Generation = uint;
type Generation = u32;
/// A pair of the bloom filter used for css selector matching, and the node to
/// which it applies. This is used to efficiently do `Descendant` selector

Просмотреть файл

@ -248,7 +248,7 @@ impl<'ln> LayoutNode<'ln> {
self.dump_indent(0);
}
fn dump_indent(self, indent: uint) {
fn dump_indent(self, indent: u32) {
let mut s = String::new();
for _ in range(0, indent) {
s.push_str(" ");
@ -267,10 +267,10 @@ impl<'ln> LayoutNode<'ln> {
self.type_id(), self.has_changed(), self.is_dirty(), self.has_dirty_descendants())
}
pub fn flow_debug_id(self) -> uint {
pub fn flow_debug_id(self) -> usize {
let layout_data_ref = self.borrow_layout_data();
match *layout_data_ref {
None => 0u,
None => 0,
Some(ref layout_data) => layout_data.data.flow_construction_result.debug_id()
}
}
@ -806,7 +806,7 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
self.node.debug_id()
}
pub fn flow_debug_id(self) -> uint {
pub fn flow_debug_id(self) -> usize {
self.node.flow_debug_id()
}
@ -1135,11 +1135,11 @@ pub trait PostorderNodeMutTraversal {
/// Opaque type stored in type-unsafe work queues for parallel layout.
/// Must be transmutable to and from LayoutNode/ThreadSafeLayoutNode.
pub type UnsafeLayoutNode = (uint, uint);
pub type UnsafeLayoutNode = (usize, usize);
pub fn layout_node_to_unsafe_layout_node(node: &LayoutNode) -> UnsafeLayoutNode {
unsafe {
let ptr: uint = mem::transmute_copy(node);
let ptr: usize = mem::transmute_copy(node);
(ptr, 0)
}
}