| 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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 * @param {!WebInspector.TabbedPaneTab} tab | 513 * @param {!WebInspector.TabbedPaneTab} tab |
| 514 */ | 514 */ |
| 515 _hideTabElement: function(tab) | 515 _hideTabElement: function(tab) |
| 516 { | 516 { |
| 517 this._tabsElement.removeChild(tab.tabElement); | 517 this._tabsElement.removeChild(tab.tabElement); |
| 518 tab._shown = false; | 518 tab._shown = false; |
| 519 }, | 519 }, |
| 520 | 520 |
| 521 _createDropDownButton: function() | 521 _createDropDownButton: function() |
| 522 { | 522 { |
| 523 var dropDownContainer = document.createElementWithClass("div", "tabbed-p
ane-header-tabs-drop-down-container"); | 523 var dropDownContainer = createElementWithClass("div", "tabbed-pane-heade
r-tabs-drop-down-container"); |
| 524 var dropDownButton = dropDownContainer.createChild("div", "tabbed-pane-h
eader-tabs-drop-down"); | 524 var dropDownButton = dropDownContainer.createChild("div", "tabbed-pane-h
eader-tabs-drop-down"); |
| 525 dropDownButton.createTextChild("\u00bb"); | 525 dropDownButton.createTextChild("\u00bb"); |
| 526 | 526 |
| 527 this._dropDownMenu = new WebInspector.DropDownMenu(); | 527 this._dropDownMenu = new WebInspector.DropDownMenu(); |
| 528 this._dropDownMenu.addEventListener(WebInspector.DropDownMenu.Events.Ite
mSelected, this._dropDownMenuItemSelected, this); | 528 this._dropDownMenu.addEventListener(WebInspector.DropDownMenu.Events.Ite
mSelected, this._dropDownMenuItemSelected, this); |
| 529 dropDownButton.appendChild(this._dropDownMenu.element); | 529 dropDownButton.appendChild(this._dropDownMenu.element); |
| 530 | 530 |
| 531 return dropDownContainer; | 531 return dropDownContainer; |
| 532 }, | 532 }, |
| 533 | 533 |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 /** | 919 /** |
| 920 * @param {!WebInspector.TabbedPaneTabDelegate} delegate | 920 * @param {!WebInspector.TabbedPaneTabDelegate} delegate |
| 921 */ | 921 */ |
| 922 setDelegate: function(delegate) | 922 setDelegate: function(delegate) |
| 923 { | 923 { |
| 924 this._delegate = delegate; | 924 this._delegate = delegate; |
| 925 }, | 925 }, |
| 926 | 926 |
| 927 _createIconElement: function(tabElement, titleElement) | 927 _createIconElement: function(tabElement, titleElement) |
| 928 { | 928 { |
| 929 var iconElement = document.createElementWithClass("span", "tabbed-pane-h
eader-tab-icon " + this._iconClass); | 929 var iconElement = createElementWithClass("span", "tabbed-pane-header-tab
-icon " + this._iconClass); |
| 930 if (this._iconTooltip) | 930 if (this._iconTooltip) |
| 931 iconElement.title = this._iconTooltip; | 931 iconElement.title = this._iconTooltip; |
| 932 tabElement.insertBefore(iconElement, titleElement); | 932 tabElement.insertBefore(iconElement, titleElement); |
| 933 return iconElement; | 933 return iconElement; |
| 934 }, | 934 }, |
| 935 | 935 |
| 936 /** | 936 /** |
| 937 * @param {boolean} measuring | 937 * @param {boolean} measuring |
| 938 * @return {!Element} | 938 * @return {!Element} |
| 939 */ | 939 */ |
| 940 _createTabElement: function(measuring) | 940 _createTabElement: function(measuring) |
| 941 { | 941 { |
| 942 var tabElement = document.createElementWithClass("div", "tabbed-pane-hea
der-tab"); | 942 var tabElement = createElementWithClass("div", "tabbed-pane-header-tab")
; |
| 943 tabElement.id = "tab-" + this._id; | 943 tabElement.id = "tab-" + this._id; |
| 944 tabElement.tabIndex = -1; | 944 tabElement.tabIndex = -1; |
| 945 tabElement.selectTabForTest = this._tabbedPane.selectTab.bind(this._tabb
edPane, this.id, true); | 945 tabElement.selectTabForTest = this._tabbedPane.selectTab.bind(this._tabb
edPane, this.id, true); |
| 946 | 946 |
| 947 var titleElement = tabElement.createChild("span", "tabbed-pane-header-ta
b-title"); | 947 var titleElement = tabElement.createChild("span", "tabbed-pane-header-ta
b-title"); |
| 948 titleElement.textContent = this.title; | 948 titleElement.textContent = this.title; |
| 949 titleElement.title = this.tooltip || ""; | 949 titleElement.title = this.tooltip || ""; |
| 950 if (this._iconClass) | 950 if (this._iconClass) |
| 951 this._createIconElement(tabElement, titleElement); | 951 this._createIconElement(tabElement, titleElement); |
| 952 if (!measuring) | 952 if (!measuring) |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 /** | 1247 /** |
| 1248 * @param {string} id1 | 1248 * @param {string} id1 |
| 1249 * @param {string} id2 | 1249 * @param {string} id2 |
| 1250 * @return {number} | 1250 * @return {number} |
| 1251 */ | 1251 */ |
| 1252 _tabOrderComparator: function(id1, id2) | 1252 _tabOrderComparator: function(id1, id2) |
| 1253 { | 1253 { |
| 1254 return this._tabOrders[id2] = this._tabOrders[id1]; | 1254 return this._tabOrders[id2] = this._tabOrders[id1]; |
| 1255 } | 1255 } |
| 1256 } | 1256 } |
| OLD | NEW |