| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 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 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2273 if (this.parent.isShorthand) | 2273 if (this.parent.isShorthand) |
| 2274 return; | 2274 return; |
| 2275 | 2275 |
| 2276 if (selectElement === this._expandElement) | 2276 if (selectElement === this._expandElement) |
| 2277 return; | 2277 return; |
| 2278 | 2278 |
| 2279 var section = this.section(); | 2279 var section = this.section(); |
| 2280 if (section && !section.editable) | 2280 if (section && !section.editable) |
| 2281 return; | 2281 return; |
| 2282 | 2282 |
| 2283 if (selectElement) |
| 2284 selectElement = selectElement.enclosingNodeOrSelfWithClass("webkit-c
ss-property") || selectElement.enclosingNodeOrSelfWithClass("value"); |
| 2283 if (!selectElement) | 2285 if (!selectElement) |
| 2284 selectElement = this.nameElement; // No arguments passed in - edit t
he name element by default. | 2286 selectElement = this.nameElement; |
| 2285 else | |
| 2286 selectElement = selectElement.enclosingNodeOrSelfWithClass("webkit-c
ss-property") || selectElement.enclosingNodeOrSelfWithClass("value"); | |
| 2287 | 2287 |
| 2288 if (WebInspector.isBeingEdited(selectElement)) | 2288 if (WebInspector.isBeingEdited(selectElement)) |
| 2289 return; | 2289 return; |
| 2290 | 2290 |
| 2291 var isEditingName = selectElement === this.nameElement; | 2291 var isEditingName = selectElement === this.nameElement; |
| 2292 if (!isEditingName) | 2292 if (!isEditingName) |
| 2293 this.valueElement.textContent = restoreURLs(this.valueElement.textCo
ntent, this.value); | 2293 this.valueElement.textContent = restoreURLs(this.valueElement.textCo
ntent, this.value); |
| 2294 | 2294 |
| 2295 /** | 2295 /** |
| 2296 * @param {string} fieldValue | 2296 * @param {string} fieldValue |
| (...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3109 | 3109 |
| 3110 /** | 3110 /** |
| 3111 * @override | 3111 * @override |
| 3112 * @return {!WebInspector.ToolbarItem} | 3112 * @return {!WebInspector.ToolbarItem} |
| 3113 */ | 3113 */ |
| 3114 item: function() | 3114 item: function() |
| 3115 { | 3115 { |
| 3116 return this._button; | 3116 return this._button; |
| 3117 } | 3117 } |
| 3118 } | 3118 } |
| OLD | NEW |