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

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

Issue 2788513002: DevTools: fix overlap in computed styles widget (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 | 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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
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('smallicon-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 var selectorElement = trace.createChild('span', 'property-trace-selector') ;
283 selectorElement.textContent = rule ? rule.selectorText() : 'element.style' ;
284 selectorElement.title = selectorElement.textContent;
285
282 if (rule) { 286 if (rule) {
283 var linkSpan = trace.createChild('span', 'trace-link'); 287 var linkSpan = trace.createChild('span', 'trace-link');
284 linkSpan.appendChild( 288 linkSpan.appendChild(
285 Elements.StylePropertiesSection.createRuleOriginNode(matchedStyles, this._linkifier, rule)); 289 Elements.StylePropertiesSection.createRuleOriginNode(matchedStyles, this._linkifier, rule));
286 } 290 }
287 291
288 var selectorElement = trace.createChild('span', 'property-trace-selector') ;
289 selectorElement.textContent = rule ? rule.selectorText() : 'element.style' ;
290 selectorElement.title = selectorElement.textContent;
291
292 var traceTreeElement = new UI.TreeElement(); 292 var traceTreeElement = new UI.TreeElement();
293 traceTreeElement.title = trace; 293 traceTreeElement.title = trace;
294 traceTreeElement.selectable = false; 294 traceTreeElement.selectable = false;
295 rootTreeElement.appendChild(traceTreeElement); 295 rootTreeElement.appendChild(traceTreeElement);
296 } 296 }
297 return /** @type {!SDK.CSSProperty} */ (activeProperty); 297 return /** @type {!SDK.CSSProperty} */ (activeProperty);
298 } 298 }
299 299
300 /** 300 /**
301 * @param {!SDK.CSSMatchedStyles} matchedStyles 301 * @param {!SDK.CSSMatchedStyles} matchedStyles
(...skipping 39 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 | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698