mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove the unused boolean in StyleSharingResult::CannotShare.
This commit is contained in:
parent
f3faaa6b01
commit
843629b29f
2 changed files with 24 additions and 19 deletions
|
@ -173,24 +173,30 @@ impl<'a> PreorderDomTraversal for RecalcStyleForNode<'a> {
|
|||
parent_opt.clone())
|
||||
}
|
||||
},
|
||||
None => StyleSharingResult::CannotShare(false),
|
||||
None => StyleSharingResult::CannotShare,
|
||||
};
|
||||
|
||||
// Otherwise, match and cascade selectors.
|
||||
match sharing_result {
|
||||
StyleSharingResult::CannotShare(mut shareable) => {
|
||||
StyleSharingResult::CannotShare => {
|
||||
let mut applicable_declarations = ApplicableDeclarations::new();
|
||||
|
||||
if let Some(element) = node.as_element() {
|
||||
// Perform the CSS selector matching.
|
||||
let stylist = unsafe { &*self.layout_context.shared.stylist };
|
||||
shareable = element.match_element(stylist,
|
||||
Some(&*bf),
|
||||
&mut applicable_declarations);
|
||||
} else if node.has_changed() {
|
||||
ThreadSafeLayoutNode::new(&node).set_restyle_damage(
|
||||
incremental::rebuild_and_reflow())
|
||||
}
|
||||
let shareable = match node.as_element() {
|
||||
Some(element) => {
|
||||
// Perform the CSS selector matching.
|
||||
let stylist = unsafe { &*self.layout_context.shared.stylist };
|
||||
element.match_element(stylist,
|
||||
Some(&*bf),
|
||||
&mut applicable_declarations)
|
||||
},
|
||||
None => {
|
||||
if node.has_changed() {
|
||||
ThreadSafeLayoutNode::new(&node).set_restyle_damage(
|
||||
incremental::rebuild_and_reflow())
|
||||
}
|
||||
false
|
||||
},
|
||||
};
|
||||
|
||||
// Perform the CSS cascade.
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue