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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 | 224 |
225 this._innerUpdate(refresh); | 225 this._innerUpdate(refresh); |
226 }, | 226 }, |
227 | 227 |
228 _executeRebuildUpdate: function(node, callback) | 228 _executeRebuildUpdate: function(node, callback) |
229 { | 229 { |
230 var resultStyles = {}; | 230 var resultStyles = {}; |
231 | 231 |
232 function stylesCallback(matchedResult) | 232 function stylesCallback(matchedResult) |
233 { | 233 { |
234 if (matchedResult) { | 234 if (matchedResult && this.node === node) { |
235 resultStyles.matchedCSSRules = matchedResult.matchedCSSRules; | 235 resultStyles.matchedCSSRules = matchedResult.matchedCSSRules; |
236 resultStyles.pseudoElements = matchedResult.pseudoElements; | 236 resultStyles.pseudoElements = matchedResult.pseudoElements; |
237 resultStyles.inherited = matchedResult.inherited; | 237 resultStyles.inherited = matchedResult.inherited; |
238 this._rebuildUpdate(node, resultStyles); | 238 this._rebuildUpdate(node, resultStyles); |
239 } | 239 } |
240 if (callback) | 240 if (callback) |
241 callback(); | 241 callback(); |
242 } | 242 } |
243 | 243 |
244 function inlineCallback(inlineStyle, styleAttributes) | 244 function inlineCallback(inlineStyle, styleAttributes) |
(...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2354 var prefix = wordRange.toString().toLowerCase(); | 2354 var prefix = wordRange.toString().toLowerCase(); |
2355 if (!prefix && !force) | 2355 if (!prefix && !force) |
2356 return; | 2356 return; |
2357 | 2357 |
2358 var results = this._cssCompletions.startsWith(prefix); | 2358 var results = this._cssCompletions.startsWith(prefix); |
2359 completionsReadyCallback(results); | 2359 completionsReadyCallback(results); |
2360 } | 2360 } |
2361 } | 2361 } |
2362 | 2362 |
2363 WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype.__proto__ = WebInspec
tor.TextPrompt.prototype; | 2363 WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype.__proto__ = WebInspec
tor.TextPrompt.prototype; |
OLD | NEW |