mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
Remove SelectorImpl aliases
This commit is contained in:
parent
82b13d50e3
commit
81a3de3299
15 changed files with 78 additions and 85 deletions
|
@ -11,9 +11,6 @@ use std::borrow::Cow;
|
|||
use std::fmt;
|
||||
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
|
||||
|
||||
// FIXME remove
|
||||
pub use self::SelectorImpl as GeckoSelectorImpl;
|
||||
|
||||
/// NOTE: The boolean field represents whether this element is an anonymous box.
|
||||
///
|
||||
/// This is just for convenience, instead of recomputing it. Also, note that
|
||||
|
|
|
@ -9,7 +9,7 @@ use gecko_bindings::bindings;
|
|||
use gecko_bindings::structs::ServoElementSnapshot;
|
||||
use gecko_bindings::structs::ServoElementSnapshotFlags as Flags;
|
||||
use restyle_hints::ElementSnapshot;
|
||||
use selector_parser::TheSelectorImpl;
|
||||
use selector_parser::SelectorImpl;
|
||||
use selectors::parser::AttrSelector;
|
||||
use string_cache::Atom;
|
||||
|
||||
|
@ -36,9 +36,9 @@ impl GeckoElementSnapshot {
|
|||
}
|
||||
|
||||
impl ::selectors::MatchAttr for GeckoElementSnapshot {
|
||||
type Impl = TheSelectorImpl;
|
||||
type Impl = SelectorImpl;
|
||||
|
||||
fn match_attr_has(&self, attr: &AttrSelector<TheSelectorImpl>) -> bool {
|
||||
fn match_attr_has(&self, attr: &AttrSelector<SelectorImpl>) -> bool {
|
||||
unsafe {
|
||||
bindings::Gecko_SnapshotHasAttr(self.0,
|
||||
attr.ns_or_null(),
|
||||
|
@ -46,7 +46,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
|
|||
}
|
||||
}
|
||||
|
||||
fn match_attr_equals(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
|
||||
fn match_attr_equals(&self, attr: &AttrSelector<SelectorImpl>, value: &Atom) -> bool {
|
||||
unsafe {
|
||||
bindings::Gecko_SnapshotAttrEquals(self.0,
|
||||
attr.ns_or_null(),
|
||||
|
@ -56,7 +56,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
|
|||
}
|
||||
}
|
||||
|
||||
fn match_attr_equals_ignore_ascii_case(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
|
||||
fn match_attr_equals_ignore_ascii_case(&self, attr: &AttrSelector<SelectorImpl>, value: &Atom) -> bool {
|
||||
unsafe {
|
||||
bindings::Gecko_SnapshotAttrEquals(self.0,
|
||||
attr.ns_or_null(),
|
||||
|
@ -65,7 +65,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
|
|||
/* ignoreCase = */ true)
|
||||
}
|
||||
}
|
||||
fn match_attr_includes(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
|
||||
fn match_attr_includes(&self, attr: &AttrSelector<SelectorImpl>, value: &Atom) -> bool {
|
||||
unsafe {
|
||||
bindings::Gecko_SnapshotAttrIncludes(self.0,
|
||||
attr.ns_or_null(),
|
||||
|
@ -73,7 +73,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
|
|||
value.as_ptr())
|
||||
}
|
||||
}
|
||||
fn match_attr_dash(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
|
||||
fn match_attr_dash(&self, attr: &AttrSelector<SelectorImpl>, value: &Atom) -> bool {
|
||||
unsafe {
|
||||
bindings::Gecko_SnapshotAttrDashEquals(self.0,
|
||||
attr.ns_or_null(),
|
||||
|
@ -81,7 +81,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
|
|||
value.as_ptr())
|
||||
}
|
||||
}
|
||||
fn match_attr_prefix(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
|
||||
fn match_attr_prefix(&self, attr: &AttrSelector<SelectorImpl>, value: &Atom) -> bool {
|
||||
unsafe {
|
||||
bindings::Gecko_SnapshotAttrHasPrefix(self.0,
|
||||
attr.ns_or_null(),
|
||||
|
@ -89,7 +89,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
|
|||
value.as_ptr())
|
||||
}
|
||||
}
|
||||
fn match_attr_substring(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
|
||||
fn match_attr_substring(&self, attr: &AttrSelector<SelectorImpl>, value: &Atom) -> bool {
|
||||
unsafe {
|
||||
bindings::Gecko_SnapshotAttrHasSubstring(self.0,
|
||||
attr.ns_or_null(),
|
||||
|
@ -97,7 +97,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
|
|||
value.as_ptr())
|
||||
}
|
||||
}
|
||||
fn match_attr_suffix(&self, attr: &AttrSelector<TheSelectorImpl>, value: &Atom) -> bool {
|
||||
fn match_attr_suffix(&self, attr: &AttrSelector<SelectorImpl>, value: &Atom) -> bool {
|
||||
unsafe {
|
||||
bindings::Gecko_SnapshotAttrHasSuffix(self.0,
|
||||
attr.ns_or_null(),
|
||||
|
|
|
@ -12,7 +12,7 @@ use dom::{OpaqueNode, PresentationalHintsSynthetizer};
|
|||
use element_state::ElementState;
|
||||
use error_reporting::StdoutErrorReporter;
|
||||
use gecko::restyle_damage::GeckoRestyleDamage;
|
||||
use gecko::selector_parser::{GeckoSelectorImpl, NonTSPseudoClass, PseudoElement};
|
||||
use gecko::selector_parser::{SelectorImpl, NonTSPseudoClass, PseudoElement};
|
||||
use gecko::snapshot_helpers;
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::bindings::{Gecko_DropStyleChildrenIterator, Gecko_MaybeCreateStyleChildrenIterator};
|
||||
|
@ -532,7 +532,7 @@ pub trait AttrSelectorHelpers {
|
|||
fn select_name(&self, is_html_element_in_html_document: bool) -> *mut nsIAtom;
|
||||
}
|
||||
|
||||
impl AttrSelectorHelpers for AttrSelector<GeckoSelectorImpl> {
|
||||
impl AttrSelectorHelpers for AttrSelector<SelectorImpl> {
|
||||
fn ns_or_null(&self) -> *mut nsIAtom {
|
||||
match self.namespace {
|
||||
NamespaceConstraint::Any => ptr::null_mut(),
|
||||
|
@ -550,7 +550,7 @@ impl AttrSelectorHelpers for AttrSelector<GeckoSelectorImpl> {
|
|||
}
|
||||
|
||||
impl<'le> ::selectors::MatchAttr for GeckoElement<'le> {
|
||||
type Impl = GeckoSelectorImpl;
|
||||
type Impl = SelectorImpl;
|
||||
|
||||
fn match_attr_has(&self, attr: &AttrSelector<Self::Impl>) -> bool {
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue