Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp
// When getting properties on CSSStyleDeclarations, the name used from
// Javascript and the actual name of the property are not the same, so
// we have to do the following translation. The translation turns upper
// case characters into lower case characters and inserts dashes to
// separate words.
//
// Example: 'backgroundPositionY' -> 'background-position-y'
//
// Also, certain prefixes such as 'css-' are stripped.
When getting properties on CSSStyleDeclarations, the name used from
Javascript and the actual name of the property are not the same, so
we have to do the following translation. The translation turns upper
case characters into lower case characters and inserts dashes to
separate words.



Also, certain prefixes such as 'css-' are stripped.
When getting properties on CSSStyleDeclarations the name used from Javascript and the actual name of the property are not the same so we have to do the following translation . The translation turns upper case characters into lower case characters and inserts dashes to separate words . Also certain prefixes such as ' css - ' are stripped .
static CSSPropertyInfo* cssPropertyInfo(v8::Handle<v8::String> v8PropertyName)
{
    String propertyName = toCoreString(v8PropertyName);
    typedef HashMap<String, CSSPropertyInfo*> CSSPropertyInfoMap;
    DEFINE_STATIC_LOCAL(CSSPropertyInfoMap, map, ());
    CSSPropertyInfo* propInfo = map.get(propertyName);
    if (!propInfo) {
        propInfo = new CSSPropertyInfo();
        propInfo->propID = cssResolvedPropertyID(propertyName);
        map.add(propertyName, propInfo);
    }
    if (propInfo->propID && RuntimeCSSEnabled::isCSSPropertyEnabled(propInfo->propID))
        return propInfo;
    return 0;
}
static CSSPropertyInfo * cssPropertyInfo ( v8 :: Handle < v8 :: String > v8PropertyName ) { String propertyName = toCoreString ( v8PropertyName ) ; typedef HashMap < String , CSSPropertyInfo * > CSSPropertyInfoMap ; DEFINE_STATIC_LOCAL ( CSSPropertyInfoMap , map , ( ) ) ; CSSPropertyInfo * propInfo = map . get ( propertyName ) ; if ( ! propInfo ) { propInfo = new CSSPropertyInfo ( ) ; propInfo -> propID = cssResolvedPropertyID ( propertyName ) ; map . add ( propertyName , propInfo ) ; } if ( propInfo -> propID && RuntimeCSSEnabled :: isCSSPropertyEnabled ( propInfo -> propID ) ) return propInfo ; return 0 ; }
When getting properties on CSSStyleDeclarations, the name used from
Javascript and the actual name of the property are not the same, so
we have to do the following translation.
When getting properties on CSSStyleDeclarations the name used from Javascript and the actual name of the property are not the same so we have to do the following translation .