Huh. A five bit range would give a max of 31, and if we assume that the default/built-in stylesheet knocks another off, that's 30.
I agree with you, though I think I'd prefer this to hint at the reason over it being an entirely arbitrary descision. Making such a choice for a bad reason is still preferable to making it for no reason.
It may be a sanity check; often when writing parsers for "in the wild" data you have to pick a cutoff for where "doesn't make sense" is so that you can tell if you're looking at junk data and stop trying to make sense of it (and the RAM / CPU entailed in such).
struct Element {
// Update: apparently 16 wasn't enough. Raised to 30 to pass test #452
StyleData styles[30]; // No one uses more than 16 style parameters anyway.
}
I agree with you, though I think I'd prefer this to hint at the reason over it being an entirely arbitrary descision. Making such a choice for a bad reason is still preferable to making it for no reason.