mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Shrink selectors::Component, add case-insensitive for other attr selectors
* https://bugzilla.mozilla.org/show_bug.cgi?id=1364148 * https://bugzilla.mozilla.org/show_bug.cgi?id=1364162
This commit is contained in:
parent
83c7824fda
commit
9376abdd2c
15 changed files with 377 additions and 357 deletions
|
@ -14,10 +14,8 @@ use gecko_bindings::structs::ServoElementSnapshot;
|
|||
use gecko_bindings::structs::ServoElementSnapshotFlags as Flags;
|
||||
use gecko_bindings::structs::ServoElementSnapshotTable;
|
||||
use restyle_hints::ElementSnapshot;
|
||||
use selector_parser::SelectorImpl;
|
||||
use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator, CaseSensitivity};
|
||||
use selectors::parser::NamespaceConstraint;
|
||||
use string_cache::Atom;
|
||||
use selectors::attr::{AttrSelectorOperation, AttrSelectorOperator, CaseSensitivity, NamespaceConstraint};
|
||||
use string_cache::{Atom, Namespace};
|
||||
|
||||
/// A snapshot of a Gecko element.
|
||||
pub type GeckoElementSnapshot = ServoElementSnapshot;
|
||||
|
@ -59,9 +57,9 @@ impl GeckoElementSnapshot {
|
|||
|
||||
/// selectors::Element::attr_matches
|
||||
pub fn attr_matches(&self,
|
||||
ns: &NamespaceConstraint<SelectorImpl>,
|
||||
ns: &NamespaceConstraint<&Namespace>,
|
||||
local_name: &Atom,
|
||||
operation: &AttrSelectorOperation<SelectorImpl>)
|
||||
operation: &AttrSelectorOperation<&Atom>)
|
||||
-> bool {
|
||||
unsafe {
|
||||
match *operation {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue