Provide correct offset into `matches_compound_selector_from` in `:has` optimization path.

Differential Revision: https://phabricator.services.mozilla.com/D199011

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1875348
gecko-commit: 31580aaefb53da9fd071906ac971953db4dbdb1e
gecko-reviewers: firefox-style-system-reviewers, emilio
diff --git a/css/selectors/invalidation/has-sibling-insertion-removal.html b/css/selectors/invalidation/has-sibling-insertion-removal.html
index 3c05a0f..0655b23 100644
--- a/css/selectors/invalidation/has-sibling-insertion-removal.html
+++ b/css/selectors/invalidation/has-sibling-insertion-removal.html
@@ -20,6 +20,7 @@
 #subject11:has(+ #sibling11_1 + #sibling11_2 ~ #sibling11_3 > #siblingchild11_3_1) { color: blue }
 #subject12:has(+ #sibling12_2 ~ #sibling12_3 > #siblingchild12_3_1) { color: yellow }
 .sibling13:has(~ .sibling13) { color: green }
+#subject14:has(~ #sibling14_1 ~ #sibling14_2 ~ #sibling14_3) { color: green }
 </style>
 
 <main id="main">
@@ -108,6 +109,12 @@
     <div class="sibling13"></div>
     <div id="subject13" class="sibling13"></div>
   </div>
+  <div id="parent14">
+    <div id="subject14"></div>
+    <div id="sibling14_1"></div>
+    <div id="sibling14_2"></div>
+    <div id="sibling14_3"></div>
+  </div>
 </main>
 <script>
 
@@ -195,4 +202,8 @@
 parent13.appendChild(d);
 testColor(`subject13: color after #sibling12_1 removed should be ${green}`,
           subject13, green);
+
+testColor(`subject14: initial color should be ${green}`, subject14, green);
+sibling14_2.remove();
+testColor(`subject14: color after #sibling14_2 removed should be ${grey}`, subject14, grey);
 </script>