Skip to content

Commit

Permalink
Fix rebase fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Atkinson committed Jul 12, 2013
1 parent a6f6ce9 commit 7b933ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/main/layout/float_context.rs
Expand Up @@ -250,7 +250,7 @@ impl FloatContextBase{

/// Returns true if the given rect overlaps with any floats.
fn collides_with_float(&self, bounds: &Rect<Au>) -> bool {
for self.float_data.each |float| {
for self.float_data.iter().advance |float| {
match *float{
None => (),
Some(data) => {
Expand Down
14 changes: 7 additions & 7 deletions src/components/main/layout/inline.rs
Expand Up @@ -350,7 +350,7 @@ impl LineboxScanner {
}
self.pending_line.range.extend_by(1);
self.pending_line.bounds.size.width = self.pending_line.bounds.size.width + box.position().size.width;
self.pending_line.available_width -= box.position().size.width;
self.pending_line.available_width = self.pending_line.available_width - box.position().size.width;
self.pending_line.bounds.size.height = Au::max(self.pending_line.bounds.size.height,
box.position().size.height);
self.new_boxes.push(box);
Expand Down Expand Up @@ -497,7 +497,7 @@ impl InlineFlowData {
self.common.floats_out = scanner.floats_out();

// Now, go through each line and lay out the boxes inside
for self.lines.eachi |i, line| {
for self.lines.iter().advance |line| {
// We need to distribute extra width based on text-align.
let mut slack_width = line.available_width;
if slack_width < Au(0) {
Expand Down Expand Up @@ -526,25 +526,25 @@ impl InlineFlowData {
for line.range.eachi |i| {
do self.boxes[i].with_mut_base |base| {
base.position.origin.x = offset_x;
offset_x += base.position.size.width;
offset_x = offset_x + base.position.size.width;
}
}
}
CSSTextAlignCenter => {
offset_x += slack_width.scale_by(0.5f);
offset_x = offset_x + slack_width.scale_by(0.5f);
for line.range.eachi |i| {
do self.boxes[i].with_mut_base |base| {
base.position.origin.x = offset_x;
offset_x += base.position.size.width;
offset_x = offset_x + base.position.size.width;
}
}
}
CSSTextAlignRight => {
offset_x += slack_width;
offset_x = offset_x + slack_width;
for line.range.eachi |i| {
do self.boxes[i].with_mut_base |base| {
base.position.origin.x = offset_x;
offset_x += base.position.size.width;
offset_x = offset_x + base.position.size.width;
}
}
}
Expand Down

0 comments on commit 7b933ac

Please sign in to comment.