mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Introduce TDocument::is_html_element and TDocument::quirks_mode.
This allows some code to read a bit nicer, and stop passing down quirks mode to querySelector / querySelectorAll.
This commit is contained in:
parent
bfa7cd7d9e
commit
dd5cd29a61
5 changed files with 38 additions and 26 deletions
|
@ -6,7 +6,7 @@
|
|||
//! and Gecko.
|
||||
|
||||
use context::QuirksMode;
|
||||
use dom::{TElement, TNode};
|
||||
use dom::{TDocument, TElement, TNode};
|
||||
use invalidation::element::invalidator::{Invalidation, InvalidationProcessor, InvalidationVector};
|
||||
use selectors::{Element, NthIndexCache, SelectorList};
|
||||
use selectors::matching::{self, MatchingContext, MatchingMode};
|
||||
|
@ -308,7 +308,6 @@ pub fn query_selector<E, Q>(
|
|||
root: E::ConcreteNode,
|
||||
selector_list: &SelectorList<E::Impl>,
|
||||
results: &mut Q::Output,
|
||||
quirks_mode: QuirksMode,
|
||||
)
|
||||
where
|
||||
E: TElement,
|
||||
|
@ -316,6 +315,7 @@ where
|
|||
{
|
||||
use invalidation::element::invalidator::TreeStyleInvalidator;
|
||||
|
||||
let quirks_mode = root.owner_doc().quirks_mode();
|
||||
let fast_result = query_selector_fast::<E, Q>(
|
||||
root,
|
||||
selector_list,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue