Skip to content

Commit

Permalink
Fix doubling noncontent_height in float flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ILyoan committed Aug 19, 2013
1 parent c1d6137 commit a422d54
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/main/layout/float.rs
Expand Up @@ -185,7 +185,7 @@ impl FloatFlowData {
let mut height = Au(0);
let mut clearance = Au(0);
let mut full_noncontent_width = Au(0);
let mut full_noncontent_height = Au(0);
let mut margin_height = Au(0);

self.box.map(|&box| {
height = do box.with_base |base| {
Expand All @@ -201,18 +201,16 @@ impl FloatFlowData {
do box.with_base |base| {
let noncontent_width = base.model.padding.left + base.model.padding.right +
base.model.border.left + base.model.border.right;
let noncontent_height = base.model.padding.top + base.model.padding.bottom +
base.model.border.top + base.model.border.bottom;

full_noncontent_width = noncontent_width + base.model.margin.left + base.model.margin.right;
full_noncontent_height = noncontent_height + base.model.margin.top + base.model.margin.bottom;
margin_height = base.model.margin.top + base.model.margin.bottom;
}

});

let info = PlacementInfo {
width: self.common.position.size.width + full_noncontent_width,
height: height + full_noncontent_height,
height: height + margin_height,
ceiling: clearance,
max_width: self.containing_width,
f_type: self.float_type,
Expand Down

5 comments on commit a422d54

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from metajack
at ILyoan@a422d54

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging ILyoan/servo/acid1_margin = a422d54 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ILyoan/servo/acid1_margin = a422d54 merged ok, testing candidate = 30bfd3f

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 30bfd3f

Please sign in to comment.