mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Use is_float.is_some() instead of !is_float.is_none().
This commit is contained in:
parent
a714e661ca
commit
c430e0b7e8
1 changed files with 3 additions and 3 deletions
|
@ -457,13 +457,13 @@ impl LayoutTreeBuilder {
|
||||||
let new_generator = match (display, &mut parent_generator.flow, sibling_flow) {
|
let new_generator = match (display, &mut parent_generator.flow, sibling_flow) {
|
||||||
// Floats
|
// Floats
|
||||||
(CSSDisplayBlock, & &BlockFlow(_), _) |
|
(CSSDisplayBlock, & &BlockFlow(_), _) |
|
||||||
(CSSDisplayBlock, & &FloatFlow(_), _) if !is_float.is_none() => {
|
(CSSDisplayBlock, & &FloatFlow(_), _) if is_float.is_some() => {
|
||||||
self.create_child_generator(node, parent_generator, Flow_Float(is_float.unwrap()))
|
self.create_child_generator(node, parent_generator, Flow_Float(is_float.unwrap()))
|
||||||
}
|
}
|
||||||
// If we're placing a float after an inline, append the float to the inline flow,
|
// If we're placing a float after an inline, append the float to the inline flow,
|
||||||
// then continue building from the inline flow in case there are more inlines
|
// then continue building from the inline flow in case there are more inlines
|
||||||
// afterward.
|
// afterward.
|
||||||
(CSSDisplayBlock, _, Some(&InlineFlow(_))) if !is_float.is_none() => {
|
(CSSDisplayBlock, _, Some(&InlineFlow(_))) if is_float.is_some() => {
|
||||||
let float_generator = self.create_child_generator(node,
|
let float_generator = self.create_child_generator(node,
|
||||||
sibling_generator.unwrap(),
|
sibling_generator.unwrap(),
|
||||||
Flow_Float(is_float.unwrap()));
|
Flow_Float(is_float.unwrap()));
|
||||||
|
@ -472,7 +472,7 @@ impl LayoutTreeBuilder {
|
||||||
// This is a catch-all case for when:
|
// This is a catch-all case for when:
|
||||||
// a) sibling_flow is None
|
// a) sibling_flow is None
|
||||||
// b) sibling_flow is a BlockFlow
|
// b) sibling_flow is a BlockFlow
|
||||||
(CSSDisplayBlock, & &InlineFlow(_), _) if !is_float.is_none() => {
|
(CSSDisplayBlock, & &InlineFlow(_), _) if is_float.is_some() => {
|
||||||
self.create_child_generator(node, parent_generator, Flow_Float(is_float.unwrap()))
|
self.create_child_generator(node, parent_generator, Flow_Float(is_float.unwrap()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue