Open Bug 284420 Opened 19 years ago Updated 2 years ago

intl needs support for counters

Categories

(Core :: Internationalization, defect)

defect

Tracking

()

People

(Reporter: sicking, Unassigned)

References

(Blocks 2 open bugs)

Details

Right now the code for css counters is hardcoded into nsBulletFrame. This means
that it's impossible for XSLT to reuse the code. Instead it should be moved into
intl and generalized so that both css and xslt can use it, and so that we in the
future when more counter-types are added will automatically support them
What xslt needs is an interface that gives us some sort of counter-object given
1. A unichar ('a' for western counting, 0x30A2 for Katakana)
2. An nsILocale (or even more convinient, the locale as a string)
3. A bool or string specifying "traditional" or "alphabetic"

The specifics of how this should work is defined here:
http://www.w3.org/TR/xslt#convert
The thing is, the CSS model is very different from the XSLT model (for example,
the CSS model doesn't depend on the locale).  I'm not really sure there is a
decent way to have the two share code....
Some people wanted to make CSS3 list depend on 'lang' as well..... Anyway, it
'might' be possible to map some of CSS3 list styles to counters starting with a
certain Unicode character with lang='en-US' (or null). 
The code to figure out which countertype to use probably couldn't becuase they
use so different mechanisms to choose the counter; xslt is given a char like
0x30A2, css is given a token like 'katakana'.

But once we've figured out which countertype to use we could probably share the
code that does the actual number->string conversion.

Also, by having the code in intl i think we're more likly to get the right set
of eyes on this. I'm in most cases compleatly clueless on how this counting
stuff is supposed to work.
QA Contact: amyy → i18n

The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.

Assignee: smontagu → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.