Chromium Code Reviews| 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 738 this._contextMenuHandler(contextMenu); | 738 this._contextMenuHandler(contextMenu); |
| 739 contextMenu.show(); | 739 contextMenu.show(); |
| 740 this._lastTriggerTime = Date.now(); | 740 this._lastTriggerTime = Date.now(); |
| 741 } | 741 } |
| 742 | 742 |
| 743 /** | 743 /** |
| 744 * @override | 744 * @override |
| 745 * @param {!Event} event | 745 * @param {!Event} event |
| 746 */ | 746 */ |
| 747 _clicked(event) { | 747 _clicked(event) { |
| 748 if (!this._triggerTimeout) | |
|
pfeldman
2017/03/29 21:54:20
Why did this change?
| |
| 749 return; | |
| 750 clearTimeout(this._triggerTimeout); | 748 clearTimeout(this._triggerTimeout); |
| 751 this._trigger(event); | 749 this._trigger(event); |
| 752 } | 750 } |
| 753 }; | 751 }; |
| 754 | 752 |
| 755 /** | 753 /** |
| 756 * @unrestricted | 754 * @unrestricted |
| 757 */ | 755 */ |
| 758 UI.ToolbarSettingToggle = class extends UI.ToolbarToggle { | 756 UI.ToolbarSettingToggle = class extends UI.ToolbarToggle { |
| 759 /** | 757 /** |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 829 UI.ToolbarComboBox = class extends UI.ToolbarItem { | 827 UI.ToolbarComboBox = class extends UI.ToolbarItem { |
| 830 /** | 828 /** |
| 831 * @param {?function(!Event)} changeHandler | 829 * @param {?function(!Event)} changeHandler |
| 832 * @param {string=} className | 830 * @param {string=} className |
| 833 */ | 831 */ |
| 834 constructor(changeHandler, className) { | 832 constructor(changeHandler, className) { |
| 835 super(createElementWithClass('span', 'toolbar-select-container')); | 833 super(createElementWithClass('span', 'toolbar-select-container')); |
| 836 | 834 |
| 837 this._selectElement = this.element.createChild('select', 'toolbar-item'); | 835 this._selectElement = this.element.createChild('select', 'toolbar-item'); |
| 838 var dropdownArrowIcon = UI.Icon.create('smallicon-triangle-down', 'toolbar-d ropdown-arrow'); | 836 var dropdownArrowIcon = UI.Icon.create('smallicon-triangle-down', 'toolbar-d ropdown-arrow'); |
| 837 | |
|
pfeldman
2017/03/29 21:54:20
Why did this change?
einbinder
2017/03/29 22:03:17
You caught me before I looked over the diff.
| |
| 839 this.element.appendChild(dropdownArrowIcon); | 838 this.element.appendChild(dropdownArrowIcon); |
| 840 if (changeHandler) | 839 if (changeHandler) |
| 841 this._selectElement.addEventListener('change', changeHandler, false); | 840 this._selectElement.addEventListener('change', changeHandler, false); |
| 842 if (className) | 841 if (className) |
| 843 this._selectElement.classList.add(className); | 842 this._selectElement.classList.add(className); |
| 844 } | 843 } |
| 845 | 844 |
| 846 /** | 845 /** |
| 847 * @return {!HTMLSelectElement} | 846 * @return {!HTMLSelectElement} |
| 848 */ | 847 */ |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1054 /** | 1053 /** |
| 1055 * @param {!Common.Setting} setting | 1054 * @param {!Common.Setting} setting |
| 1056 * @param {string=} tooltip | 1055 * @param {string=} tooltip |
| 1057 * @param {string=} alternateTitle | 1056 * @param {string=} alternateTitle |
| 1058 */ | 1057 */ |
| 1059 constructor(setting, tooltip, alternateTitle) { | 1058 constructor(setting, tooltip, alternateTitle) { |
| 1060 super(alternateTitle || setting.title() || '', tooltip); | 1059 super(alternateTitle || setting.title() || '', tooltip); |
| 1061 UI.SettingsUI.bindCheckbox(this.inputElement, setting); | 1060 UI.SettingsUI.bindCheckbox(this.inputElement, setting); |
| 1062 } | 1061 } |
| 1063 }; | 1062 }; |
| OLD | NEW |