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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 console.assert(propertyValue); | 159 console.assert(propertyValue); |
160 WebInspector.ObjectPropertyTreeElement.populate(this, propertyValue); | 160 WebInspector.ObjectPropertyTreeElement.populate(this, propertyValue); |
161 }, | 161 }, |
162 | 162 |
163 /** | 163 /** |
164 * @override | 164 * @override |
165 * @return {boolean} | 165 * @return {boolean} |
166 */ | 166 */ |
167 ondblclick: function(event) | 167 ondblclick: function(event) |
168 { | 168 { |
169 if ((this.property.writable || this.property.setter) && event.target.isS
elfOrDescendant(this.valueElement)) | 169 var editableElement = this.elementAndValueToEdit().element; |
| 170 if ((this.property.writable || this.property.setter) && event.target.isS
elfOrDescendant(editableElement)) |
170 this.startEditing(event); | 171 this.startEditing(event); |
171 return false; | 172 return false; |
172 }, | 173 }, |
173 | 174 |
174 /** | 175 /** |
175 * @override | 176 * @override |
176 */ | 177 */ |
177 onattach: function() | 178 onattach: function() |
178 { | 179 { |
179 this.update(); | 180 this.update(); |
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 { | 1083 { |
1083 WebInspector.TextPrompt.call(this, WebInspector.ExecutionContextSelector.com
pletionsForTextPromptInCurrentContext); | 1084 WebInspector.TextPrompt.call(this, WebInspector.ExecutionContextSelector.com
pletionsForTextPromptInCurrentContext); |
1084 this.setSuggestBoxEnabled(true); | 1085 this.setSuggestBoxEnabled(true); |
1085 if (renderAsBlock) | 1086 if (renderAsBlock) |
1086 this.renderAsBlock(); | 1087 this.renderAsBlock(); |
1087 } | 1088 } |
1088 | 1089 |
1089 WebInspector.ObjectPropertyPrompt.prototype = { | 1090 WebInspector.ObjectPropertyPrompt.prototype = { |
1090 __proto__: WebInspector.TextPrompt.prototype | 1091 __proto__: WebInspector.TextPrompt.prototype |
1091 } | 1092 } |
OLD | NEW |