mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove nsCSSPseudoClasses.{h,cpp} and nsCSSPseudoClassList.h.
This commit is contained in:
parent
e57b6c65a0
commit
688fb23d25
3 changed files with 1 additions and 117 deletions
|
@ -12267,97 +12267,6 @@ pub mod root {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
pub type CSSPseudoClassTypeBase = u8;
|
|
||||||
#[repr(u8)]
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
|
||||||
pub enum CSSPseudoClassType {
|
|
||||||
empty = 0,
|
|
||||||
mozOnlyWhitespace = 1,
|
|
||||||
lang = 2,
|
|
||||||
root = 3,
|
|
||||||
any = 4,
|
|
||||||
firstChild = 5,
|
|
||||||
firstNode = 6,
|
|
||||||
lastChild = 7,
|
|
||||||
lastNode = 8,
|
|
||||||
onlyChild = 9,
|
|
||||||
firstOfType = 10,
|
|
||||||
lastOfType = 11,
|
|
||||||
onlyOfType = 12,
|
|
||||||
nthChild = 13,
|
|
||||||
nthLastChild = 14,
|
|
||||||
nthOfType = 15,
|
|
||||||
nthLastOfType = 16,
|
|
||||||
mozIsHTML = 17,
|
|
||||||
mozNativeAnonymous = 18,
|
|
||||||
mozUseShadowTreeRoot = 19,
|
|
||||||
mozLocaleDir = 20,
|
|
||||||
mozLWTheme = 21,
|
|
||||||
mozLWThemeBrightText = 22,
|
|
||||||
mozLWThemeDarkText = 23,
|
|
||||||
mozWindowInactive = 24,
|
|
||||||
mozTableBorderNonzero = 25,
|
|
||||||
mozBrowserFrame = 26,
|
|
||||||
scope = 27,
|
|
||||||
negation = 28,
|
|
||||||
dir = 29,
|
|
||||||
link = 30,
|
|
||||||
mozAnyLink = 31,
|
|
||||||
anyLink = 32,
|
|
||||||
visited = 33,
|
|
||||||
active = 34,
|
|
||||||
checked = 35,
|
|
||||||
disabled = 36,
|
|
||||||
enabled = 37,
|
|
||||||
focus = 38,
|
|
||||||
focusWithin = 39,
|
|
||||||
hover = 40,
|
|
||||||
mozDragOver = 41,
|
|
||||||
target = 42,
|
|
||||||
indeterminate = 43,
|
|
||||||
mozDevtoolsHighlighted = 44,
|
|
||||||
mozStyleeditorTransitioning = 45,
|
|
||||||
fullscreen = 46,
|
|
||||||
mozFullScreen = 47,
|
|
||||||
mozFocusRing = 48,
|
|
||||||
mozBroken = 49,
|
|
||||||
mozLoading = 50,
|
|
||||||
mozUserDisabled = 51,
|
|
||||||
mozSuppressed = 52,
|
|
||||||
mozHandlerClickToPlay = 53,
|
|
||||||
mozHandlerVulnerableUpdatable = 54,
|
|
||||||
mozHandlerVulnerableNoUpdate = 55,
|
|
||||||
mozHandlerDisabled = 56,
|
|
||||||
mozHandlerBlocked = 57,
|
|
||||||
mozHandlerCrashed = 58,
|
|
||||||
mozMathIncrementScriptLevel = 59,
|
|
||||||
mozHasDirAttr = 60,
|
|
||||||
mozDirAttrLTR = 61,
|
|
||||||
mozDirAttrRTL = 62,
|
|
||||||
mozDirAttrLikeAuto = 63,
|
|
||||||
mozAutofill = 64,
|
|
||||||
mozAutofillPreview = 65,
|
|
||||||
required = 66,
|
|
||||||
optional = 67,
|
|
||||||
valid = 68,
|
|
||||||
invalid = 69,
|
|
||||||
inRange = 70,
|
|
||||||
outOfRange = 71,
|
|
||||||
defaultPseudo = 72,
|
|
||||||
placeholderShown = 73,
|
|
||||||
mozReadOnly = 74,
|
|
||||||
mozReadWrite = 75,
|
|
||||||
mozSubmitInvalid = 76,
|
|
||||||
mozUIInvalid = 77,
|
|
||||||
mozUIValid = 78,
|
|
||||||
mozMeterOptimum = 79,
|
|
||||||
mozMeterSubOptimum = 80,
|
|
||||||
mozMeterSubSubOptimum = 81,
|
|
||||||
mozPlaceholder = 82,
|
|
||||||
Count = 83,
|
|
||||||
NotPseudo = 84,
|
|
||||||
MAX = 85,
|
|
||||||
}
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
pub struct GeckoFont {
|
pub struct GeckoFont {
|
||||||
pub gecko: root::nsStyleFont,
|
pub gecko: root::nsStyleFont,
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
*
|
*
|
||||||
* :scope -> <style scoped>, pending discussion.
|
* :scope -> <style scoped>, pending discussion.
|
||||||
*
|
*
|
||||||
* This follows the order defined in layout/style/nsCSSPseudoClassList.h when
|
|
||||||
* possible.
|
|
||||||
*
|
|
||||||
* $gecko_type can be either "_" or an ident in Gecko's CSSPseudoClassType.
|
* $gecko_type can be either "_" or an ident in Gecko's CSSPseudoClassType.
|
||||||
* $state can be either "_" or an expression of type ElementState. If present,
|
* $state can be either "_" or an expression of type ElementState. If present,
|
||||||
* the semantics are that the pseudo-class matches if any of the bits in
|
* the semantics are that the pseudo-class matches if any of the bits in
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
use cssparser::{BasicParseError, BasicParseErrorKind, Parser, ToCss, Token, CowRcStr, SourceLocation};
|
use cssparser::{BasicParseError, BasicParseErrorKind, Parser, ToCss, Token, CowRcStr, SourceLocation};
|
||||||
use element_state::{DocumentState, ElementState};
|
use element_state::{DocumentState, ElementState};
|
||||||
use gecko_bindings::structs::{self, CSSPseudoClassType};
|
use gecko_bindings::structs;
|
||||||
use gecko_bindings::structs::RawServoSelectorList;
|
use gecko_bindings::structs::RawServoSelectorList;
|
||||||
use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
|
use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
|
||||||
use invalidation::element::document_state::InvalidationMatchingData;
|
use invalidation::element::document_state::InvalidationMatchingData;
|
||||||
|
@ -258,28 +258,6 @@ impl NonTSPseudoClass {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Convert NonTSPseudoClass to Gecko's CSSPseudoClassType.
|
|
||||||
pub fn to_gecko_pseudoclasstype(&self) -> Option<CSSPseudoClassType> {
|
|
||||||
macro_rules! gecko_type {
|
|
||||||
(_) => (None);
|
|
||||||
($gecko_type:ident) =>
|
|
||||||
(Some(::gecko_bindings::structs::CSSPseudoClassType::$gecko_type));
|
|
||||||
}
|
|
||||||
macro_rules! pseudo_class_geckotype {
|
|
||||||
(bare: [$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*],
|
|
||||||
string: [$(($s_css:expr, $s_name:ident, $s_gecko_type:tt, $s_state:tt, $s_flags:tt),)*]) => {
|
|
||||||
match *self {
|
|
||||||
$(NonTSPseudoClass::$name => gecko_type!($gecko_type),)*
|
|
||||||
$(NonTSPseudoClass::$s_name(..) => gecko_type!($s_gecko_type),)*
|
|
||||||
NonTSPseudoClass::MozLocaleDir(_) => gecko_type!(mozLocaleDir),
|
|
||||||
NonTSPseudoClass::Dir(_) => gecko_type!(dir),
|
|
||||||
NonTSPseudoClass::MozAny(_) => gecko_type!(any),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
apply_non_ts_list!(pseudo_class_geckotype)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns true if the evaluation of the pseudo-class depends on the
|
/// Returns true if the evaluation of the pseudo-class depends on the
|
||||||
/// element's attributes.
|
/// element's attributes.
|
||||||
pub fn is_attr_based(&self) -> bool {
|
pub fn is_attr_based(&self) -> bool {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue