]> source.dussan.org Git - jquery.git/commit
Selector: Backport jQuery selection context logic to selector-native
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Mon, 13 Feb 2023 17:34:41 +0000 (18:34 +0100)
committerGitHub <noreply@github.com>
Mon, 13 Feb 2023 17:34:41 +0000 (18:34 +0100)
commit2e644e845051703775b35b358eec5d3608a9465f
treef1b17f379cd4875a3f8e60a9d20f2354333ce4d5
parent7e7bd062070b3eca8ee047136ea8575fbed5d70f
Selector: Backport jQuery selection context logic to selector-native

This makes:
```js
$div.find("div > *")
```
no longer matching children of `$div`.

Also, leading combinators now work, e.g.:
```js
$div.find( "> *" );
```
returns children of `$div`.

As a result of that, a number of tests are no longer skipped in the
`selector-native` mode.

Also, rename `rcombinators` to `rleadingCombinator`.

Fixes gh-5185
Closes gh-5186
Ref gh-5085
23 files changed:
src/selector-native.js
src/selector.js
src/selector/createCache.js [new file with mode: 0644]
src/selector/filterMatchExpr.js [new file with mode: 0644]
src/selector/preFilter.js [new file with mode: 0644]
src/selector/selectorError.js [new file with mode: 0644]
src/selector/testContext.js [new file with mode: 0644]
src/selector/toSelector.js [new file with mode: 0644]
src/selector/tokenize.js [new file with mode: 0644]
src/selector/unescapeSelector.js [new file with mode: 0644]
src/selector/var/attributes.js [new file with mode: 0644]
src/selector/var/booleans.js [new file with mode: 0644]
src/selector/var/identifier.js [new file with mode: 0644]
src/selector/var/matches.js [new file with mode: 0644]
src/selector/var/pseudos.js [new file with mode: 0644]
src/selector/var/rcomma.js [new file with mode: 0644]
src/selector/var/rdescend.js [new file with mode: 0644]
src/selector/var/rleadingCombinator.js [new file with mode: 0644]
src/selector/var/rpseudo.js [new file with mode: 0644]
src/selector/var/rsibling.js [new file with mode: 0644]
test/unit/core.js
test/unit/selector.js
test/unit/traversing.js