Chromium Code Reviews| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 207 } | 207 } |
| 208 | 208 |
| 209 this._updateFilter(this._filterRegex); | 209 this._updateFilter(this._filterRegex); |
| 210 | 210 |
| 211 /** | 211 /** |
| 212 * @param {string} a | 212 * @param {string} a |
| 213 * @param {string} b | 213 * @param {string} b |
| 214 * @return {number} | 214 * @return {number} |
| 215 */ | 215 */ |
| 216 function propertySorter(a, b) { | 216 function propertySorter(a, b) { |
| 217 if (a.startsWith('--') ^ b.startsWith('--')) | |
|
lushnikov
2017/01/23 05:13:20
fyi: "^" is a bit-xor, not a logical xor, so it mi
| |
| 218 return a.startsWith('--') ? 1 : -1; | |
| 217 if (a.startsWith('-webkit') ^ b.startsWith('-webkit')) | 219 if (a.startsWith('-webkit') ^ b.startsWith('-webkit')) |
| 218 return a.startsWith('-webkit') ? 1 : -1; | 220 return a.startsWith('-webkit') ? 1 : -1; |
| 219 var canonical1 = SDK.cssMetadata().canonicalPropertyName(a); | 221 var canonical1 = SDK.cssMetadata().canonicalPropertyName(a); |
| 220 var canonical2 = SDK.cssMetadata().canonicalPropertyName(b); | 222 var canonical2 = SDK.cssMetadata().canonicalPropertyName(b); |
| 221 return canonical1.compareTo(canonical2); | 223 return canonical1.compareTo(canonical2); |
| 222 } | 224 } |
| 223 | 225 |
| 224 /** | 226 /** |
| 225 * @param {!UI.TreeElement} treeElement | 227 * @param {!UI.TreeElement} treeElement |
| 226 * @param {!Event} event | 228 * @param {!Event} event |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 336 var property = child[Elements.ComputedStyleWidget._propertySymbol]; | 338 var property = child[Elements.ComputedStyleWidget._propertySymbol]; |
| 337 var matched = !regex || regex.test(property.name) || regex.test(property.v alue); | 339 var matched = !regex || regex.test(property.name) || regex.test(property.v alue); |
| 338 child.hidden = !matched; | 340 child.hidden = !matched; |
| 339 } | 341 } |
| 340 } | 342 } |
| 341 }; | 343 }; |
| 342 | 344 |
| 343 Elements.ComputedStyleWidget._maxLinkLength = 30; | 345 Elements.ComputedStyleWidget._maxLinkLength = 30; |
| 344 | 346 |
| 345 Elements.ComputedStyleWidget._propertySymbol = Symbol('property'); | 347 Elements.ComputedStyleWidget._propertySymbol = Symbol('property'); |
| OLD | NEW |