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

Side by Side Diff: Source/devtools/front_end/elements/Spectrum.js

Issue 1172733002: Devtools: Fix ctrl-z in ColorPicker (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 * Copyright (C) 2011 Brian Grinstead All rights reserved. 2 * Copyright (C) 2011 Brian Grinstead All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 else 298 else
299 this._currentFormat = cf.RGB; 299 this._currentFormat = cf.RGB;
300 this._onchange(); 300 this._onchange();
301 }, 301 },
302 302
303 /** 303 /**
304 * @param {!Event} event 304 * @param {!Event} event
305 */ 305 */
306 _checkForTabEvent: function(event) 306 _checkForTabEvent: function(event)
307 { 307 {
308 if (isEscKey(event) || isEnterKey(event))
pfeldman 2015/06/09 18:24:08 For consistency, we could call WebInspector.markBe
309 return;
310
308 var sibling = event.shiftKey ? event.target.previousSibling : event.targ et.nextSibling; 311 var sibling = event.shiftKey ? event.target.previousSibling : event.targ et.nextSibling;
309 if (event.code !== "Tab" || !sibling || !sibling.classList.contains("spe ctrum-text-value")) 312 if (event.code !== "Tab" || !sibling || !sibling.classList.contains("spe ctrum-text-value")) {
313 event.consume();
310 return; 314 return;
315 }
311 sibling.getComponentSelection().setBaseAndExtent(sibling, 0, sibling, 1) ; 316 sibling.getComponentSelection().setBaseAndExtent(sibling, 0, sibling, 1) ;
312 event.consume(true); 317 event.consume(true);
313 }, 318 },
314 319
315 /** 320 /**
316 * @param {!Event} event 321 * @param {!Event} event
317 */ 322 */
318 _inputChanged: function(event) 323 _inputChanged: function(event)
319 { 324 {
320 /** 325 /**
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 var rgba = [rgbColor.r, rgbColor.g, rgbColor.b, (rgbColor.a / 2.55 | 0) / 100]; 396 var rgba = [rgbColor.r, rgbColor.g, rgbColor.b, (rgbColor.a / 2.55 | 0) / 100];
392 var color = WebInspector.Color.fromRGBA(rgba); 397 var color = WebInspector.Color.fromRGBA(rgba);
393 this.setColor(color); 398 this.setColor(color);
394 this._dispatchChangeEvent(); 399 this._dispatchChangeEvent();
395 InspectorFrontendHost.bringToFront(); 400 InspectorFrontendHost.bringToFront();
396 }, 401 },
397 402
398 403
399 __proto__: WebInspector.VBox.prototype 404 __proto__: WebInspector.VBox.prototype
400 } 405 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698