mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Remove side-effecting map call per review comments
This commit is contained in:
parent
a79f00c337
commit
51e2802047
1 changed files with 3 additions and 3 deletions
|
@ -1228,9 +1228,9 @@ impl Document {
|
|||
self.stylesheets_changed_since_reflow.set(true);
|
||||
*self.stylesheets.borrow_mut() = None;
|
||||
// Mark the document element dirty so a reflow will be performed.
|
||||
self.GetDocumentElement().map(|root| {
|
||||
root.upcast::<Node>().dirty(NodeDamage::NodeStyleDamaged);
|
||||
});
|
||||
if let Some(element) = self.GetDocumentElement() {
|
||||
element.upcast::<Node>().dirty(NodeDamage::NodeStyleDamaged);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_and_reset_stylesheets_changed_since_reflow(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue