[webkit-reviews] review granted: [Bug 35362] Parsing of CSS rgb() values is slow : [Attachment 49602] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 26 11:38:50 PST 2010


Darin Adler <darin at apple.com> has granted Stephen White
<senorblanco at chromium.org>'s request for review:
Bug 35362: Parsing of CSS rgb() values is slow
https://bugs.webkit.org/show_bug.cgi?id=35362

Attachment 49602: Patch
https://bugs.webkit.org/attachment.cgi?id=49602&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
> +static inline bool parseInt(const UChar** str, const UChar* end, UChar
terminator, int* value)

For in/out arguments we normally use references rather than pointers. Thus
"str" and "value" would typically be references.

> +    const UChar *c = *str;
> +    int v = 0;

The "*" here is in the wrong place, should be next to the UChar.

We normally use words to name local variables, not letters.

> +	   const UChar* c = name.characters() + 4;

We normally use words to name local variables, not letters.

> +	   int r = 0, g = 0, b = 0;

We normally define variables on separate lines rather than all on one line.

There's no need to initialize these variables. I suggest not doing so.

I'm going to say r=me, despite these concerns since they are all stylistic
issues.


More information about the webkit-reviews mailing list