Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate

Issue 2896393002: Remove JS_CONST from CssStyleDeclaration, causes DDC problems (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/dom/templates/html/dart2js/html_dart2js.darttemplate ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 // WARNING: DO NOT EDIT THIS TEMPLATE FILE. 6 // WARNING: DO NOT EDIT THIS TEMPLATE FILE.
7 // The template file was generated by scripts/css_code_generator.py 7 // The template file was generated by scripts/css_code_generator.py
8 8
9 // Source of CSS properties: 9 // Source of CSS properties:
10 // CSSPropertyNames.in 10 // CSSPropertyNames.in
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 $else 98 $else
99 static String _readCache(String key) => null; 99 static String _readCache(String key) => null;
100 static void _writeCache(String key, value) {} 100 static void _writeCache(String key, value) {}
101 $endif 101 $endif
102 102
103 static String _camelCase(String hyphenated) { 103 static String _camelCase(String hyphenated) {
104 $if DART2JS 104 $if DART2JS
105 var replacedMs = JS('String', r'#.replace(/^-ms-/, "ms-")', hyphenated); 105 var replacedMs = JS('String', r'#.replace(/^-ms-/, "ms-")', hyphenated);
106 106
107 var fToUpper = const JS_CONST( 107 var fToUpper = JS('',
108 r'function(_, letter) { return letter.toUpperCase(); }'); 108 r'function(_, letter) { return letter.toUpperCase(); }');
109 return JS('String', r'#.replace(/-([\da-z])/ig, #)', replacedMs, fToUpper); 109 return JS('String', r'#.replace(/-([\da-z])/ig, #)', replacedMs, fToUpper);
sra1 2017/05/23 20:26:18 You could inline it here. return JS('String',
Alan Knight 2017/05/23 21:42:37 Done.
110 $else 110 $else
111 // The "ms" prefix is always lowercased. 111 // The "ms" prefix is always lowercased.
112 return hyphenated.replaceFirst(new RegExp('^-ms-'), 'ms-').replaceAllMapped( 112 return hyphenated.replaceFirst(new RegExp('^-ms-'), 'ms-').replaceAllMapped(
113 new RegExp('-([a-z]+)', caseSensitive: false), 113 new RegExp('-([a-z]+)', caseSensitive: false),
114 (match) => match[0][1].toUpperCase() + match[0].substring(2)); 114 (match) => match[0][1].toUpperCase() + match[0].substring(2));
115 $endif 115 $endif
116 } 116 }
117 117
118 $if DART2JS 118 $if DART2JS
119 void _setPropertyHelper(String propertyName, String value, [String priority]) { 119 void _setPropertyHelper(String propertyName, String value, [String priority]) {
(...skipping 4598 matching lines...) Expand 10 before | Expand all | Expand 10 after
4718 4718
4719 /** Gets the value of "zoom" */ 4719 /** Gets the value of "zoom" */
4720 String get zoom => 4720 String get zoom =>
4721 getPropertyValue('zoom'); 4721 getPropertyValue('zoom');
4722 4722
4723 /** Sets the value of "zoom" */ 4723 /** Sets the value of "zoom" */
4724 set zoom(String value) { 4724 set zoom(String value) {
4725 setProperty('zoom', value, ''); 4725 setProperty('zoom', value, '');
4726 } 4726 }
4727 } 4727 }
OLDNEW
« no previous file with comments | « tools/dom/templates/html/dart2js/html_dart2js.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698