mirror of
https://github.com/servo/servo.git
synced 2025-07-31 11:10:22 +01:00
Use isize for FragmentIndex.
This commit is contained in:
parent
2cc3c1d9c2
commit
232dadc81d
2 changed files with 4 additions and 4 deletions
|
@ -154,7 +154,7 @@ pub struct Line {
|
||||||
int_range_index! {
|
int_range_index! {
|
||||||
#[derive(RustcEncodable)]
|
#[derive(RustcEncodable)]
|
||||||
#[doc = "The index of a fragment in a flattened vector of DOM elements."]
|
#[doc = "The index of a fragment in a flattened vector of DOM elements."]
|
||||||
struct FragmentIndex(int)
|
struct FragmentIndex(isize)
|
||||||
}
|
}
|
||||||
|
|
||||||
bitflags! {
|
bitflags! {
|
||||||
|
@ -642,8 +642,8 @@ impl LineBreaker {
|
||||||
fn push_fragment_to_line(&mut self, layout_context: &LayoutContext, fragment: Fragment) {
|
fn push_fragment_to_line(&mut self, layout_context: &LayoutContext, fragment: Fragment) {
|
||||||
let indentation = self.indentation_for_pending_fragment();
|
let indentation = self.indentation_for_pending_fragment();
|
||||||
if self.pending_line_is_empty() {
|
if self.pending_line_is_empty() {
|
||||||
assert!(self.new_fragments.len() <= (u16::MAX as uint));
|
assert!(self.new_fragments.len() <= (u16::MAX as usize));
|
||||||
self.pending_line.range.reset(FragmentIndex(self.new_fragments.len() as int),
|
self.pending_line.range.reset(FragmentIndex(self.new_fragments.len() as isize),
|
||||||
FragmentIndex(0));
|
FragmentIndex(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@ impl ImageResponder<UntrustedNodeAddress> for LayoutImageResponder {
|
||||||
let script_chan = self.script_chan.clone();
|
let script_chan = self.script_chan.clone();
|
||||||
box move |_, node_address| {
|
box move |_, node_address| {
|
||||||
let ScriptControlChan(ref chan) = script_chan;
|
let ScriptControlChan(ref chan) = script_chan;
|
||||||
debug!("Dirtying {:x}", node_address.0 as uint);
|
debug!("Dirtying {:x}", node_address.0 as usize);
|
||||||
let mut nodes = SmallVec1::new();
|
let mut nodes = SmallVec1::new();
|
||||||
nodes.vec_push(node_address);
|
nodes.vec_push(node_address);
|
||||||
drop(chan.send(ConstellationControlMsg::SendEvent(
|
drop(chan.send(ConstellationControlMsg::SendEvent(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue