Changeset 258898 in webkit
- Timestamp:
- Mar 23, 2020 7:22:49 PM (4 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r258848 r258898 1 2020-03-23 Devin Rousso <drousso@apple.com> 2 3 REGRESSION(r257759, r258623): Web Inspector: Settings icon sometimes placed below the tab bar 4 https://bugs.webkit.org/show_bug.cgi?id=208603 5 <rdar://problem/60108967> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/TabBar.js: 10 (WI.TabBar.prototype.layout): 11 If the total width of all `WI.GeneralTabBarItem` is not an integer, it needs to be rounded 12 when compared to the width of the container `WI.TabBar`. This is be necessary because CSS 13 often rounds to the nearest pixel, meaning that `99.5px` would actually render as `100px`, 14 whereas `99.4px` would render as `99px`. 15 16 * UserInterface/Views/TabBar.css: 17 (body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)): Added. 18 (.tab-bar > .tabs.calculate-width > .item:not(.pinned)): Added. 19 (body:not(.docked) .tab-bar > .tabs > .item:not(.pinned)): Deleted. 20 (.tab-bar > .tabs.calculate-width > .item): Deleted. 21 When undocked, force all `WI.GeneralTabBarItem` to take up as little width as possible when 22 resizing so that if there isn't enough room for all of them, any that `flex-wrap` won't be 23 incorrectly perceived as needing a much larger width. 24 25 * UserInterface/Debug/Bootstrap.css: 26 (.tab-bar > .navigation-bar .inspect-inspector): 27 Ensure that the "inspect inspector" navigation item has an integer pixel width. 28 1 29 2020-03-23 Devin Rousso <drousso@apple.com> 2 30 -
trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css
r257401 r258898 28 28 outline-offset: -1px !important; 29 29 } 30 31 .tab-bar > .navigation-bar .inspect-inspector { 32 width: 1em !important; 33 } -
trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.css
r258809 r258898 160 160 } 161 161 162 body:not(.docked) .tab-bar > .tabs > .item:not(.pinned) {162 body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned) { 163 163 flex-grow: 1; 164 164 } … … 171 171 } 172 172 173 .tab-bar > .tabs.calculate-width > .item {173 .tab-bar > .tabs.calculate-width > .item:not(.pinned) { 174 174 flex: initial; 175 175 } -
trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js
r258778 r258898 450 450 } 451 451 452 // Add one to allow for possible sub-px widths. 453 let availableSpace = this._tabContainer.realOffsetWidth - tabBarHorizontalPadding + 1; 452 let availableSpace = this._tabContainer.realOffsetWidth - tabBarHorizontalPadding; 454 453 455 454 this._tabContainer.classList.add("calculate-width"); … … 481 480 // Wait to measure widths until all `WI.TabBarItem` are un-hidden for the reason above. 482 481 let normalTabBarItemsWidth = normalTabBarItems.reduce((accumulator, tabBarItem) => accumulator + measureWidth(tabBarItem), 0); 483 if ( normalTabBarItemsWidth > availableSpace) {482 if (Math.round(normalTabBarItemsWidth) >= Math.floor(availableSpace)) { 484 483 this._tabPickerTabBarItem.hidden = false; 485 484 availableSpace -= measureWidth(this._tabPickerTabBarItem); … … 495 494 tabBarItem.hidden = true; 496 495 this._hiddenTabBarItems.push(tabBarItem); 497 } while (normalTabBarItemsWidth > availableSpace && --index >= 0); 498 } 496 } while (normalTabBarItemsWidth >= availableSpace && --index >= 0); 497 } 498 499 // Tabs are marked as hidden from right to left, meaning that the right-most item will be 500 // first in the list. Reverse the list so that the right-most item is last. 501 this._hiddenTabBarItems.reverse(); 499 502 500 503 this._tabContainer.classList.remove("calculate-width");
Note: See TracChangeset
for help on using the changeset viewer.