mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
layout: Don't pretend inline fragment sizes are zero when placing them
between floats.
This commit is contained in:
parent
94306cd183
commit
8823f87276
3 changed files with 20 additions and 2 deletions
|
@ -1471,6 +1471,17 @@ impl Fragment {
|
|||
result
|
||||
}
|
||||
|
||||
/// Returns the narrowest inline-size that the first splittable part of this fragment could
|
||||
/// possibly be split to. (In most cases, this returns the inline-size of the first word in
|
||||
/// this fragment.)
|
||||
pub fn minimum_splittable_inline_size(&self) -> Au {
|
||||
match self.specific {
|
||||
SpecificFragmentInfo::ScannedText(ref text) => {
|
||||
text.run.minimum_splittable_inline_size(&text.range)
|
||||
}
|
||||
_ => Au(0),
|
||||
}
|
||||
}
|
||||
|
||||
/// TODO: What exactly does this function return? Why is it Au(0) for
|
||||
/// `SpecificFragmentInfo::Generic`?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue