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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1262 { | 1262 { |
1263 if (this.styleRule.selectorText()) | 1263 if (this.styleRule.selectorText()) |
1264 this._selectorElement.textContent = this.styleRule.selectorText(); | 1264 this._selectorElement.textContent = this.styleRule.selectorText(); |
1265 this._markSelectorMatches(); | 1265 this._markSelectorMatches(); |
1266 if (full) { | 1266 if (full) { |
1267 this.propertiesTreeOutline.removeChildren(); | 1267 this.propertiesTreeOutline.removeChildren(); |
1268 this.onpopulate(); | 1268 this.onpopulate(); |
1269 } else { | 1269 } else { |
1270 var child = this.propertiesTreeOutline.firstChild(); | 1270 var child = this.propertiesTreeOutline.firstChild(); |
1271 while (child) { | 1271 while (child) { |
1272 child.setOverloaded(this.styleRule.isPropertyOverloaded(child.na
me, child.isShorthand)); | 1272 child.setOverloaded(this.styleRule.isPropertyOverloaded(child.na
me)); |
1273 child = child.traverseNextTreeElement(false, null, true); | 1273 child = child.traverseNextTreeElement(false, null, true); |
1274 } | 1274 } |
1275 } | 1275 } |
1276 this.afterUpdate(); | 1276 this.afterUpdate(); |
1277 }, | 1277 }, |
1278 | 1278 |
1279 afterUpdate: function() | 1279 afterUpdate: function() |
1280 { | 1280 { |
1281 if (this._afterUpdate) { | 1281 if (this._afterUpdate) { |
1282 this._afterUpdate(this); | 1282 this._afterUpdate(this); |
1283 delete this._afterUpdate; | 1283 delete this._afterUpdate; |
1284 this._afterUpdateFinishedForTest(); | 1284 this._afterUpdateFinishedForTest(); |
1285 } | 1285 } |
1286 }, | 1286 }, |
1287 | 1287 |
1288 _afterUpdateFinishedForTest: function() | 1288 _afterUpdateFinishedForTest: function() |
1289 { | 1289 { |
1290 }, | 1290 }, |
1291 | 1291 |
1292 onpopulate: function() | 1292 onpopulate: function() |
1293 { | 1293 { |
1294 var style = this.styleRule.style(); | 1294 var style = this.styleRule.style(); |
1295 for (var property of style.leadingProperties()) { | 1295 for (var property of style.leadingProperties()) { |
1296 var isShorthand = !!WebInspector.CSSMetadata.cssPropertiesMetainfo.l
onghands(property.name); | 1296 var isShorthand = !!WebInspector.CSSMetadata.cssPropertiesMetainfo.l
onghands(property.name); |
1297 var inherited = this.isPropertyInherited(property.name); | 1297 var inherited = this.isPropertyInherited(property.name); |
1298 var overloaded = this.styleRule.isPropertyOverloaded(property.name,
isShorthand); | 1298 var overloaded = this.styleRule.isPropertyOverloaded(property.name); |
1299 var item = new WebInspector.StylePropertyTreeElement(this._parentPan
e, this.styleRule, property, isShorthand, inherited, overloaded); | 1299 var item = new WebInspector.StylePropertyTreeElement(this._parentPan
e, this.styleRule, property, isShorthand, inherited, overloaded); |
1300 this.propertiesTreeOutline.appendChild(item); | 1300 this.propertiesTreeOutline.appendChild(item); |
1301 } | 1301 } |
1302 }, | 1302 }, |
1303 | 1303 |
1304 /** | 1304 /** |
1305 * @return {boolean} | 1305 * @return {boolean} |
1306 */ | 1306 */ |
1307 _updateFilter: function() | 1307 _updateFilter: function() |
1308 { | 1308 { |
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3195 | 3195 |
3196 /** | 3196 /** |
3197 * @override | 3197 * @override |
3198 * @return {?WebInspector.ToolbarItem} | 3198 * @return {?WebInspector.ToolbarItem} |
3199 */ | 3199 */ |
3200 item: function() | 3200 item: function() |
3201 { | 3201 { |
3202 return this._button; | 3202 return this._button; |
3203 } | 3203 } |
3204 } | 3204 } |
OLD | NEW |