[webkit-reviews] review granted: [Bug 77158] Speed up the prefix matching of cssPropertyName() : [Attachment 124207] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jan 27 12:53:13 PST 2012
Geoffrey Garen <ggaren at apple.com> has granted Benjamin Poulain
<benjamin at webkit.org>'s request for review:
Bug 77158: Speed up the prefix matching of cssPropertyName()
https://bugs.webkit.org/show_bug.cgi?id=77158
Attachment 124207: Patch
https://bugs.webkit.org/attachment.cgi?id=124207&action=review
------- Additional Comments from Geoffrey Garen <ggaren at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=124207&action=review
r=me
> Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp:72
> +static inline bool matchesCSSPropertyNamePrefixEnding(const StringImpl&
propertyName, const char (&prefix)[prefixCStringLength])
The word "Ending" in this function name confused me. I think it would be better
without it: "matchesCSSPropertyNamePrefix".
> Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp:101
> +static PropertyNamePrefix getCSSPropertyNamePrefix(const StringImpl&
propertyName)
Your patch does one switch in getCSSPropertyNamePrefix(), then feeds the result
into a second switch in cssPropertyName(). It would be more efficient to merge
getCSSPropertyNamePrefix() into cssPropertyName(), so you only have to switch
once.
More information about the webkit-reviews
mailing list