Index: Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp |
diff --git a/Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp b/Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp |
index b15f88962e85c80ec242e505f853125f9b993dc7..dd2411023c388dd70e31efb7bfaf74e60c5482e2 100644 |
--- a/Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp |
+++ b/Source/bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp |
@@ -131,6 +131,8 @@ static CSSPropertyInfo* cssPropertyInfo(v8::Handle<v8::String> v8PropertyName) |
return 0; |
} |
+ bool hasSeenUpper = isASCIIUpper(propertyName[i]); |
+ |
builder.append(toASCIILower(propertyName[i++])); |
for (; i < length; ++i) { |
@@ -141,11 +143,16 @@ static CSSPropertyInfo* cssPropertyInfo(v8::Handle<v8::String> v8PropertyName) |
builder.append(c); |
} |
else { |
+ hasSeenUpper = true; |
builder.append('-'); |
builder.append(toASCIILower(c)); |
} |
} |
+ // Reject names containing both dashes and upper-case characters, such as "border-rightColor". |
+ if (hasSeenDash && hasSeenUpper) |
+ return 0; |
+ |
String propName = builder.toString(); |
CSSPropertyID propertyID = cssPropertyID(propName); |
if (propertyID && RuntimeCSSEnabled::isCSSPropertyEnabled(propertyID)) { |