mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove some unnecessary mutable references
This commit is contained in:
parent
520675b237
commit
344af248e7
1 changed files with 3 additions and 3 deletions
|
@ -376,7 +376,7 @@ impl LineBreaker {
|
||||||
/// Computes the position of a line that has only the provided fragment. Returns the bounding
|
/// Computes the position of a line that has only the provided fragment. Returns the bounding
|
||||||
/// rect of the line's green zone (whose origin coincides with the line's origin) and the actual
|
/// rect of the line's green zone (whose origin coincides with the line's origin) and the actual
|
||||||
/// width of the first fragment after splitting.
|
/// width of the first fragment after splitting.
|
||||||
fn initial_line_placement(&self, first_fragment: &Fragment, ceiling: Au, flow: &mut InlineFlow)
|
fn initial_line_placement(&self, first_fragment: &Fragment, ceiling: Au, flow: &InlineFlow)
|
||||||
-> (Rect<Au>, Au) {
|
-> (Rect<Au>, Au) {
|
||||||
debug!("LineBreaker: Trying to place first fragment of line {}", self.lines.len());
|
debug!("LineBreaker: Trying to place first fragment of line {}", self.lines.len());
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@ impl LineBreaker {
|
||||||
/// Returns false if and only if we should break the line.
|
/// Returns false if and only if we should break the line.
|
||||||
fn avoid_floats(&mut self,
|
fn avoid_floats(&mut self,
|
||||||
in_fragment: Fragment,
|
in_fragment: Fragment,
|
||||||
flow: &mut InlineFlow,
|
flow: &InlineFlow,
|
||||||
new_height: Au,
|
new_height: Au,
|
||||||
line_is_empty: bool)
|
line_is_empty: bool)
|
||||||
-> bool {
|
-> bool {
|
||||||
|
@ -511,7 +511,7 @@ impl LineBreaker {
|
||||||
|
|
||||||
/// Tries to append the given fragment to the line, splitting it if necessary. Returns false only if
|
/// Tries to append the given fragment to the line, splitting it if necessary. Returns false only if
|
||||||
/// we should break the line.
|
/// we should break the line.
|
||||||
fn try_append_to_line(&mut self, in_fragment: Fragment, flow: &mut InlineFlow) -> bool {
|
fn try_append_to_line(&mut self, in_fragment: Fragment, flow: &InlineFlow) -> bool {
|
||||||
let line_is_empty = self.pending_line.range.length() == num::zero();
|
let line_is_empty = self.pending_line.range.length() == num::zero();
|
||||||
if line_is_empty {
|
if line_is_empty {
|
||||||
let (line_bounds, _) = self.initial_line_placement(&in_fragment, self.cur_y, flow);
|
let (line_bounds, _) = self.initial_line_placement(&in_fragment, self.cur_y, flow);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue