mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Classes/IDs case-sensitivity: get quirks mode from matching context.
This commit is contained in:
parent
5bccf98aa4
commit
c5c1c1b350
7 changed files with 16 additions and 55 deletions
|
@ -345,8 +345,6 @@ impl RawLayoutElementHelpers for Element {
|
|||
}
|
||||
|
||||
pub trait LayoutElementHelpers {
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn in_quirks_mode_document_for_layout(&self) -> bool;
|
||||
#[allow(unsafe_code)]
|
||||
unsafe fn has_class_for_layout(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool;
|
||||
#[allow(unsafe_code)]
|
||||
|
@ -374,12 +372,6 @@ pub trait LayoutElementHelpers {
|
|||
}
|
||||
|
||||
impl LayoutElementHelpers for LayoutJS<Element> {
|
||||
#[allow(unsafe_code)]
|
||||
#[inline]
|
||||
unsafe fn in_quirks_mode_document_for_layout(&self) -> bool {
|
||||
self.upcast::<Node>().owner_doc_for_layout().quirks_mode() == QuirksMode::Quirks
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
#[inline]
|
||||
unsafe fn has_class_for_layout(&self, name: &Atom, case_sensitivity: CaseSensitivity) -> bool {
|
||||
|
@ -2514,10 +2506,6 @@ impl<'a> ::selectors::Element for Root<Element> {
|
|||
Element::has_class(&**self, name, case_sensitivity)
|
||||
}
|
||||
|
||||
fn in_quirks_mode_document(&self) -> bool {
|
||||
document_from_node(&**self).quirks_mode() == QuirksMode::Quirks
|
||||
}
|
||||
|
||||
fn is_html_element_in_html_document(&self) -> bool {
|
||||
self.html_element_in_html_document()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue