Skip to content

Selector: reduce size, simplify setDocument - #4462

Merged
mgol merged 1 commit into
jquery:masterfrom
mgol:selector-size-opt
Aug 26, 2019
Merged

mgol merged 1 commit into
jquery:masterfrom
mgol:selector-size-opt

Conversation

@mgol

@mgol mgol commented Aug 19, 2019

Copy link
Copy Markdown
Member

Summary

With new selector code doing less convoluted support tests, it was possible
to extract a lot of logic out of setDocument & also reduce size.

Checklist

@mgol

mgol commented Aug 19, 2019

Copy link
Copy Markdown
Member Author

-94 bytes currently. When Chrome fixes its a:enabled matching issue:
https://bugs.chromium.org/p/chromium/issues/detail?id=993387
it'll get further down.

@mgol
mgol force-pushed the selector-size-opt branch 6 times, most recently from fd30507 to 321f3fb Compare August 22, 2019 00:13

@timmywil timmywil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked this locally and it looks good. The chrome-debug task was broken, but I'll have a PR to fix it.

With new selector code doing less convoluted support tests, it was possible
to extract a lot of logic out of setDocument & also reduce size.

This commit also backports jquery/sizzle#439 that was reverted by mistake
during a switch from JSHint + JSCS to ESLint.

Ref jquery/sizzle#442
Ref jquery/sizzle#439
@mgol
mgol force-pushed the selector-size-opt branch from 321f3fb to ae84055 Compare August 26, 2019 17:10
@mgol
mgol merged commit 29a9544 into jquery:master Aug 26, 2019
@mgol
mgol deleted the selector-size-opt branch August 26, 2019 17:15
@mgol mgol removed the Needs review label Aug 26, 2019
@mgol mgol added this to the 4.0.0 milestone Jan 27, 2020
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

2 participants