Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: Source/devtools/front_end/elements/ComputedStyleWidget.js

Issue 1315723004: DevTools: [CSSP] put -webkit properties to the end of the list. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase tests Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/inspector/elements/styles-2/inject-stylesheet-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 treeElement.listItemElement.addEventListener("dblclick", consume Event, false); 181 treeElement.listItemElement.addEventListener("dblclick", consume Event, false);
182 treeElement.listItemElement.addEventListener("click", handleClic k.bind(null, treeElement), false); 182 treeElement.listItemElement.addEventListener("click", handleClic k.bind(null, treeElement), false);
183 } 183 }
184 } 184 }
185 185
186 this._updateFilter(this._filterRegex); 186 this._updateFilter(this._filterRegex);
187 187
188 /** 188 /**
189 * @param {string} a 189 * @param {string} a
190 * @param {string} b 190 * @param {string} b
191 * @return {number}
191 */ 192 */
192 function propertySorter(a, b) 193 function propertySorter(a, b)
193 { 194 {
195 if (a.startsWith("-webkit") ^ b.startsWith("-webkit"))
196 return a.startsWith("-webkit") ? 1 : -1;
194 var canonicalName = WebInspector.CSSMetadata.canonicalPropertyName; 197 var canonicalName = WebInspector.CSSMetadata.canonicalPropertyName;
195 return canonicalName(a).compareTo(canonicalName(b)); 198 return canonicalName(a).compareTo(canonicalName(b));
196 } 199 }
197 200
198 /** 201 /**
199 * @param {!TreeElement} treeElement 202 * @param {!TreeElement} treeElement
200 * @param {!Event} event 203 * @param {!Event} event
201 */ 204 */
202 function handleClick(treeElement, event) 205 function handleClick(treeElement, event)
203 { 206 {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 var children = this._propertiesOutline.rootElement().children(); 291 var children = this._propertiesOutline.rootElement().children();
289 for (var child of children) { 292 for (var child of children) {
290 var property = child[WebInspector.ComputedStyleWidget._propertySymbo l]; 293 var property = child[WebInspector.ComputedStyleWidget._propertySymbo l];
291 var matched = !regex || regex.test(property.name) || regex.test(prop erty.value); 294 var matched = !regex || regex.test(property.name) || regex.test(prop erty.value);
292 child.hidden = !matched; 295 child.hidden = !matched;
293 } 296 }
294 }, 297 },
295 298
296 __proto__: WebInspector.ThrottledWidget.prototype 299 __proto__: WebInspector.ThrottledWidget.prototype
297 } 300 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/elements/styles-2/inject-stylesheet-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698