| 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 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2259 toggleEnabled: function(event) | 2259 toggleEnabled: function(event) |
| 2260 { | 2260 { |
| 2261 var disabled = !event.target.checked; | 2261 var disabled = !event.target.checked; |
| 2262 | 2262 |
| 2263 /** | 2263 /** |
| 2264 * @param {?WebInspector.CSSStyleDeclaration} newStyle | 2264 * @param {?WebInspector.CSSStyleDeclaration} newStyle |
| 2265 * @this {WebInspector.StylePropertyTreeElement} | 2265 * @this {WebInspector.StylePropertyTreeElement} |
| 2266 */ | 2266 */ |
| 2267 function callback(newStyle) | 2267 function callback(newStyle) |
| 2268 { | 2268 { |
| 2269 delete this._parentPane._userOperation; |
| 2270 |
| 2269 if (!newStyle) | 2271 if (!newStyle) |
| 2270 return; | 2272 return; |
| 2271 | 2273 |
| 2272 newStyle.parentRule = this.style.parentRule; | 2274 newStyle.parentRule = this.style.parentRule; |
| 2273 this.style = newStyle; | 2275 this.style = newStyle; |
| 2274 this._styleRule.style = newStyle; | 2276 this._styleRule.style = newStyle; |
| 2275 | 2277 |
| 2276 var section = this.section(); | 2278 var section = this.section(); |
| 2277 if (section && section.pane) | 2279 if (section && section.pane) |
| 2278 section.pane.dispatchEventToListeners("style property toggled"); | 2280 section.pane.dispatchEventToListeners("style property toggled"); |
| 2279 | 2281 |
| 2280 this._updatePane(); | 2282 this._updatePane(); |
| 2281 | |
| 2282 delete this._parentPane._userOperation; | |
| 2283 } | 2283 } |
| 2284 | 2284 |
| 2285 this._parentPane._userOperation = true; | 2285 this._parentPane._userOperation = true; |
| 2286 this.property.setDisabled(disabled, callback.bind(this)); | 2286 this.property.setDisabled(disabled, callback.bind(this)); |
| 2287 event.consume(); | 2287 event.consume(); |
| 2288 }, | 2288 }, |
| 2289 | 2289 |
| 2290 onpopulate: function() | 2290 onpopulate: function() |
| 2291 { | 2291 { |
| 2292 // Only populate once and if this property is a shorthand. | 2292 // Only populate once and if this property is a shorthand. |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3034 return; | 3034 return; |
| 3035 } | 3035 } |
| 3036 | 3036 |
| 3037 var results = this._cssCompletions.startsWith(prefix); | 3037 var results = this._cssCompletions.startsWith(prefix); |
| 3038 var selectedIndex = this._cssCompletions.mostUsedOf(results); | 3038 var selectedIndex = this._cssCompletions.mostUsedOf(results); |
| 3039 completionsReadyCallback(results, selectedIndex); | 3039 completionsReadyCallback(results, selectedIndex); |
| 3040 }, | 3040 }, |
| 3041 | 3041 |
| 3042 __proto__: WebInspector.TextPrompt.prototype | 3042 __proto__: WebInspector.TextPrompt.prototype |
| 3043 } | 3043 } |
| OLD | NEW |