Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |