mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
style: Allow passing an nth-index-cache to the invalidation code.
This commit is contained in:
parent
e13f5a656a
commit
aba1cf8cd5
4 changed files with 114 additions and 73 deletions
|
@ -4058,7 +4058,17 @@ pub extern "C" fn Servo_ProcessInvalidations(set: RawServoStyleSetBorrowed,
|
|||
let mut data = data.as_mut().map(|d| &mut **d);
|
||||
|
||||
if let Some(ref mut data) = data {
|
||||
let result = data.invalidate_style_if_needed(element, &shared_style_context, None);
|
||||
// FIXME(emilio): an nth-index cache could be worth here, even
|
||||
// if temporary?
|
||||
//
|
||||
// Also, ideally we could share them across all the elements?
|
||||
let result = data.invalidate_style_if_needed(
|
||||
element,
|
||||
&shared_style_context,
|
||||
None,
|
||||
None,
|
||||
);
|
||||
|
||||
if result.has_invalidated_siblings() {
|
||||
let parent = element.traversal_parent().expect("How could we invalidate siblings without a common parent?");
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue