Comment on attachment 278002 [details] [diff] [review] Patch This patch cleans up all the scattered checks for character types by adding a centralized set of inline helpers. I think this makes the code a lot more readable compared to the scattered checks against 255/256 and various bit comparisons. Also a couple minor bug fixes to correctly classify \v as non-whitespace and make dimensions with a unit starting with a hyphen work correctly. I'll make sure to update my parser tests to test those fixes.
You can ignore the change to the "// From this point on, 0 <= ch < 256." comment. That was part of some changes I subsequently realized were incorrect.
Comment on attachment 278002 [details] [diff] [review] Patch >Index: nsCSSScanner.cpp >- // From this point on, 0 <= ch < 256. The point of that comment was that the bounds checks need not be performed when accessing the lextable. But since the new code always performs them, is the comment relevant at all now? r=bzbarsky, but please have dbaron sr. He might have had reasons for the local vars, etc.
Comment on attachment 278002 [details] [diff] [review] Patch sr+a1.9=dbaron. I'd say remove the comment; Compilers should be able to optimize global variable access properly, so I don't think the local variables are needed. I'm a little more worried about them optimizing the bitfield stuff (and the bounds checks), but there's only one occurrence of that (the bitfield combination, anyway).