mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #5427 : pcwalton/servo/accidentally-quadratic, r=Ms2ger
r? @jdm
This commit is contained in:
commit
5833dea733
1 changed files with 9 additions and 7 deletions
|
@ -700,14 +700,16 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> {
|
||||||
//
|
//
|
||||||
// TODO(cgaebel): This is a very conservative way to account for sibling
|
// TODO(cgaebel): This is a very conservative way to account for sibling
|
||||||
// selectors. Maybe we can do something smarter in the future.
|
// selectors. Maybe we can do something smarter in the future.
|
||||||
let parent =
|
if !self.get_has_dirty_siblings() {
|
||||||
match self.parent_node() {
|
let parent =
|
||||||
None => return,
|
match self.parent_node() {
|
||||||
Some(parent) => parent,
|
None => return,
|
||||||
};
|
Some(parent) => parent,
|
||||||
|
};
|
||||||
|
|
||||||
for sibling in parent.root().r().children() {
|
for sibling in parent.root().r().children() {
|
||||||
sibling.set_has_dirty_siblings(true);
|
sibling.set_has_dirty_siblings(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Dirty ancestors.
|
// 4. Dirty ancestors.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue