aboutsummaryrefslogblamecommitdiff
path: root/www/waterfox/files/patch-bug1408672
blob: 74c3261b9c3c409e42b7f092183b55ec1a2ad590 (plain) (tree)




































                                                                                        
commit fe19ce17d4f9
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Sat Oct 14 10:50:00 2017 -0400

    Bug 1408672 - Disable the hover / active quirk for invalidation. r=heycam, a=ritu
    
    MozReview-Commit-ID: 6wlDm8cNEYD
---
 servo/components/selectors/matching.rs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git servo/components/selectors/matching.rs servo/components/selectors/matching.rs
index ff0dd40b484c..c6c2db3c4719 100644
--- servo/components/selectors/matching.rs
+++ servo/components/selectors/matching.rs
@@ -393,7 +393,9 @@ pub fn matches_selector<E, F>(selector: &Selector<E::Impl>,
     let iter = if offset == 0 {
         selector.iter()
     } else {
-        selector.iter_from(offset)
+        let iter = selector.iter_from(offset);
+        local_context.note_position(&iter);
+        iter
     };
     matches_complex_selector(iter, element, &mut local_context, flags_setter)
 }
@@ -432,6 +434,10 @@ where
     }
 
     let mut local_context = LocalMatchingContext::new(context, selector);
+    // Disable the hover quirk here, since we're in a random position inside the
+    // selector, and this is only used for invalidation, so incorrectly
+    // returning true doesn't affect correctness, only does a bit more work.
+    local_context.hover_active_quirk_disabled = true;
     for component in selector.iter_raw_parse_order_from(from_offset - 1) {
         if matches!(*component, Component::Combinator(..)) {
             return CompoundSelectorMatchingResult::Matched {