| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 }, | 327 }, |
| 328 | 328 |
| 329 /** | 329 /** |
| 330 * @param {boolean} dimmed | 330 * @param {boolean} dimmed |
| 331 */ | 331 */ |
| 332 setDimmed: function(dimmed) | 332 setDimmed: function(dimmed) |
| 333 { | 333 { |
| 334 this.element.classList.toggle("toolbar-dimmed", dimmed); | 334 this.element.classList.toggle("toolbar-dimmed", dimmed); |
| 335 }, | 335 }, |
| 336 | 336 |
| 337 addDropDownArrow: function() |
| 338 { |
| 339 this.element.classList.add("toolbar-has-dropdown"); |
| 340 this.element.createChild("div", "toolbar-dropdown-arrow"); |
| 341 }, |
| 342 |
| 337 __proto__: WebInspector.ToolbarItem.prototype | 343 __proto__: WebInspector.ToolbarItem.prototype |
| 338 } | 344 } |
| 339 | 345 |
| 340 /** | 346 /** |
| 341 * @constructor | 347 * @constructor |
| 342 * @extends {WebInspector.ToolbarLabel} | 348 * @extends {WebInspector.ToolbarLabel} |
| 343 * @param {string} title | 349 * @param {string} title |
| 344 * @param {string} glyph | 350 * @param {string} glyph |
| 345 */ | 351 */ |
| 346 WebInspector.ToolbarButton = function(title, glyph) | 352 WebInspector.ToolbarButton = function(title, glyph) |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 * @constructor | 719 * @constructor |
| 714 * @extends {WebInspector.ToolbarItem} | 720 * @extends {WebInspector.ToolbarItem} |
| 715 * @param {?function(!Event)} changeHandler | 721 * @param {?function(!Event)} changeHandler |
| 716 * @param {string=} className | 722 * @param {string=} className |
| 717 */ | 723 */ |
| 718 WebInspector.ToolbarComboBox = function(changeHandler, className) | 724 WebInspector.ToolbarComboBox = function(changeHandler, className) |
| 719 { | 725 { |
| 720 WebInspector.ToolbarItem.call(this, createElementWithClass("span", "toolbar-
select-container")); | 726 WebInspector.ToolbarItem.call(this, createElementWithClass("span", "toolbar-
select-container")); |
| 721 | 727 |
| 722 this._selectElement = this.element.createChild("select", "toolbar-item"); | 728 this._selectElement = this.element.createChild("select", "toolbar-item"); |
| 723 this.element.createChild("div", "toolbar-select-arrow"); | 729 this.element.createChild("div", "toolbar-dropdown-arrow"); |
| 724 if (changeHandler) | 730 if (changeHandler) |
| 725 this._selectElement.addEventListener("change", changeHandler, false); | 731 this._selectElement.addEventListener("change", changeHandler, false); |
| 726 if (className) | 732 if (className) |
| 727 this._selectElement.classList.add(className); | 733 this._selectElement.classList.add(className); |
| 728 } | 734 } |
| 729 | 735 |
| 730 WebInspector.ToolbarComboBox.prototype = { | 736 WebInspector.ToolbarComboBox.prototype = { |
| 731 /** | 737 /** |
| 732 * @return {!HTMLSelectElement} | 738 * @return {!HTMLSelectElement} |
| 733 */ | 739 */ |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 for (var i = 0; i < items.length; ++i) { | 936 for (var i = 0; i < items.length; ++i) { |
| 931 var item = items[i]; | 937 var item = items[i]; |
| 932 if (item) | 938 if (item) |
| 933 this.appendToolbarItem(item); | 939 this.appendToolbarItem(item); |
| 934 } | 940 } |
| 935 } | 941 } |
| 936 }, | 942 }, |
| 937 | 943 |
| 938 __proto__: WebInspector.Toolbar.prototype | 944 __proto__: WebInspector.Toolbar.prototype |
| 939 } | 945 } |
| OLD | NEW |