aboutsummaryrefslogtreecommitdiffstats
path: root/ports
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-11-29 21:21:14 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-11-29 21:22:29 +0100
commit02ad6d3d902a8cafd9c0f410aa339dda3e15a628 (patch)
tree961b09b579936176c67c04b7b025f98889e78c4f /ports
parentdbe3136a055008d2c27c7d96f20e0c9ce4b1cb1c (diff)
downloadservo-02ad6d3d902a8cafd9c0f410aa339dda3e15a628.tar.gz
servo-02ad6d3d902a8cafd9c0f410aa339dda3e15a628.zip
style: Require an nth-index cache for invalidation.
Diffstat (limited to 'ports')
-rw-r--r--ports/geckolib/glue.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index 894e66579bb..35ca8d0f2fd 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -6,7 +6,7 @@ use cssparser::{Parser, ParserInput};
use cssparser::ToCss as ParserToCss;
use env_logger::LogBuilder;
use malloc_size_of::MallocSizeOfOps;
-use selectors::Element;
+use selectors::{Element, NthIndexCache};
use selectors::matching::{MatchingContext, MatchingMode, matches_selector};
use servo_arc::{Arc, ArcBorrow, RawOffsetArc};
use std::cell::RefCell;
@@ -4478,15 +4478,13 @@ pub extern "C" fn Servo_ProcessInvalidations(
let mut data = data.as_mut().map(|d| &mut **d);
if let Some(ref mut data) = data {
- // FIXME(emilio): an nth-index cache could be worth here, even
- // if temporary?
- //
- // Also, ideally we could share them across all the elements?
+ // FIXME(emilio): Ideally we could share the nth-index-cache across all
+ // the elements?
let result = data.invalidate_style_if_needed(
element,
&shared_style_context,
None,
- None,
+ &mut NthIndexCache::default(),
);
if result.has_invalidated_siblings() {