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

Side by Side Diff: chrome/third_party/jstemplate/jstemplate_compiled.js

Issue 71005: Merge 13114 - Make the font family and the font size used in dom UI localizab... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: '' Created 11 years, 8 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 | « chrome/third_party/jstemplate/jstemplate.js ('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 * @fileoverview This file contains miscellaneous basic functionality. 2 * @fileoverview This file contains miscellaneous basic functionality.
3 * 3 *
4 */ 4 */
5 5
6 /** 6 /**
7 * Creates a DOM element with the given tag name in the document of the 7 * Creates a DOM element with the given tag name in the document of the
8 * owner element. 8 * owner element.
9 * 9 *
10 * @param {String} tagName The name of the tag to create. 10 * @param {String} tagName The name of the tag to create.
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 if (colon < 0) { 1098 if (colon < 0) {
1099 continue; 1099 continue;
1100 } 1100 }
1101 var label = stringTrim(values[i].substr(0, colon)); 1101 var label = stringTrim(values[i].substr(0, colon));
1102 var value = context.jseval(values[i].substr(colon + 1), template); 1102 var value = context.jseval(values[i].substr(colon + 1), template);
1103 1103
1104 if (label.charAt(0) == '$') { 1104 if (label.charAt(0) == '$') {
1105 context.setVariable(label, value); 1105 context.setVariable(label, value);
1106 1106
1107 } else if (label.charAt(0) == '.') { 1107 } else if (label.charAt(0) == '.') {
1108 template[label.substr(1)] = value; 1108 var nameSpaceLabel = label.substr(1).split('.');
1109 1109 var nameSpaceObject = template;
1110 var nameSpaceDepth = jsLength(nameSpaceLabel);
1111 for (var j = 0, J = nameSpaceDepth - 1; j < J; ++j) {
1112 var jLabel = nameSpaceLabel[j];
1113 if (!nameSpaceObject[jLabel]) {
1114 nameSpaceObject[jLabel] = {};
1115 }
1116 nameSpaceObject = nameSpaceObject[jLabel];
1117 }
1118 nameSpaceObject[nameSpaceLabel[nameSpaceDepth - 1]] = value;
1110 } else if (label) { 1119 } else if (label) {
1111 if (typeof value == 'boolean') { 1120 if (typeof value == 'boolean') {
1112 if (value) { 1121 if (value) {
1113 domSetAttribute(template, label, label); 1122 domSetAttribute(template, label, label);
1114 } else { 1123 } else {
1115 domRemoveAttribute(template, label); 1124 domRemoveAttribute(template, label);
1116 } 1125 }
1117 } else { 1126 } else {
1118 domSetAttribute(template, label, '' + value); 1127 domSetAttribute(template, label, '' + value);
1119 } 1128 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 domRemoveAttribute(ret, 'id'); 1173 domRemoveAttribute(ret, 'id');
1165 return ret; 1174 return ret;
1166 } else { 1175 } else {
1167 return null; 1176 return null;
1168 } 1177 }
1169 } 1178 }
1170 1179
1171 window['jstGetTemplate'] = jstGetTemplate; 1180 window['jstGetTemplate'] = jstGetTemplate;
1172 window['jstProcess'] = jstProcess; 1181 window['jstProcess'] = jstProcess;
1173 window['JsExprContext'] = JsExprContext; 1182 window['JsExprContext'] = JsExprContext;
OLDNEW
« no previous file with comments | « chrome/third_party/jstemplate/jstemplate.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698