Optimize named property access on CSSStyleDeclaration objects

When reading property on a CSSStyleDeclaration object, the property name
is transformed into a possible CSS property name and looked up as such.
This transformation involves copying the property name to a StringBuilder
while converting from camelCase to dash-separated.

Positive matches are cached in a local static hash map, but negative
matches were not.  A script reading properties like "getPropertyValue"
would trigger the conversion to "get-property-value" and CSS property
lookup every time.

Optimize by caching negative matches as well as positive ones.

BUG=

Review URL: https://codereview.chromium.org/219153002

git-svn-id: svn://svn.chromium.org/blink/trunk@170490 bbb929c8-8fbe-4397-9dbb-9b2b20218538
2 files changed
tree: c8b48fd46fe0fdee5d3f7d523dbdac4d9b359656
  1. third_party/