mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
ID and class selectors are ASCII case-insensitive in quirks mode.
https://bugzilla.mozilla.org/show_bug.cgi?id=1363778
This commit is contained in:
parent
524fcac191
commit
5bccf98aa4
22 changed files with 313 additions and 191 deletions
|
@ -5,7 +5,7 @@
|
|||
//! Traits that nodes must implement. Breaks the otherwise-cyclic dependency
|
||||
//! between layout and style.
|
||||
|
||||
use attr::{AttrSelectorOperation, NamespaceConstraint};
|
||||
use attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
|
||||
use matching::{ElementSelectorFlags, LocalMatchingContext, MatchingContext, RelevantLinkStatus};
|
||||
use parser::SelectorImpl;
|
||||
use std::fmt::Debug;
|
||||
|
@ -63,9 +63,20 @@ pub trait Element: Sized + Debug {
|
|||
/// Whether this element is a `link`.
|
||||
fn is_link(&self) -> bool;
|
||||
|
||||
fn get_id(&self) -> Option<<Self::Impl as SelectorImpl>::Identifier>;
|
||||
/// Whether this element is in a document that is in quirks mode.
|
||||
///
|
||||
/// https://dom.spec.whatwg.org/#concept-document-quirks
|
||||
fn in_quirks_mode_document(&self) -> bool;
|
||||
|
||||
fn has_class(&self, name: &<Self::Impl as SelectorImpl>::ClassName) -> bool;
|
||||
fn has_id(&self,
|
||||
id: &<Self::Impl as SelectorImpl>::Identifier,
|
||||
case_sensitivity: CaseSensitivity)
|
||||
-> bool;
|
||||
|
||||
fn has_class(&self,
|
||||
name: &<Self::Impl as SelectorImpl>::ClassName,
|
||||
case_sensitivity: CaseSensitivity)
|
||||
-> bool;
|
||||
|
||||
/// Returns whether this element matches `:empty`.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue