mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Implement the functional :host(..) selector.
We could invalidate in a slightly more fine-grained way, but I don't think it's worth the churn vs. keeping the special-cases minimal. Bug: 1452640 Reviewed-by: xidorn MozReview-Commit-ID: 5DkQrgwg9GW
This commit is contained in:
parent
bfb9fe6159
commit
eaefaa890e
8 changed files with 82 additions and 47 deletions
|
@ -207,16 +207,6 @@ impl InvalidationMap {
|
|||
})
|
||||
}
|
||||
|
||||
/// Adds a selector to this `InvalidationMap`. Returns Err(..) to
|
||||
/// signify OOM.
|
||||
pub fn note_selector(
|
||||
&mut self,
|
||||
selector: &Selector<SelectorImpl>,
|
||||
quirks_mode: QuirksMode,
|
||||
) -> Result<(), FailedAllocationError> {
|
||||
self.collect_invalidations_for(selector, quirks_mode)
|
||||
}
|
||||
|
||||
/// Clears this map, leaving it empty.
|
||||
pub fn clear(&mut self) {
|
||||
self.class_to_selector.clear();
|
||||
|
@ -228,13 +218,14 @@ impl InvalidationMap {
|
|||
self.has_class_attribute_selectors = false;
|
||||
}
|
||||
|
||||
// Returns Err(..) to signify OOM.
|
||||
fn collect_invalidations_for(
|
||||
/// Adds a selector to this `InvalidationMap`. Returns Err(..) to
|
||||
/// signify OOM.
|
||||
pub fn note_selector(
|
||||
&mut self,
|
||||
selector: &Selector<SelectorImpl>,
|
||||
quirks_mode: QuirksMode
|
||||
quirks_mode: QuirksMode,
|
||||
) -> Result<(), FailedAllocationError> {
|
||||
debug!("InvalidationMap::collect_invalidations_for({:?})", selector);
|
||||
debug!("InvalidationMap::note_selector({:?})", selector);
|
||||
|
||||
let mut iter = selector.iter();
|
||||
let mut combinator;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue