OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
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 * 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 /** | 349 /** |
350 * @this {WebInspector.ObjectPropertyTreeElement} | 350 * @this {WebInspector.ObjectPropertyTreeElement} |
351 */ | 351 */ |
352 function blurListener() | 352 function blurListener() |
353 { | 353 { |
354 this.editingCommitted(null, elementToEdit.textContent, context.previ
ousContent, context); | 354 this.editingCommitted(null, elementToEdit.textContent, context.previ
ousContent, context); |
355 } | 355 } |
356 | 356 |
357 var proxyElement = this._prompt.attachAndStartEditing(elementToEdit, blu
rListener.bind(this)); | 357 var proxyElement = this._prompt.attachAndStartEditing(elementToEdit, blu
rListener.bind(this)); |
358 window.getSelection().setBaseAndExtent(elementToEdit, 0, elementToEdit,
1); | 358 this.listItemElement.window().getSelection().setBaseAndExtent(elementToE
dit, 0, elementToEdit, 1); |
359 proxyElement.addEventListener("keydown", this._promptKeyDown.bind(this,
context), false); | 359 proxyElement.addEventListener("keydown", this._promptKeyDown.bind(this,
context), false); |
360 }, | 360 }, |
361 | 361 |
362 /** | 362 /** |
363 * @return {boolean} | 363 * @return {boolean} |
364 */ | 364 */ |
365 isEditing: function() | 365 isEditing: function() |
366 { | 366 { |
367 return !!this._prompt; | 367 return !!this._prompt; |
368 }, | 368 }, |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1083 { | 1083 { |
1084 WebInspector.TextPrompt.call(this, WebInspector.ExecutionContextSelector.com
pletionsForTextPromptInCurrentContext); | 1084 WebInspector.TextPrompt.call(this, WebInspector.ExecutionContextSelector.com
pletionsForTextPromptInCurrentContext); |
1085 this.setSuggestBoxEnabled(true); | 1085 this.setSuggestBoxEnabled(true); |
1086 if (renderAsBlock) | 1086 if (renderAsBlock) |
1087 this.renderAsBlock(); | 1087 this.renderAsBlock(); |
1088 } | 1088 } |
1089 | 1089 |
1090 WebInspector.ObjectPropertyPrompt.prototype = { | 1090 WebInspector.ObjectPropertyPrompt.prototype = { |
1091 __proto__: WebInspector.TextPrompt.prototype | 1091 __proto__: WebInspector.TextPrompt.prototype |
1092 } | 1092 } |
OLD | NEW |