Closed Bug 452518 Opened 17 years ago Closed 17 years ago

encapsulation improvements for nsCSSScanner

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1

People

(Reporter: zwol, Assigned: zwol)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch (rev 1) proposed patch (obsolete) — Splinter Review
There's a bunch of stuff in nsCSSScanner.h that only nsCSSScanner.cpp needs to see. Move it there. Patch is on top of bug 452278.
Attachment #335799 - Flags: superreview?(dbaron)
Attachment #335799 - Flags: review?(dbaron)
n.b. please ignore the words "and make initialization thread-safe" at the top of the patch; i decided not to do that and forgot to edit the patch header.
Blocks: 443976
Comment on attachment 335799 [details] [diff] [review] (rev 1) proposed patch r+sr=dbaron if you move the new chunk of methods added to nsCSSScanner.cpp up to right after BuildLexTable, to reduce the risk of having to reorder them later. And again, the comment in the previous bugs about emailing me an hg bundle still applies. But remember to fix the commit comment as you described above.
Attachment #335799 - Flags: superreview?(dbaron)
Attachment #335799 - Flags: superreview+
Attachment #335799 - Flags: review?(dbaron)
Attachment #335799 - Flags: review+
revised patch.
Attachment #335799 - Attachment is obsolete: true
P.s. one could replace IsDigit{return PRUint32(ch) < 256 && (gLexTable[ch] & IS_DIGIT) != 0;} with IsDigit(return (ch>='0' && ch <='9');} As that won't require a reference to a table and performing a bit operation on value, just two compares, which is inlined much better.
landing seems to have stuck. Alfred: maybe later.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Created bug 483977 for IsDigit simplification.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: