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

Unified Diff: chrome/browser/resources/chromeos/chromevox/braille/braille_key_types.js

Issue 2943193002: Run clang-format on .js files in c/b/r/chromeos/chromevox (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/braille/braille_key_types.js
diff --git a/chrome/browser/resources/chromeos/chromevox/braille/braille_key_types.js b/chrome/browser/resources/chromeos/chromevox/braille/braille_key_types.js
index 1f5a0443dd51416b599cbdef5799b96a1ef8ed08..a9ec97ddd0cca38fed27d03bfe83912a74ee7b61 100644
--- a/chrome/browser/resources/chromeos/chromevox/braille/braille_key_types.js
+++ b/chrome/browser/resources/chromeos/chromevox/braille/braille_key_types.js
@@ -84,11 +84,7 @@ cvox.BrailleKeyEvent.keyCodeToLegacyCode = function(code) {
*/
cvox.BrailleKeyEvent.keyCodeToCharValue = function(keyCode) {
/** @const */
- var SPECIAL_CODES = {
- 'Backspace': 0x08,
- 'Tab': 0x09,
- 'Enter': 0x0A
- };
+ var SPECIAL_CODES = {'Backspace': 0x08, 'Tab': 0x09, 'Enter': 0x0A};
// Note, the Chrome virtual keyboard falls back on the first character of the
// key code if the key is not one of the above. Do the same here.
return SPECIAL_CODES[keyCode] || keyCode.charCodeAt(0);
@@ -201,20 +197,20 @@ cvox.BrailleKeyEvent.legacyKeyCodeMap_ = {
};
(function() {
- // Add 0-9.
- for (var i = '0'.charCodeAt(0); i < '9'.charCodeAt(0); ++i) {
- cvox.BrailleKeyEvent.legacyKeyCodeMap_[String.fromCharCode(i)] = i;
- }
-
- // Add A-Z.
- for (var i = 'A'.charCodeAt(0); i < 'Z'.charCodeAt(0); ++i) {
- cvox.BrailleKeyEvent.legacyKeyCodeMap_[String.fromCharCode(i)] = i;
- }
-
- // Add the F1 to F12 keys.
- for (var i = 0; i < 12; ++i) {
- cvox.BrailleKeyEvent.legacyKeyCodeMap_['F' + (i + 1)] = 112 + i;
- }
+// Add 0-9.
+for (var i = '0'.charCodeAt(0); i < '9'.charCodeAt(0); ++i) {
+ cvox.BrailleKeyEvent.legacyKeyCodeMap_[String.fromCharCode(i)] = i;
+}
+
+// Add A-Z.
+for (var i = 'A'.charCodeAt(0); i < 'Z'.charCodeAt(0); ++i) {
+ cvox.BrailleKeyEvent.legacyKeyCodeMap_[String.fromCharCode(i)] = i;
+}
+
+// Add the F1 to F12 keys.
+for (var i = 0; i < 12; ++i) {
+ cvox.BrailleKeyEvent.legacyKeyCodeMap_['F' + (i + 1)] = 112 + i;
+}
})();

Powered by Google App Engine
This is Rietveld 408576698