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

Side by Side Diff: third_party/google_input_tools/src/chrome/os/inputview/util.js

Issue 1046933003: Updates google-input-tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved.
2 // limitations under the License. 2 // limitations under the License.
3 // See the License for the specific language governing permissions and 3 // See the License for the specific language governing permissions and
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5 // distributed under the License is distributed on an "AS-IS" BASIS, 5 // distributed under the License is distributed on an "AS-IS" BASIS,
6 // Unless required by applicable law or agreed to in writing, software 6 // Unless required by applicable law or agreed to in writing, software
7 // 7 //
8 // http://www.apache.org/licenses/LICENSE-2.0 8 // http://www.apache.org/licenses/LICENSE-2.0
9 // 9 //
10 // You may obtain a copy of the License at 10 // You may obtain a copy of the License at
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 }; 275 };
276 276
277 277
278 /** 278 /**
279 * Whether this is a letter key. 279 * Whether this is a letter key.
280 * 280 *
281 * @param {!Array.<string>} characters The characters. 281 * @param {!Array.<string>} characters The characters.
282 * @return {boolean} True if this is a letter key. 282 * @return {boolean} True if this is a letter key.
283 */ 283 */
284 util.isLetterKey = function(characters) { 284 util.isLetterKey = function(characters) {
285 if (characters[0] == characters[1]) {
286 return false;
287 }
288
285 if (characters[1] == util.toUpper( 289 if (characters[1] == util.toUpper(
286 characters[0]) || characters[1] == util. 290 characters[0]) || characters[1] == util.
287 toLower(characters[0])) { 291 toLower(characters[0])) {
288 return true; 292 return true;
289 } 293 }
290 return false; 294 return false;
291 }; 295 };
292 296
293 297
294 /** 298 /**
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 * @param {string} oldContext The old context. 385 * @param {string} oldContext The old context.
382 * @param {string} newContext The new context. 386 * @param {string} newContext The new context.
383 * 387 *
384 * @return {boolean} Whether the transform is valid. 388 * @return {boolean} Whether the transform is valid.
385 */ 389 */
386 util.isLetterRestore = function(oldContext, newContext) { 390 util.isLetterRestore = function(oldContext, newContext) {
387 return util.isLetterDelete(newContext, oldContext); 391 return util.isLetterDelete(newContext, oldContext);
388 }; 392 };
389 393
390 }); // goog.scope 394 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698