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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/KeyboardShortcut.js

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 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 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 /** 249 /**
250 * @param {string|!WebInspector.KeyboardShortcut.Key} key 250 * @param {string|!WebInspector.KeyboardShortcut.Key} key
251 * @return {string} 251 * @return {string}
252 */ 252 */
253 WebInspector.KeyboardShortcut._keyName = function(key) 253 WebInspector.KeyboardShortcut._keyName = function(key)
254 { 254 {
255 if (typeof key === "string") 255 if (typeof key === "string")
256 return key.toUpperCase(); 256 return key.toUpperCase();
257 if (typeof key.name === "string") 257 if (typeof key.name === "string")
258 return key.name; 258 return key.name;
259 return key.name[WebInspector.platform()] || key.name.other || ''; 259 return key.name[WebInspector.platform()] || key.name.other || "";
260 } 260 }
261 261
262 /** 262 /**
263 * @param {number} keyCode 263 * @param {number} keyCode
264 * @param {?number} modifiers 264 * @param {?number} modifiers
265 * @return {number} 265 * @return {number}
266 */ 266 */
267 WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers = function(keyCode, m odifiers) 267 WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers = function(keyCode, m odifiers)
268 { 268 {
269 return (keyCode & 255) | (modifiers << 8); 269 return (keyCode & 255) | (modifiers << 8);
(...skipping 28 matching lines...) Expand all
298 * @param {number} m 298 * @param {number} m
299 * @return {string} 299 * @return {string}
300 */ 300 */
301 function mapModifiers(m) 301 function mapModifiers(m)
302 { 302 {
303 return modifiers & m ? /** @type {string} */ (modifierNames.get(m)) : "" ; 303 return modifiers & m ? /** @type {string} */ (modifierNames.get(m)) : "" ;
304 } 304 }
305 }; 305 };
306 306
307 WebInspector.KeyboardShortcut.SelectAll = WebInspector.KeyboardShortcut.makeKey( "a", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta); 307 WebInspector.KeyboardShortcut.SelectAll = WebInspector.KeyboardShortcut.makeKey( "a", WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698