Skip to content

css: Don't allocate needlessly while processing selectors

Matthias Clasen requested to merge cssselector-alloc into main

The recursive subdivide_info function works by soring the selector infos it gets into 2 (or 3) buckets: exact matches, matches, and remaining. Then it recurses on the matches and remaining buckets. This can be done without allocating extra arrays, by sorting the given array in the right way.

This needs some serious testing.

Fixes: #6583

Merge request reports