mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fix doubling noncontent_height in float flow
This commit is contained in:
parent
c1d6137418
commit
a422d548b9
1 changed files with 3 additions and 5 deletions
|
@ -185,7 +185,7 @@ impl FloatFlowData {
|
||||||
let mut height = Au(0);
|
let mut height = Au(0);
|
||||||
let mut clearance = Au(0);
|
let mut clearance = Au(0);
|
||||||
let mut full_noncontent_width = 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| {
|
self.box.map(|&box| {
|
||||||
height = do box.with_base |base| {
|
height = do box.with_base |base| {
|
||||||
|
@ -201,18 +201,16 @@ impl FloatFlowData {
|
||||||
do box.with_base |base| {
|
do box.with_base |base| {
|
||||||
let noncontent_width = base.model.padding.left + base.model.padding.right +
|
let noncontent_width = base.model.padding.left + base.model.padding.right +
|
||||||
base.model.border.left + base.model.border.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_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 {
|
let info = PlacementInfo {
|
||||||
width: self.common.position.size.width + full_noncontent_width,
|
width: self.common.position.size.width + full_noncontent_width,
|
||||||
height: height + full_noncontent_height,
|
height: height + margin_height,
|
||||||
ceiling: clearance,
|
ceiling: clearance,
|
||||||
max_width: self.containing_width,
|
max_width: self.containing_width,
|
||||||
f_type: self.float_type,
|
f_type: self.float_type,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue