[webkit-reviews] review granted: [Bug 79356] Little optimization in CSSParser::parseShorthand. : [Attachment 128470] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 23 10:23:29 PST 2012


Tony Chang <tony at chromium.org> has granted  review:
Bug 79356: Little optimization in CSSParser::parseShorthand.
https://bugs.webkit.org/show_bug.cgi?id=79356

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

------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=128470&action=review


> Source/WebCore/css/CSSParser.cpp:2680
>      bool found = false;

Can we declare found in the while loop?

> Source/WebCore/css/CSSParser.cpp:2682
> +    bool fnd[6]= { false, false, false, false, false, false }; // Trust me
;)

I'm not sure what the comment means.  I would probably just remove it.

> Source/WebCore/css/CSSParser.cpp:2688
>	       if (!fnd[propIndex]) {
> -		   if (parseValue(properties[propIndex], important))
> +		   if (parseValue(properties[propIndex], important)) {

Can we merge these if statements with &&?


More information about the webkit-reviews mailing list