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

Side by Side Diff: third_party/jstemplate/jsevalcontext.js

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 | « third_party/jstemplate/README.chromium ('k') | third_party/jstemplate/jstemplate.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006 Google Inc. 1 // Copyright 2006 Google Inc.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 /** 237 /**
238 * Clones the current context for a new context object. The cloned 238 * Clones the current context for a new context object. The cloned
239 * context has the data object as its context object and the current 239 * context has the data object as its context object and the current
240 * context as its parent context. It also sets the $index variable to 240 * context as its parent context. It also sets the $index variable to
241 * the given value. This value usually is the position of the data 241 * the given value. This value usually is the position of the data
242 * object in a list for which a template is instantiated multiply. 242 * object in a list for which a template is instantiated multiply.
243 * 243 *
244 * @param {Object} data The new context object. 244 * @param {Object} data The new context object.
245 * 245 *
246 * @param {number|string} index Position of the new context when multiply 246 * @param {number} index Position of the new context when multiply
247 * instantiated. (See implementation of jstSelect().) 247 * instantiated. (See implementation of jstSelect().)
248 * 248 *
249 * @param {number} count The total number of contexts that were multiply 249 * @param {number} count The total number of contexts that were multiply
250 * instantiated. (See implementation of jstSelect().) 250 * instantiated. (See implementation of jstSelect().)
251 * 251 *
252 * @return {JsEvalContext} 252 * @return {JsEvalContext}
253 */ 253 */
254 JsEvalContext.prototype.clone = function(data, index, count) { 254 JsEvalContext.prototype.clone = function(data, index, count) {
255 var ret = JsEvalContext.create(data, this); 255 var ret = JsEvalContext.create(data, this);
256 ret.setVariable(VAR_index, index); 256 ret.setVariable(VAR_index, index);
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 var ret = []; 400 var ret = [];
401 var values = expr.split(REGEXP_semicolon); 401 var values = expr.split(REGEXP_semicolon);
402 for (var i = 0, I = jsLength(values); i < I; ++i) { 402 for (var i = 0, I = jsLength(values); i < I; ++i) {
403 if (values[i]) { 403 if (values[i]) {
404 var value = jsEvalToFunction(values[i]); 404 var value = jsEvalToFunction(values[i]);
405 ret.push(value); 405 ret.push(value);
406 } 406 }
407 } 407 }
408 return ret; 408 return ret;
409 } 409 }
OLDNEW
« no previous file with comments | « third_party/jstemplate/README.chromium ('k') | third_party/jstemplate/jstemplate.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698