DescriptionOptimize 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=
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170490
Patch Set 1 #
Messages
Total messages: 5 (0 generated)
|