mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
selectors: Allow defining an implementation-dependent field in the matching context.
This commit is contained in:
parent
9b3fc43f5a
commit
1e27f2883b
6 changed files with 11 additions and 0 deletions
|
@ -84,6 +84,7 @@ macro_rules! with_all_bounds {
|
|||
/// are parameterized on SelectorImpl. See
|
||||
/// <https://github.com/rust-lang/rust/issues/26925>
|
||||
pub trait SelectorImpl: Clone + Sized + 'static {
|
||||
type ExtraMatchingData: Sized + 'static;
|
||||
type AttrValue: $($InSelector)*;
|
||||
type Identifier: $($InSelector)* + PrecomputedHash;
|
||||
type ClassName: $($InSelector)* + PrecomputedHash;
|
||||
|
@ -2027,6 +2028,7 @@ pub mod tests {
|
|||
}
|
||||
|
||||
impl SelectorImpl for DummySelectorImpl {
|
||||
type ExtraMatchingData = ();
|
||||
type AttrValue = DummyAtom;
|
||||
type Identifier = DummyAtom;
|
||||
type ClassName = DummyAtom;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue