servo: Merge #17781 - style: Remove bogus assertion (from emilio:assert-not); r=heycam
authorEmilio Cobos Álvarez <emilio@crisal.io>
Wed, 19 Jul 2017 00:44:45 -0700
changeset 611658 b10cc6c6704b9ea443788a12e29a1100f2925a5e
parent 611657 f9954d5cf6ea0c3d9c8c1a80a72a25f039dbab2b
child 611659 5b789f74756c62b57b026232866613dbe78ef93f
push id69287
push userCallek@gmail.com
push dateThu, 20 Jul 2017 01:11:37 +0000
reviewersheycam
milestone56.0a1
servo: Merge #17781 - style: Remove bogus assertion (from emilio:assert-not); r=heycam Bug: 1381682 Reviewed-by: heycam MozReview-Commit-ID: E6bKyBdMUue Source-Repo: https://github.com/servo/servo Source-Revision: 8e73bc5b471d92331d9308821caed62bd30a231f
servo/components/style/invalidation/element/invalidator.rs
--- a/servo/components/style/invalidation/element/invalidator.rs
+++ b/servo/components/style/invalidation/element/invalidator.rs
@@ -261,22 +261,20 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator
         let result = self.invalidate_child(
             child,
             invalidations,
             &mut sibling_invalidations
         );
 
         // Roots of NAC subtrees can indeed generate sibling invalidations, but
         // they can be just ignored, since they have no siblings.
-        debug_assert!(child.implemented_pseudo_element().is_none() ||
-                      sibling_invalidations.is_empty(),
-                      "pseudos can't generate sibling invalidations, since \
-                      using them in other position that isn't the \
-                      rightmost part of the selector is invalid \
-                      (for now at least)");
+        //
+        // Note that we can end up testing selectors that wouldn't end up
+        // matching due to this being NAC, like those coming from document
+        // rules, but we overinvalidate instead of checking this.
 
         result
     }
 
     /// Invalidate a child and recurse down invalidating its descendants if
     /// needed.
     fn invalidate_child(
         &mut self,