mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -272,7 +272,14 @@ impl<'a> TextRun {
|
|||
})
|
||||
}
|
||||
|
||||
/// Returns the index of the first glyph run containing the given byte index.
|
||||
pub fn minimum_splittable_inline_size(&self, range: &Range<ByteIndex>) -> Au {
|
||||
match self.natural_word_slices_in_range(range).next() {
|
||||
None => Au(0),
|
||||
Some(slice) => self.advance_for_range(&slice.range),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the index of the first glyph run containing the given character index.
|
||||
fn index_of_first_glyph_run_containing(&self, index: ByteIndex) -> Option<usize> {
|
||||
let self_ptr = self as *const TextRun;
|
||||
INDEX_OF_FIRST_GLYPH_RUN_CACHE.with(|index_of_first_glyph_run_cache| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue