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

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

Issue 2776883003: DevTools: normalize medium icons (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/computedStyleSidebarPane.css » ('j') | 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 var isOdd = this._propertiesOutline.rootElement().children().length % 2 == = 0; 194 var isOdd = this._propertiesOutline.rootElement().children().length % 2 == = 0;
195 treeElement.listItemElement.classList.toggle('odd-row', isOdd); 195 treeElement.listItemElement.classList.toggle('odd-row', isOdd);
196 this._propertiesOutline.appendChild(treeElement); 196 this._propertiesOutline.appendChild(treeElement);
197 197
198 var trace = propertyTraces.get(propertyName); 198 var trace = propertyTraces.get(propertyName);
199 if (trace) { 199 if (trace) {
200 var activeProperty = this._renderPropertyTrace(cssModel, matchedStyles, nodeStyle.node, treeElement, trace); 200 var activeProperty = this._renderPropertyTrace(cssModel, matchedStyles, nodeStyle.node, treeElement, trace);
201 treeElement.listItemElement.addEventListener('mousedown', e => e.consume (), false); 201 treeElement.listItemElement.addEventListener('mousedown', e => e.consume (), false);
202 treeElement.listItemElement.addEventListener('dblclick', e => e.consume( ), false); 202 treeElement.listItemElement.addEventListener('dblclick', e => e.consume( ), false);
203 treeElement.listItemElement.addEventListener('click', handleClick.bind(n ull, treeElement), false); 203 treeElement.listItemElement.addEventListener('click', handleClick.bind(n ull, treeElement), false);
204 var gotoSourceElement = UI.Icon.create('smallicon-arrow-in-circle', 'got o-source-icon'); 204 var gotoSourceElement = UI.Icon.create('mediumicon-arrow-in-circle', 'go to-source-icon');
205 gotoSourceElement.addEventListener('click', this._navigateToSource.bind( this, activeProperty)); 205 gotoSourceElement.addEventListener('click', this._navigateToSource.bind( this, activeProperty));
206 propertyValueElement.appendChild(gotoSourceElement); 206 propertyValueElement.appendChild(gotoSourceElement);
207 if (expandedProperties.has(propertyName)) 207 if (expandedProperties.has(propertyName))
208 treeElement.expand(); 208 treeElement.expand();
209 } 209 }
210 } 210 }
211 211
212 this._updateFilter(this._filterRegex); 212 this._updateFilter(this._filterRegex);
213 213
214 /** 214 /**
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 trace.classList.add('property-trace-inactive'); 265 trace.classList.add('property-trace-inactive');
266 else 266 else
267 activeProperty = property; 267 activeProperty = property;
268 268
269 var renderer = 269 var renderer =
270 new Elements.StylesSidebarPropertyRenderer(null, node, property.name, /** @type {string} */ (property.value)); 270 new Elements.StylesSidebarPropertyRenderer(null, node, property.name, /** @type {string} */ (property.value));
271 renderer.setColorHandler(this._processColor.bind(this)); 271 renderer.setColorHandler(this._processColor.bind(this));
272 var valueElement = renderer.renderValue(); 272 var valueElement = renderer.renderValue();
273 valueElement.classList.add('property-trace-value'); 273 valueElement.classList.add('property-trace-value');
274 valueElement.addEventListener('click', this._navigateToSource.bind(this, p roperty), false); 274 valueElement.addEventListener('click', this._navigateToSource.bind(this, p roperty), false);
275 var gotoSourceElement = UI.Icon.create('smallicon-arrow-in-circle', 'goto- source-icon'); 275 var gotoSourceElement = UI.Icon.create('mediumicon-arrow-in-circle', 'goto -source-icon');
276 gotoSourceElement.addEventListener('click', this._navigateToSource.bind(th is, property)); 276 gotoSourceElement.addEventListener('click', this._navigateToSource.bind(th is, property));
277 valueElement.insertBefore(gotoSourceElement, valueElement.firstChild); 277 valueElement.insertBefore(gotoSourceElement, valueElement.firstChild);
278 278
279 trace.appendChild(valueElement); 279 trace.appendChild(valueElement);
280 280
281 var rule = property.ownerStyle.parentRule; 281 var rule = property.ownerStyle.parentRule;
282 if (rule) { 282 if (rule) {
283 var linkSpan = trace.createChild('span', 'trace-link'); 283 var linkSpan = trace.createChild('span', 'trace-link');
284 linkSpan.appendChild( 284 linkSpan.appendChild(
285 Elements.StylePropertiesSection.createRuleOriginNode(matchedStyles, this._linkifier, rule)); 285 Elements.StylePropertiesSection.createRuleOriginNode(matchedStyles, this._linkifier, rule));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 var property = child[Elements.ComputedStyleWidget._propertySymbol]; 341 var property = child[Elements.ComputedStyleWidget._propertySymbol];
342 var matched = !regex || regex.test(property.name) || regex.test(property.v alue); 342 var matched = !regex || regex.test(property.name) || regex.test(property.v alue);
343 child.hidden = !matched; 343 child.hidden = !matched;
344 } 344 }
345 } 345 }
346 }; 346 };
347 347
348 Elements.ComputedStyleWidget._maxLinkLength = 30; 348 Elements.ComputedStyleWidget._maxLinkLength = 30;
349 349
350 Elements.ComputedStyleWidget._propertySymbol = Symbol('property'); 350 Elements.ComputedStyleWidget._propertySymbol = Symbol('property');
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/computedStyleSidebarPane.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698