mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +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_changed_since_reflow.set(true);
|
||||||
*self.stylesheets.borrow_mut() = None;
|
*self.stylesheets.borrow_mut() = None;
|
||||||
// Mark the document element dirty so a reflow will be performed.
|
// Mark the document element dirty so a reflow will be performed.
|
||||||
self.GetDocumentElement().map(|root| {
|
if let Some(element) = self.GetDocumentElement() {
|
||||||
root.upcast::<Node>().dirty(NodeDamage::NodeStyleDamaged);
|
element.upcast::<Node>().dirty(NodeDamage::NodeStyleDamaged);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_and_reset_stylesheets_changed_since_reflow(&self) -> bool {
|
pub fn get_and_reset_stylesheets_changed_since_reflow(&self) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue