mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Eliminate warnings
This commit is contained in:
parent
2f46b9aede
commit
dc86e83654
57 changed files with 223 additions and 221 deletions
|
@ -464,7 +464,7 @@ impl<'ln> MatchMethods for LayoutNode<'ln> {
|
|||
Some(shared_style) => {
|
||||
// Yay, cache hit. Share the style.
|
||||
let mut layout_data_ref = self.mutate_layout_data();
|
||||
layout_data_ref.get_mut_ref().shared_data.style = Some(shared_style);
|
||||
layout_data_ref.as_mut().unwrap().shared_data.style = Some(shared_style);
|
||||
return StyleWasShared(i)
|
||||
}
|
||||
None => {}
|
||||
|
@ -622,14 +622,14 @@ impl<'ln> MatchMethods for LayoutNode<'ln> {
|
|||
applicable_declarations_cache,
|
||||
applicable_declarations.normal_shareable);
|
||||
if applicable_declarations.before.len() > 0 {
|
||||
self.cascade_node_pseudo_element(Some(layout_data.shared_data.style.get_ref()),
|
||||
self.cascade_node_pseudo_element(Some(layout_data.shared_data.style.as_ref().unwrap()),
|
||||
applicable_declarations.before.as_slice(),
|
||||
&mut layout_data.data.before_style,
|
||||
applicable_declarations_cache,
|
||||
false);
|
||||
}
|
||||
if applicable_declarations.after.len() > 0 {
|
||||
self.cascade_node_pseudo_element(Some(layout_data.shared_data.style.get_ref()),
|
||||
self.cascade_node_pseudo_element(Some(layout_data.shared_data.style.as_ref().unwrap()),
|
||||
applicable_declarations.after.as_slice(),
|
||||
&mut layout_data.data.after_style,
|
||||
applicable_declarations_cache,
|
||||
|
|
|
@ -57,7 +57,7 @@ impl<'ln> NodeUtil for ThreadSafeLayoutNode<'ln> {
|
|||
/// Does this node have a computed style yet?
|
||||
fn have_css_select_results(&self) -> bool {
|
||||
let layout_data_ref = self.borrow_layout_data();
|
||||
layout_data_ref.get_ref().shared_data.style.is_some()
|
||||
layout_data_ref.as_ref().unwrap().shared_data.style.is_some()
|
||||
}
|
||||
|
||||
/// Get the description of how to account for recent style changes.
|
||||
|
@ -73,7 +73,7 @@ impl<'ln> NodeUtil for ThreadSafeLayoutNode<'ln> {
|
|||
|
||||
let layout_data_ref = self.borrow_layout_data();
|
||||
layout_data_ref
|
||||
.get_ref()
|
||||
.as_ref().unwrap()
|
||||
.data
|
||||
.restyle_damage
|
||||
.unwrap_or(default)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue