[css3-lists] Limiting CJK longhand styles to 10k

Right now, the Lists module defines the CJK longhand styles up to
10^16 (ten quadrillion).  This is pretty excessive, as we can't
actually *test* this high (implementation use either 2- or 4-byte
signed integers to track counter values, which have a maximum range of
either 30k or 2 billion).

I'd like to trim this down to a smaller range, which would allow us to
test the full range and let me eliminate some complexity from the
algorithm.  Specifically, I want to limit the the CJK longhand styles
to a maximum value of 9999.

This has some nice simplicity benefits.  Within this range, the
Japanese and Korean styles can be expressed using the 'additive'
counter-style algorithm, so they can be removed from section 4.3
entirely and just exist as entries in the default UA stylesheet.  The
Chinese styles still need to be defined with a special algorithm (the
zero-collapsing rule that Chinese uses can't be represented by any of
the existing counter-style algorithms), but the range limits it to
only the first "group", which is *much* easier to talk about.

I don't think I lose any useful amount of power, either.  I think that
I can state that the 99% is a conservative estimate for the percentage
of lists on the web that need less than 100 values.  Going up to 1000
gives us virtually everything else.  My proposal to have the range go
up to 10k covers this and a bit more; I suggest this range mainly
because it's a convenient cleave point.  I have produced lists with
more than 10k members before, but only as part of a database dump
while debugging an application.

Other list styles are either defined over *all* numbers, or have a
similarly limited range, usually only covering up to roughly 10k or
1M.  This change will bring the CJK longhand styles into alignment
with that implied pattern as well.

Unless there's a strong objection with good reasoning as to why the
CJK longhand styles need to be able to render list counters above 10k,
I'll make this change this week.

~TJ

Received on Wednesday, 27 April 2011 18:33:31 UTC