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

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

Issue 2153153003: DevTools: remove dead code, disambiguate expand for sections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 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
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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 } 423 }
424 }, 424 },
425 425
426 /** 426 /**
427 * @param {!WebInspector.StylePropertiesSection} insertAfterSection 427 * @param {!WebInspector.StylePropertiesSection} insertAfterSection
428 * @param {string} styleSheetId 428 * @param {string} styleSheetId
429 * @param {!WebInspector.TextRange} ruleLocation 429 * @param {!WebInspector.TextRange} ruleLocation
430 */ 430 */
431 _addBlankSection: function(insertAfterSection, styleSheetId, ruleLocation) 431 _addBlankSection: function(insertAfterSection, styleSheetId, ruleLocation)
432 { 432 {
433 this.expand(); 433 this.expandPane();
434 var node = this.node(); 434 var node = this.node();
435 var blankSection = new WebInspector.BlankStylePropertiesSection(this, in sertAfterSection._matchedStyles, node ? WebInspector.DOMPresentationUtils.simple Selector(node) : "", styleSheetId, ruleLocation, insertAfterSection._style); 435 var blankSection = new WebInspector.BlankStylePropertiesSection(this, in sertAfterSection._matchedStyles, node ? WebInspector.DOMPresentationUtils.simple Selector(node) : "", styleSheetId, ruleLocation, insertAfterSection._style);
436 436
437 this._sectionsContainer.insertBefore(blankSection.element, insertAfterSe ction.element.nextSibling); 437 this._sectionsContainer.insertBefore(blankSection.element, insertAfterSe ction.element.nextSibling);
438 438
439 for (var block of this._sectionBlocks) { 439 for (var block of this._sectionBlocks) {
440 var index = block.sections.indexOf(insertAfterSection); 440 var index = block.sections.indexOf(insertAfterSection);
441 if (index === -1) 441 if (index === -1)
442 continue; 442 continue;
443 block.sections.splice(index + 1, 0, blankSection); 443 block.sections.splice(index + 1, 0, blankSection);
(...skipping 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after
3109 3109
3110 /** 3110 /**
3111 * @override 3111 * @override
3112 * @return {!WebInspector.ToolbarItem} 3112 * @return {!WebInspector.ToolbarItem}
3113 */ 3113 */
3114 item: function() 3114 item: function()
3115 { 3115 {
3116 return this._button; 3116 return this._button;
3117 } 3117 }
3118 } 3118 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698