mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
layout: During inline layout, make place_between_floats
use the same
line height computation logic as final block size assignment. Improves Wikipedia.
This commit is contained in:
parent
51dd6984f7
commit
00a2685cbe
6 changed files with 143 additions and 51 deletions
|
@ -333,7 +333,9 @@ impl Floats {
|
|||
let maybe_location = self.available_rect(float_b,
|
||||
info.size.block,
|
||||
info.max_inline_size);
|
||||
debug!("place_float: Got available rect: {:?} for y-pos: {:?}", maybe_location, float_b);
|
||||
debug!("place_float: got available rect: {:?} for block-pos: {:?}",
|
||||
maybe_location,
|
||||
float_b);
|
||||
match maybe_location {
|
||||
// If there are no floats blocking us, return the current location
|
||||
// TODO(eatkinson): integrate with overflow
|
||||
|
@ -364,8 +366,8 @@ impl Floats {
|
|||
// Place here if there is enough room
|
||||
if rect.size.inline >= info.size.inline {
|
||||
let block_size = self.max_block_size_for_bounds(rect.start.i,
|
||||
rect.start.b,
|
||||
rect.size.inline);
|
||||
rect.start.b,
|
||||
rect.size.inline);
|
||||
let block_size = block_size.unwrap_or(Au(i32::MAX));
|
||||
return match info.kind {
|
||||
FloatKind::Left => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue