| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @param {!WebInspector.CSSStyleDeclaration} ownerStyle | 7 * @param {!WebInspector.CSSStyleDeclaration} ownerStyle |
| 8 * @param {number} index | 8 * @param {number} index |
| 9 * @param {string} name | 9 * @param {string} name |
| 10 * @param {string} value | 10 * @param {string} value |
| 11 * @param {boolean} important | 11 * @param {boolean} important |
| 12 * @param {boolean} disabled | 12 * @param {boolean} disabled |
| 13 * @param {boolean} parsedOk | 13 * @param {boolean} parsedOk |
| 14 * @param {boolean} implicit | 14 * @param {boolean} implicit |
| 15 * @param {?string=} text | 15 * @param {?string=} text |
| 16 * @param {!CSSAgent.SourceRange=} range | 16 * @param {!RuntimeAgent.SourceRange=} range |
| 17 */ | 17 */ |
| 18 WebInspector.CSSProperty = function(ownerStyle, index, name, value, important, d
isabled, parsedOk, implicit, text, range) | 18 WebInspector.CSSProperty = function(ownerStyle, index, name, value, important, d
isabled, parsedOk, implicit, text, range) |
| 19 { | 19 { |
| 20 this.ownerStyle = ownerStyle; | 20 this.ownerStyle = ownerStyle; |
| 21 this.index = index; | 21 this.index = index; |
| 22 this.name = name; | 22 this.name = name; |
| 23 this.value = value; | 23 this.value = value; |
| 24 this.important = important; | 24 this.important = important; |
| 25 this.disabled = disabled; | 25 this.disabled = disabled; |
| 26 this.parsedOk = parsedOk; | 26 this.parsedOk = parsedOk; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 { | 233 { |
| 234 if (!this.ownerStyle) | 234 if (!this.ownerStyle) |
| 235 return Promise.resolve(false); | 235 return Promise.resolve(false); |
| 236 if (disabled === this.disabled) | 236 if (disabled === this.disabled) |
| 237 return Promise.resolve(true); | 237 return Promise.resolve(true); |
| 238 var propertyText = this.text.trim(); | 238 var propertyText = this.text.trim(); |
| 239 var text = disabled ? "/* " + propertyText + " */" : this.text.substring
(2, propertyText.length - 2).trim(); | 239 var text = disabled ? "/* " + propertyText + " */" : this.text.substring
(2, propertyText.length - 2).trim(); |
| 240 return this.setText(text, true, true); | 240 return this.setText(text, true, true); |
| 241 } | 241 } |
| 242 } | 242 } |
| OLD | NEW |