mirror of
https://github.com/servo/servo.git
synced 2025-07-25 16:20:36 +01:00
layout: Fix warnings.
This commit is contained in:
parent
648b4991b9
commit
7934bf294d
2 changed files with 4 additions and 4 deletions
|
@ -723,7 +723,7 @@ impl<'a> GlyphStore {
|
||||||
for index in range.each_index() {
|
for index in range.each_index() {
|
||||||
// TODO(pcwalton): Handle spaces that are detailed glyphs -- these are uncommon but
|
// TODO(pcwalton): Handle spaces that are detailed glyphs -- these are uncommon but
|
||||||
// possible.
|
// possible.
|
||||||
let mut entry = &mut self.entry_buffer[index.to_uint()];
|
let entry = &mut self.entry_buffer[index.to_uint()];
|
||||||
if entry.is_simple() && entry.char_is_space() {
|
if entry.is_simple() && entry.char_is_space() {
|
||||||
// FIXME(pcwalton): This can overflow for very large font-sizes.
|
// FIXME(pcwalton): This can overflow for very large font-sizes.
|
||||||
let advance =
|
let advance =
|
||||||
|
|
|
@ -547,7 +547,7 @@ impl LineBreaker {
|
||||||
/// Tries to append the given fragment to the line, splitting it if necessary. Returns true if
|
/// Tries to append the given fragment to the line, splitting it if necessary. Returns true if
|
||||||
/// we successfully pushed the fragment to the line or false if we couldn't.
|
/// we successfully pushed the fragment to the line or false if we couldn't.
|
||||||
fn append_fragment_to_line_if_possible(&mut self,
|
fn append_fragment_to_line_if_possible(&mut self,
|
||||||
mut fragment: Fragment,
|
fragment: Fragment,
|
||||||
flow: &InlineFlow,
|
flow: &InlineFlow,
|
||||||
layout_context: &LayoutContext,
|
layout_context: &LayoutContext,
|
||||||
flags: InlineReflowFlags)
|
flags: InlineReflowFlags)
|
||||||
|
@ -623,12 +623,12 @@ impl LineBreaker {
|
||||||
// Push the first fragment onto the line we're working on and start off the next line with
|
// Push the first fragment onto the line we're working on and start off the next line with
|
||||||
// the second fragment. If there's no second fragment, the next line will start off empty.
|
// the second fragment. If there's no second fragment, the next line will start off empty.
|
||||||
match (inline_start_fragment, inline_end_fragment) {
|
match (inline_start_fragment, inline_end_fragment) {
|
||||||
(Some(inline_start_fragment), Some(mut inline_end_fragment)) => {
|
(Some(inline_start_fragment), Some(inline_end_fragment)) => {
|
||||||
self.push_fragment_to_line(layout_context, inline_start_fragment);
|
self.push_fragment_to_line(layout_context, inline_start_fragment);
|
||||||
self.flush_current_line();
|
self.flush_current_line();
|
||||||
self.work_list.push_front(inline_end_fragment)
|
self.work_list.push_front(inline_end_fragment)
|
||||||
},
|
},
|
||||||
(Some(mut fragment), None) => {
|
(Some(fragment), None) => {
|
||||||
self.push_fragment_to_line(layout_context, fragment);
|
self.push_fragment_to_line(layout_context, fragment);
|
||||||
}
|
}
|
||||||
(None, Some(_)) => debug_assert!(false, "un-normalized split result"),
|
(None, Some(_)) => debug_assert!(false, "un-normalized split result"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue