const SOURCE_ORDER_BITS: usize = 24;
Expand description

Blink uses 18 bits to store source order, and does not check overflow [1]. That’s a limit that could be reached in realistic webpages, so we use 24 bits and enforce defined behavior in the overflow case.

Note that right now this restriction could be lifted if wanted (because we no longer stash the cascade level in the remaining bits), but we keep it in place in case we come up with a use-case for them, lacking reports of the current limit being too small.

[1] https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/ RuleSet.h?l=128&rcl=90140ab80b84d0f889abc253410f44ed54ae04f3