diff options
author | Nazım Can Altınova <canaltinova@gmail.com> | 2017-06-10 20:43:05 +0300 |
---|---|---|
committer | Nazım Can Altınova <canaltinova@gmail.com> | 2017-06-10 22:18:32 +0300 |
commit | 15fe48f3f6851a1890604eff5f7209cdbe8e0dea (patch) | |
tree | bd7a28af3d5384d56f07f084a99feb23cf2132cb /components/script/dom/node.rs | |
parent | ff17af064b672482e12d98ec474e2dc0013cb17f (diff) | |
download | servo-15fe48f3f6851a1890604eff5f7209cdbe8e0dea.tar.gz servo-15fe48f3f6851a1890604eff5f7209cdbe8e0dea.zip |
stylo: Support :hover and :active quirk
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index ec0a1117669..32cb8054ee7 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -347,11 +347,11 @@ impl<'a> Iterator for QuerySelectorIterator { fn next(&mut self) -> Option<Root<Node>> { let selectors = &self.selectors; - // TODO(cgaebel): Is it worth it to build a bloom filter here - // (instead of passing `None`)? Probably. - let mut ctx = MatchingContext::new(MatchingMode::Normal, None); - self.iterator.by_ref().filter_map(|node| { + // TODO(cgaebel): Is it worth it to build a bloom filter here + // (instead of passing `None`)? Probably. + let mut ctx = MatchingContext::new(MatchingMode::Normal, None, + node.owner_doc().quirks_mode()); if let Some(element) = Root::downcast(node) { if matches_selector_list(selectors, &element, &mut ctx) { return Some(Root::upcast(element)); @@ -720,7 +720,8 @@ impl Node { Err(_) => Err(Error::Syntax), // Step 3. Ok(selectors) => { - let mut ctx = MatchingContext::new(MatchingMode::Normal, None); + let mut ctx = MatchingContext::new(MatchingMode::Normal, None, + self.owner_doc().quirks_mode()); Ok(self.traverse_preorder().filter_map(Root::downcast).find(|element| { matches_selector_list(&selectors, element, &mut ctx) })) |