OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |