| Index: tools/dom/scripts/css_code_generator.py
|
| diff --git a/tools/dom/scripts/css_code_generator.py b/tools/dom/scripts/css_code_generator.py
|
| index 668d72355aa009fd0fee6a79d159a6f75324940f..7ea9c100e137c420fdce851271ea5539a7b33f8e 100644
|
| --- a/tools/dom/scripts/css_code_generator.py
|
| +++ b/tools/dom/scripts/css_code_generator.py
|
| @@ -126,18 +126,10 @@ $endif
|
| }
|
|
|
| String _camelCase(String hyphenated) {
|
| - bool firstWord = true;
|
| - return hyphenated.splitMapJoin('-', onMatch : (_) => '',
|
| - onNonMatch : (String word) {
|
| - if (word.length > 0) {
|
| - if (firstWord) {
|
| - firstWord = false;
|
| - return word;
|
| - }
|
| - return word[0].toUpperCase() + word.substring(1);
|
| - }
|
| - return '';
|
| - });
|
| + // The "ms" prefix is always lowercased.
|
| + return hyphenated.replaceFirst(new RegExp('^-ms-'), 'ms-').replaceAllMapped(
|
| + new RegExp('-([a-z]+)', caseSensitive: false),
|
| + (match) => match[0][1].toUpperCase() + match[0].substring(2));
|
| }
|
|
|
| $if DART2JS
|
|
|