Index: sdk/lib/html/dartium/html_dartium.dart |
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart |
index c8ffdd6d5dad4a1bf436fc78e8c6b3444a2ab8d9..69df1e476921d45626d305f57592e653332ac93d 100644 |
--- a/sdk/lib/html/dartium/html_dartium.dart |
+++ b/sdk/lib/html/dartium/html_dartium.dart |
@@ -4284,14 +4284,25 @@ class CssRule extends NativeFieldWrapperClass2 { |
@DomName('CSSStyleDeclaration.setProperty') |
void setProperty(String propertyName, String value, [String priority]) { |
+ return _setPropertyHelper(_browserPropertyName(propertyName), |
+ value, priority); |
+ } |
+ |
+ String _browserPropertyName(String propertyName) { |
+ String name = _readCache(propertyName); |
+ if (name is String) return name; |
if (_supportsProperty(_camelCase(propertyName))) { |
- return _setPropertyHelper(propertyName, value, priority); |
+ name = propertyName; |
} else { |
- return _setPropertyHelper(Device.cssPrefix + propertyName, value, |
- priority); |
+ name = Device.cssPrefix + propertyName; |
} |
+ _writeCache(propertyName, name); |
+ return name; |
} |
+ static String _readCache(String key) => null; |
+ static void _writeCache(String key, value) {} |
+ |
static String _camelCase(String hyphenated) { |
// The "ms" prefix is always lowercased. |
return hyphenated.replaceFirst(new RegExp('^-ms-'), 'ms-').replaceAllMapped( |