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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 this._stylesSidebarPane.tracePropertyName(property.name); | 101 this._stylesSidebarPane.tracePropertyName(property.name); |
102 }, | 102 }, |
103 | 103 |
104 _showInheritedComputedStyleChanged: function() | 104 _showInheritedComputedStyleChanged: function() |
105 { | 105 { |
106 this.update(); | 106 this.update(); |
107 }, | 107 }, |
108 | 108 |
109 /** | 109 /** |
110 * @override | 110 * @override |
111 * @param {!WebInspector.Throttler.FinishCallback} finishedCallback | 111 * @return {!Promise.<?>} |
112 */ | 112 */ |
113 doUpdate: function(finishedCallback) | 113 doUpdate: function() |
114 { | 114 { |
115 var promises = [ | 115 var promises = [ |
116 this._sharedModel.fetchComputedStyle(), | 116 this._sharedModel.fetchComputedStyle(), |
117 this._stylesSidebarPane.fetchMatchedCascade() | 117 this._stylesSidebarPane.fetchMatchedCascade() |
118 ]; | 118 ]; |
119 Promise.all(promises) | 119 return Promise.all(promises) |
120 .spread(this._innerRebuildUpdate.bind(this)) | 120 .spread(this._innerRebuildUpdate.bind(this)); |
121 .then(finishedCallback); | |
122 }, | 121 }, |
123 | 122 |
124 /** | 123 /** |
125 * @param {string} text | 124 * @param {string} text |
126 * @return {!Node} | 125 * @return {!Node} |
127 */ | 126 */ |
128 _processColor: function(text) | 127 _processColor: function(text) |
129 { | 128 { |
130 var color = WebInspector.Color.parse(text); | 129 var color = WebInspector.Color.parse(text); |
131 if (!color) | 130 if (!color) |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 for (var i = 0; i < this._propertiesContainer.children.length; ++i) { | 205 for (var i = 0; i < this._propertiesContainer.children.length; ++i) { |
207 var item = this._propertiesContainer.children[i]; | 206 var item = this._propertiesContainer.children[i]; |
208 var property = item[WebInspector.ComputedStyleWidget._propertySymbol
]; | 207 var property = item[WebInspector.ComputedStyleWidget._propertySymbol
]; |
209 var matched = !regex || regex.test(property.name) || regex.test(prop
erty.value); | 208 var matched = !regex || regex.test(property.name) || regex.test(prop
erty.value); |
210 item.classList.toggle("hidden", !matched); | 209 item.classList.toggle("hidden", !matched); |
211 } | 210 } |
212 }, | 211 }, |
213 | 212 |
214 __proto__: WebInspector.ThrottledWidget.prototype | 213 __proto__: WebInspector.ThrottledWidget.prototype |
215 } | 214 } |
OLD | NEW |