mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add a function to find out if a node has any ancestor that is pending for restyling.
This commit is contained in:
parent
6051e5ed02
commit
ffa9ee3f61
1 changed files with 14 additions and 0 deletions
|
@ -3783,3 +3783,17 @@ pub extern "C" fn Servo_ProcessInvalidations(set: RawServoStyleSetBorrowed,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_HasPendingRestyleAncestor(element: RawGeckoElementBorrowed) -> bool {
|
||||
let mut element = Some(GeckoElement(element));
|
||||
while let Some(e) = element {
|
||||
if let Some(data) = e.borrow_data() {
|
||||
if data.restyle.hint.has_non_animation_invalidations() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
element = e.traversal_parent();
|
||||
}
|
||||
false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue