| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) IBM Corp. 2009 All rights reserved. | 2 * Copyright (C) IBM Corp. 2009 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 442 |
| 443 /** | 443 /** |
| 444 * @return {boolean} | 444 * @return {boolean} |
| 445 */ | 445 */ |
| 446 renderPromptAsBlock: function() | 446 renderPromptAsBlock: function() |
| 447 { | 447 { |
| 448 return true; | 448 return true; |
| 449 }, | 449 }, |
| 450 | 450 |
| 451 /** | 451 /** |
| 452 * @param {!Event=} event | 452 * @override |
| 453 * @return {!Array.<!Element|string>} | 453 * @return {{element: !Element, value: (string|undefined)}} |
| 454 */ | 454 */ |
| 455 elementAndValueToEdit: function(event) | 455 elementAndValueToEdit: function() |
| 456 { | 456 { |
| 457 return [this.nameElement, this.property.name.trim()]; | 457 return { element: this.nameElement, value: this.property.name.trim() }; |
| 458 }, | 458 }, |
| 459 | 459 |
| 460 /** |
| 461 * @override |
| 462 */ |
| 460 editingCancelled: function(element, context) | 463 editingCancelled: function(element, context) |
| 461 { | 464 { |
| 462 if (!context.elementToEdit.textContent) | 465 if (!context.elementToEdit.textContent) |
| 463 this.treeOutline.section.updateExpression(this, null); | 466 this.treeOutline.section.updateExpression(this, null); |
| 464 | 467 |
| 465 WebInspector.ObjectPropertyTreeElement.prototype.editingCancelled.call(t
his, element, context); | 468 WebInspector.ObjectPropertyTreeElement.prototype.editingCancelled.call(t
his, element, context); |
| 466 }, | 469 }, |
| 467 | 470 |
| 468 applyExpression: function(expression, updateInterface) | 471 /** |
| 472 * @override |
| 473 * @param {string} expression |
| 474 */ |
| 475 applyExpression: function(expression) |
| 469 { | 476 { |
| 470 expression = expression.trim(); | 477 expression = expression.trim(); |
| 471 | 478 this.property.name = expression || null; |
| 472 if (!expression) | |
| 473 expression = null; | |
| 474 | |
| 475 this.property.name = expression; | |
| 476 this.treeOutline.section.updateExpression(this, expression); | 479 this.treeOutline.section.updateExpression(this, expression); |
| 477 }, | 480 }, |
| 478 | 481 |
| 479 __proto__: WebInspector.ObjectPropertyTreeElement.prototype | 482 __proto__: WebInspector.ObjectPropertyTreeElement.prototype |
| 480 } | 483 } |
| 481 | 484 |
| 482 | 485 |
| 483 /** | 486 /** |
| 484 * @constructor | 487 * @constructor |
| 485 * @extends {WebInspector.ObjectPropertyTreeElement} | 488 * @extends {WebInspector.ObjectPropertyTreeElement} |
| (...skipping 19 matching lines...) Expand all Loading... |
| 505 }, | 508 }, |
| 506 | 509 |
| 507 oncollapse: function() | 510 oncollapse: function() |
| 508 { | 511 { |
| 509 WebInspector.ObjectPropertyTreeElement.prototype.oncollapse.call(this); | 512 WebInspector.ObjectPropertyTreeElement.prototype.oncollapse.call(this); |
| 510 delete this.treeOutline.section._expandedProperties[this.propertyPath()]
; | 513 delete this.treeOutline.section._expandedProperties[this.propertyPath()]
; |
| 511 }, | 514 }, |
| 512 | 515 |
| 513 __proto__: WebInspector.ObjectPropertyTreeElement.prototype | 516 __proto__: WebInspector.ObjectPropertyTreeElement.prototype |
| 514 } | 517 } |
| OLD | NEW |