| 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 | 748 |
| 749 /** | 749 /** |
| 750 * @constructor | 750 * @constructor |
| 751 * @extends {WebInspector.StatusBarItem} | 751 * @extends {WebInspector.StatusBarItem} |
| 752 * @param {string} text | 752 * @param {string} text |
| 753 * @param {string=} title | 753 * @param {string=} title |
| 754 * @param {!WebInspector.Setting=} setting | 754 * @param {!WebInspector.Setting=} setting |
| 755 */ | 755 */ |
| 756 WebInspector.StatusBarCheckbox = function(text, title, setting) | 756 WebInspector.StatusBarCheckbox = function(text, title, setting) |
| 757 { | 757 { |
| 758 WebInspector.StatusBarItem.call(this, createElementWithClass("label", "check
box")); | 758 WebInspector.StatusBarItem.call(this, createCheckboxLabel(text)); |
| 759 this.inputElement = this.element.createChild("input"); | 759 this.element.classList.add("checkbox"); |
| 760 this.inputElement.type = "checkbox"; | 760 this.inputElement = this.element.checkboxElement; |
| 761 this.element.createTextChild(text); | |
| 762 if (title) | 761 if (title) |
| 763 this.element.title = title; | 762 this.element.title = title; |
| 764 if (setting) | 763 if (setting) |
| 765 WebInspector.SettingsUI.bindCheckbox(this.inputElement, setting); | 764 WebInspector.SettingsUI.bindCheckbox(this.inputElement, setting); |
| 766 } | 765 } |
| 767 | 766 |
| 768 WebInspector.StatusBarCheckbox.prototype = { | 767 WebInspector.StatusBarCheckbox.prototype = { |
| 769 /** | 768 /** |
| 770 * @return {boolean} | 769 * @return {boolean} |
| 771 */ | 770 */ |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 * @param {!Element} element | 878 * @param {!Element} element |
| 880 */ | 879 */ |
| 881 WebInspector.StatusBarItemWrapper = function(element) | 880 WebInspector.StatusBarItemWrapper = function(element) |
| 882 { | 881 { |
| 883 WebInspector.StatusBarItem.call(this, element, true); | 882 WebInspector.StatusBarItem.call(this, element, true); |
| 884 } | 883 } |
| 885 | 884 |
| 886 WebInspector.StatusBarItemWrapper.prototype = { | 885 WebInspector.StatusBarItemWrapper.prototype = { |
| 887 __proto__: WebInspector.StatusBarItem.prototype | 886 __proto__: WebInspector.StatusBarItem.prototype |
| 888 } | 887 } |
| OLD | NEW |