Title: [258898] trunk/Source/WebInspectorUI
- Revision
- 258898
- Author
- [email protected]
- Date
- 2020-03-23 19:22:49 -0700 (Mon, 23 Mar 2020)
Log Message
REGRESSION(r257759, r258623): Web Inspector: Settings icon sometimes placed below the tab bar
https://bugs.webkit.org/show_bug.cgi?id=208603
<rdar://problem/60108967>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TabBar.js:
(WI.TabBar.prototype.layout):
If the total width of all `WI.GeneralTabBarItem` is not an integer, it needs to be rounded
when compared to the width of the container `WI.TabBar`. This is be necessary because CSS
often rounds to the nearest pixel, meaning that `99.5px` would actually render as `100px`,
whereas `99.4px` would render as `99px`.
* UserInterface/Views/TabBar.css:
(body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)): Added.
(.tab-bar > .tabs.calculate-width > .item:not(.pinned)): Added.
(body:not(.docked) .tab-bar > .tabs > .item:not(.pinned)): Deleted.
(.tab-bar > .tabs.calculate-width > .item): Deleted.
When undocked, force all `WI.GeneralTabBarItem` to take up as little width as possible when
resizing so that if there isn't enough room for all of them, any that `flex-wrap` won't be
incorrectly perceived as needing a much larger width.
* UserInterface/Debug/Bootstrap.css:
(.tab-bar > .navigation-bar .inspect-inspector):
Ensure that the "inspect inspector" navigation item has an integer pixel width.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (258897 => 258898)
--- trunk/Source/WebInspectorUI/ChangeLog 2020-03-24 02:05:00 UTC (rev 258897)
+++ trunk/Source/WebInspectorUI/ChangeLog 2020-03-24 02:22:49 UTC (rev 258898)
@@ -1,5 +1,33 @@
2020-03-23 Devin Rousso <[email protected]>
+ REGRESSION(r257759, r258623): Web Inspector: Settings icon sometimes placed below the tab bar
+ https://bugs.webkit.org/show_bug.cgi?id=208603
+ <rdar://problem/60108967>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/TabBar.js:
+ (WI.TabBar.prototype.layout):
+ If the total width of all `WI.GeneralTabBarItem` is not an integer, it needs to be rounded
+ when compared to the width of the container `WI.TabBar`. This is be necessary because CSS
+ often rounds to the nearest pixel, meaning that `99.5px` would actually render as `100px`,
+ whereas `99.4px` would render as `99px`.
+
+ * UserInterface/Views/TabBar.css:
+ (body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)): Added.
+ (.tab-bar > .tabs.calculate-width > .item:not(.pinned)): Added.
+ (body:not(.docked) .tab-bar > .tabs > .item:not(.pinned)): Deleted.
+ (.tab-bar > .tabs.calculate-width > .item): Deleted.
+ When undocked, force all `WI.GeneralTabBarItem` to take up as little width as possible when
+ resizing so that if there isn't enough room for all of them, any that `flex-wrap` won't be
+ incorrectly perceived as needing a much larger width.
+
+ * UserInterface/Debug/Bootstrap.css:
+ (.tab-bar > .navigation-bar .inspect-inspector):
+ Ensure that the "inspect inspector" navigation item has an integer pixel width.
+
+2020-03-23 Devin Rousso <[email protected]>
+
Web Inspector: Uncaught Exception: TypeError: this._springEditor.removeListeners is not a function. (In 'this._springEditor.removeListeners()', 'this._springEditor.removeListeners' is undefined)
https://bugs.webkit.org/show_bug.cgi?id=209325
Modified: trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css (258897 => 258898)
--- trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css 2020-03-24 02:05:00 UTC (rev 258897)
+++ trunk/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css 2020-03-24 02:22:49 UTC (rev 258898)
@@ -27,3 +27,7 @@
outline: 2px solid fuchsia !important;
outline-offset: -1px !important;
}
+
+.tab-bar > .navigation-bar .inspect-inspector {
+ width: 1em !important;
+}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.css (258897 => 258898)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.css 2020-03-24 02:05:00 UTC (rev 258897)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.css 2020-03-24 02:22:49 UTC (rev 258898)
@@ -159,7 +159,7 @@
background-size: 100% 200%;
}
-body:not(.docked) .tab-bar > .tabs > .item:not(.pinned) {
+body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned) {
flex-grow: 1;
}
@@ -170,7 +170,7 @@
--tab-bar-item-vertical-margin: 4px;
}
-.tab-bar > .tabs.calculate-width > .item {
+.tab-bar > .tabs.calculate-width > .item:not(.pinned) {
flex: initial;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js (258897 => 258898)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js 2020-03-24 02:05:00 UTC (rev 258897)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js 2020-03-24 02:22:49 UTC (rev 258898)
@@ -449,8 +449,7 @@
return tabBarItem[WI.TabBar.CachedWidthSymbol];
}
- // Add one to allow for possible sub-px widths.
- let availableSpace = this._tabContainer.realOffsetWidth - tabBarHorizontalPadding + 1;
+ let availableSpace = this._tabContainer.realOffsetWidth - tabBarHorizontalPadding;
this._tabContainer.classList.add("calculate-width");
@@ -480,7 +479,7 @@
// Wait to measure widths until all `WI.TabBarItem` are un-hidden for the reason above.
let normalTabBarItemsWidth = normalTabBarItems.reduce((accumulator, tabBarItem) => accumulator + measureWidth(tabBarItem), 0);
- if (normalTabBarItemsWidth > availableSpace) {
+ if (Math.round(normalTabBarItemsWidth) >= Math.floor(availableSpace)) {
this._tabPickerTabBarItem.hidden = false;
availableSpace -= measureWidth(this._tabPickerTabBarItem);
@@ -494,9 +493,13 @@
tabBarItem.hidden = true;
this._hiddenTabBarItems.push(tabBarItem);
- } while (normalTabBarItemsWidth > availableSpace && --index >= 0);
+ } while (normalTabBarItemsWidth >= availableSpace && --index >= 0);
}
+ // Tabs are marked as hidden from right to left, meaning that the right-most item will be
+ // first in the list. Reverse the list so that the right-most item is last.
+ this._hiddenTabBarItems.reverse();
+
this._tabContainer.classList.remove("calculate-width");
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes