]> source.dussan.org Git - jquery.git/commit
Selector: Make selectors with leading combinators use qSA again
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 14 Oct 2019 16:28:19 +0000 (18:28 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2019 16:28:19 +0000 (18:28 +0200)
commited66d5a22b37425abf5b63c361f91340de89c994
treeb52eaa911889ab9b71a2e5e7b003ff226f7a48ea
parentbbad821c399da92995a11b88d6684970479d4a9b
Selector: Make selectors with leading combinators use qSA again

An optimization added in jquery/sizzle#431 skips the temporary IDs for selectors
not using child or descendant combinators. For sibling combinators, though, this
pushes a selector with a leading combinator to qSA directly which crashes and
falls back to a slower Sizzle route.

This commit makes selectors with leading combinators not skip the selector
rewriting. Note that after jquery/jquery#4454 & jquery/sizzle#453, all modern
browsers other than Edge leverage the :scope pseudo-class, avoiding temporary
id attributes.

Closes gh-4509
Ref jquery/sizzle#431
src/selector.js