| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 */ | 809 */ |
| 810 elementsToRestoreScrollPositionsFor() { | 810 elementsToRestoreScrollPositionsFor() { |
| 811 return [this._contentElement]; | 811 return [this._contentElement]; |
| 812 } | 812 } |
| 813 | 813 |
| 814 /** | 814 /** |
| 815 * @param {!UI.TabbedPaneTab} tab | 815 * @param {!UI.TabbedPaneTab} tab |
| 816 * @param {number} index | 816 * @param {number} index |
| 817 */ | 817 */ |
| 818 _insertBefore(tab, index) { | 818 _insertBefore(tab, index) { |
| 819 this._tabsElement.insertBefore(tab._tabElement || null, this._tabsElement.ch
ildNodes[index]); | 819 this._tabsElement.insertBefore(tab.tabElement, this._tabsElement.childNodes[
index]); |
| 820 var oldIndex = this._tabs.indexOf(tab); | 820 var oldIndex = this._tabs.indexOf(tab); |
| 821 this._tabs.splice(oldIndex, 1); | 821 this._tabs.splice(oldIndex, 1); |
| 822 if (oldIndex < index) | 822 if (oldIndex < index) |
| 823 --index; | 823 --index; |
| 824 this._tabs.splice(index, 0, tab); | 824 this._tabs.splice(index, 0, tab); |
| 825 this.dispatchEventToListeners(UI.TabbedPane.Events.TabOrderChanged, this._ta
bs); | 825 this.dispatchEventToListeners(UI.TabbedPane.Events.TabOrderChanged, this._ta
bs); |
| 826 } | 826 } |
| 827 | 827 |
| 828 /** | 828 /** |
| 829 * @return {!UI.Toolbar} | 829 * @return {!UI.Toolbar} |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 | 1074 |
| 1075 /** | 1075 /** |
| 1076 * @param {boolean} measuring | 1076 * @param {boolean} measuring |
| 1077 * @return {!Element} | 1077 * @return {!Element} |
| 1078 */ | 1078 */ |
| 1079 _createTabElement(measuring) { | 1079 _createTabElement(measuring) { |
| 1080 var tabElement = createElementWithClass('div', 'tabbed-pane-header-tab'); | 1080 var tabElement = createElementWithClass('div', 'tabbed-pane-header-tab'); |
| 1081 tabElement.id = 'tab-' + this._id; | 1081 tabElement.id = 'tab-' + this._id; |
| 1082 UI.ARIAUtils.markAsTab(tabElement); | 1082 UI.ARIAUtils.markAsTab(tabElement); |
| 1083 UI.ARIAUtils.setSelected(tabElement, false); | 1083 UI.ARIAUtils.setSelected(tabElement, false); |
| 1084 tabElement.selectTabForTest = this._tabbedPane.selectTab.bind(this._tabbedPa
ne, this.id, true); | |
| 1085 | 1084 |
| 1086 var titleElement = tabElement.createChild('span', 'tabbed-pane-header-tab-ti
tle'); | 1085 var titleElement = tabElement.createChild('span', 'tabbed-pane-header-tab-ti
tle'); |
| 1087 titleElement.textContent = this.title; | 1086 titleElement.textContent = this.title; |
| 1088 titleElement.title = this.tooltip || ''; | 1087 titleElement.title = this.tooltip || ''; |
| 1089 this._createIconElement(tabElement, titleElement, measuring); | 1088 this._createIconElement(tabElement, titleElement, measuring); |
| 1090 if (!measuring) | 1089 if (!measuring) |
| 1091 this._titleElement = titleElement; | 1090 this._titleElement = titleElement; |
| 1092 | 1091 |
| 1093 if (this._closeable) | 1092 if (this._closeable) |
| 1094 tabElement.createChild('div', 'tabbed-pane-close-button', 'dt-close-button
').gray = true; | 1093 tabElement.createChild('div', 'tabbed-pane-close-button', 'dt-close-button
').gray = true; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1272 * @param {!Array.<string>} ids | 1271 * @param {!Array.<string>} ids |
| 1273 */ | 1272 */ |
| 1274 closeTabs(tabbedPane, ids) {}, | 1273 closeTabs(tabbedPane, ids) {}, |
| 1275 | 1274 |
| 1276 /** | 1275 /** |
| 1277 * @param {string} tabId | 1276 * @param {string} tabId |
| 1278 * @param {!UI.ContextMenu} contextMenu | 1277 * @param {!UI.ContextMenu} contextMenu |
| 1279 */ | 1278 */ |
| 1280 onContextMenu(tabId, contextMenu) {} | 1279 onContextMenu(tabId, contextMenu) {} |
| 1281 }; | 1280 }; |
| OLD | NEW |