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

Side by Side Diff: Source/devtools/front_end/StylesSidebarPane.js

Issue 83123002: DevTools: Move DOMNode.appropriateSelectorFor() into DOMPresentationUtil. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | « Source/devtools/front_end/LayerTree.js ('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 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 747
748 _createNewRule: function(event) 748 _createNewRule: function(event)
749 { 749 {
750 event.consume(); 750 event.consume();
751 this.expand(); 751 this.expand();
752 this.addBlankSection().startEditingSelector(); 752 this.addBlankSection().startEditingSelector();
753 }, 753 },
754 754
755 addBlankSection: function() 755 addBlankSection: function()
756 { 756 {
757 var blankSection = new WebInspector.BlankStylePropertiesSection(this, th is.node ? this.node.appropriateSelectorFor(true) : ""); 757 var blankSection = new WebInspector.BlankStylePropertiesSection(this, th is.node ? WebInspector.DOMPresentationUtils.appropriateSelectorFor(this.node, tr ue) : "");
758 758
759 var elementStyleSection = this.sections[0][1]; 759 var elementStyleSection = this.sections[0][1];
760 this._sectionsContainer.insertBefore(blankSection.element, elementStyleS ection.element.nextSibling); 760 this._sectionsContainer.insertBefore(blankSection.element, elementStyleS ection.element.nextSibling);
761 761
762 this.sections[0].splice(2, 0, blankSection); 762 this.sections[0].splice(2, 0, blankSection);
763 763
764 return blankSection; 764 return blankSection;
765 }, 765 },
766 766
767 removeSection: function(section) 767 removeSection: function(section)
(...skipping 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2896 return; 2896 return;
2897 } 2897 }
2898 2898
2899 var results = this._cssCompletions.startsWith(prefix); 2899 var results = this._cssCompletions.startsWith(prefix);
2900 var selectedIndex = this._cssCompletions.mostUsedOf(results); 2900 var selectedIndex = this._cssCompletions.mostUsedOf(results);
2901 completionsReadyCallback(results, selectedIndex); 2901 completionsReadyCallback(results, selectedIndex);
2902 }, 2902 },
2903 2903
2904 __proto__: WebInspector.TextPrompt.prototype 2904 __proto__: WebInspector.TextPrompt.prototype
2905 } 2905 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/LayerTree.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698