| 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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 this._updateTabSlider(); | 752 this._updateTabSlider(); |
| 753 }, | 753 }, |
| 754 | 754 |
| 755 _updateTabSlider: function() | 755 _updateTabSlider: function() |
| 756 { | 756 { |
| 757 if (!this._currentTab) | 757 if (!this._currentTab) |
| 758 return; | 758 return; |
| 759 if (!this._sliderEnabled) | 759 if (!this._sliderEnabled) |
| 760 return; | 760 return; |
| 761 var left = 0; | 761 var left = 0; |
| 762 for (var i = 0; this._currentTab !== this._tabs[i] && this._tabs[i]._sho
wn && i < this._tabs.length; i++) | 762 for (var i = 0; i < this._tabs.length && this._currentTab !== this._tabs
[i] && this._tabs[i]._shown; i++) |
| 763 left += this._tabs[i]._measuredWidth; | 763 left += this._tabs[i]._measuredWidth; |
| 764 var sliderWidth = this._currentTab._shown ? this._currentTab._measuredWi
dth : this._dropDownButton.offsetWidth; | 764 var sliderWidth = this._currentTab._shown ? this._currentTab._measuredWi
dth : this._dropDownButton.offsetWidth; |
| 765 this._tabSlider.style.transform = "translateX(" + left + "px)"; | 765 this._tabSlider.style.transform = "translateX(" + left + "px)"; |
| 766 this._tabSlider.style.width = sliderWidth + "px"; | 766 this._tabSlider.style.width = sliderWidth + "px"; |
| 767 }, | 767 }, |
| 768 | 768 |
| 769 /** | 769 /** |
| 770 * @param {!WebInspector.TabbedPaneTab} tab | 770 * @param {!WebInspector.TabbedPaneTab} tab |
| 771 */ | 771 */ |
| 772 _hideTab: function(tab) | 772 _hideTab: function(tab) |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1334 * @param {string} id2 | 1334 * @param {string} id2 |
| 1335 * @return {number} | 1335 * @return {number} |
| 1336 */ | 1336 */ |
| 1337 _tabOrderComparator: function(id1, id2) | 1337 _tabOrderComparator: function(id1, id2) |
| 1338 { | 1338 { |
| 1339 var weight1 = id1 in this._tabOrders ? this._tabOrders[id1] : 1000000; | 1339 var weight1 = id1 in this._tabOrders ? this._tabOrders[id1] : 1000000; |
| 1340 var weight2 = id2 in this._tabOrders ? this._tabOrders[id2] : 1000000; | 1340 var weight2 = id2 in this._tabOrders ? this._tabOrders[id2] : 1000000; |
| 1341 return weight1 - weight2; | 1341 return weight1 - weight2; |
| 1342 } | 1342 } |
| 1343 } | 1343 } |
| OLD | NEW |