Skip to content

Commit

Permalink
auto merge of #5437 : Ms2ger/servo/int, r=jdm
Browse files Browse the repository at this point in the history
  • Loading branch information
bors-servo committed Mar 29, 2015
2 parents 4cf76d6 + 9904216 commit 7d0d851
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
4 changes: 0 additions & 4 deletions components/layout/block.rs
Expand Up @@ -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,
}
Expand All @@ -84,7 +81,6 @@ impl FloatedBlockInfo {
FloatedBlockInfo {
containing_inline_size: Au(0),
float_ceiling: Au(0),
index: None,
float_kind: float_kind,
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/layout/construct.rs
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion components/layout/context.rs
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions components/layout/flow.rs
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/layout/layout_task.rs
Expand Up @@ -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>,
Expand Down
2 changes: 1 addition & 1 deletion components/layout/traversal.rs
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions components/layout/wrapper.rs
Expand Up @@ -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(" ");
Expand All @@ -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()
}
}
Expand Down Expand Up @@ -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()
}

Expand Down Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 7d0d851

Please sign in to comment.