mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
parent
f5e97ef1b5
commit
9c11781880
20 changed files with 25 additions and 29 deletions
|
@ -707,7 +707,7 @@ impl<'a> FlowConstructor<'a> {
|
|||
style: &Arc<ComputedValues>) {
|
||||
// Fast path: If there is no text content, return immediately.
|
||||
let text_content = node.text_content();
|
||||
if text_content.len() == 0 {
|
||||
if text_content.is_empty() {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -571,8 +571,8 @@ impl<'ln> MatchMethods for LayoutNode<'ln> {
|
|||
&mut applicable_declarations.after);
|
||||
|
||||
*shareable = applicable_declarations.normal_shareable &&
|
||||
applicable_declarations.before.len() == 0 &&
|
||||
applicable_declarations.after.len() == 0
|
||||
applicable_declarations.before.is_empty() &&
|
||||
applicable_declarations.after.is_empty()
|
||||
}
|
||||
|
||||
unsafe fn share_style_if_possible(&self,
|
||||
|
|
|
@ -1238,7 +1238,7 @@ impl<'a> ImmutableFlowUtils for &'a (Flow + 'a) {
|
|||
|
||||
/// Returns true if this flow has no children.
|
||||
fn is_leaf(self) -> bool {
|
||||
base(self).children.len() == 0
|
||||
base(self).children.is_empty()
|
||||
}
|
||||
|
||||
/// Returns the number of children that this flow possesses.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue