Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: Source/devtools/front_end/ui/TabbedPane.js

Issue 1178003002: DevTools: fix selected tab rendering on non-default zoom levels. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/tabbedPane.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
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; this._currentTab !== this._tabs[i] && this._tabs[i]._sho wn && i < this._tabs.length; 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) scaleX(" + sliderWidth + ")"; 765 this._tabSlider.style.transform = "translateX(" + left + "px)";
766 this._tabSlider.style.width = sliderWidth + "px";
766 }, 767 },
767 768
768 /** 769 /**
769 * @param {!WebInspector.TabbedPaneTab} tab 770 * @param {!WebInspector.TabbedPaneTab} tab
770 */ 771 */
771 _hideTab: function(tab) 772 _hideTab: function(tab)
772 { 773 {
773 tab.tabElement.classList.remove("selected"); 774 tab.tabElement.classList.remove("selected");
774 tab.view.detach(); 775 tab.view.detach();
775 }, 776 },
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 /** 1326 /**
1326 * @param {string} id1 1327 * @param {string} id1
1327 * @param {string} id2 1328 * @param {string} id2
1328 * @return {number} 1329 * @return {number}
1329 */ 1330 */
1330 _tabOrderComparator: function(id1, id2) 1331 _tabOrderComparator: function(id1, id2)
1331 { 1332 {
1332 return this._tabOrders[id2] = this._tabOrders[id1]; 1333 return this._tabOrders[id2] = this._tabOrders[id1];
1333 } 1334 }
1334 } 1335 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/tabbedPane.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698