mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
style: Remove SelectorAndHashes.
This commit is contained in:
parent
dee4aea264
commit
445b8fb3e8
2 changed files with 1 additions and 27 deletions
|
@ -176,26 +176,6 @@ pub trait Parser<'i> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Clone, Debug)]
|
|
||||||
pub struct SelectorAndHashes<Impl: SelectorImpl> {
|
|
||||||
pub selector: Selector<Impl>,
|
|
||||||
pub hashes: AncestorHashes,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<Impl: SelectorImpl> SelectorAndHashes<Impl> {
|
|
||||||
pub fn new(selector: Selector<Impl>) -> Self {
|
|
||||||
let hashes = AncestorHashes::new(&selector);
|
|
||||||
Self::new_with_hashes(selector, hashes)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn new_with_hashes(selector: Selector<Impl>, hashes: AncestorHashes) -> Self {
|
|
||||||
SelectorAndHashes {
|
|
||||||
selector: selector,
|
|
||||||
hashes: hashes,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Clone, Debug)]
|
#[derive(PartialEq, Eq, Clone, Debug)]
|
||||||
pub struct SelectorList<Impl: SelectorImpl>(pub Vec<Selector<Impl>>);
|
pub struct SelectorList<Impl: SelectorImpl>(pub Vec<Selector<Impl>>);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ use pdqsort::sort_by;
|
||||||
use rule_tree::CascadeLevel;
|
use rule_tree::CascadeLevel;
|
||||||
use selector_parser::SelectorImpl;
|
use selector_parser::SelectorImpl;
|
||||||
use selectors::matching::{matches_selector, MatchingContext, ElementSelectorFlags};
|
use selectors::matching::{matches_selector, MatchingContext, ElementSelectorFlags};
|
||||||
use selectors::parser::{Component, Combinator, SelectorAndHashes, SelectorIter};
|
use selectors::parser::{Component, Combinator, SelectorIter};
|
||||||
use selectors::parser::LocalName as LocalNameSelector;
|
use selectors::parser::LocalName as LocalNameSelector;
|
||||||
use smallvec::VecLike;
|
use smallvec::VecLike;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
@ -28,12 +28,6 @@ pub trait SelectorMapEntry : Sized + Clone {
|
||||||
fn selector(&self) -> SelectorIter<SelectorImpl>;
|
fn selector(&self) -> SelectorIter<SelectorImpl>;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SelectorMapEntry for SelectorAndHashes<SelectorImpl> {
|
|
||||||
fn selector(&self) -> SelectorIter<SelectorImpl> {
|
|
||||||
self.selector.iter()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Map element data to selector-providing objects for which the last simple
|
/// Map element data to selector-providing objects for which the last simple
|
||||||
/// selector starts with them.
|
/// selector starts with them.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue