WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-208603-20200320153202.patch (text/plain), 5.14 KB, created by
Devin Rousso
on 2020-03-20 14:32:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2020-03-20 14:32:03 PDT
Size:
5.14 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 43a2be70fc0c037e325165ac09d1be982efb8f45..869ce1058455079f5ef26e677deb45019f5710c8 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,33 @@ >+2020-03-20 Devin Rousso <drousso@apple.com> >+ >+ 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 NOBODY (OOPS!). >+ >+ Speculative fix, as I haven't been able to reproduce this myself. My guess as to what's >+ happening is that the sum width of all `WI.GeneralTabBarItem` is a non-integer value, which >+ needs to be properly rounded when compared to the width of the container `WI.TabBar`. This >+ may 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.js: >+ (WI.TabBar.prototype.layout): >+ >+ * 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-20 Devin Rousso <drousso@apple.com> > > Web Inspector: REGRESSION(r257835): close and undock buttons are shown in remote inspector >diff --git a/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css b/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css >index d906142c040c402dc781945558e00989f04ffec5..e80e59a49ada5af737608f0b05e85a5a49f09e83 100644 >--- a/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css >+++ b/Source/WebInspectorUI/UserInterface/Debug/Bootstrap.css >@@ -27,3 +27,7 @@ body.focus-debug *:focus { > outline: 2px solid fuchsia !important; > outline-offset: -1px !important; > } >+ >+.tab-bar > .navigation-bar .inspect-inspector { >+ width: 1em !important; >+} >diff --git a/Source/WebInspectorUI/UserInterface/Views/TabBar.css b/Source/WebInspectorUI/UserInterface/Views/TabBar.css >index 5b0f82b1b3e876905f4a46cb60cabd9dc1644383..c538326446e11d232c3bf8d434748107a248c51d 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TabBar.css >+++ b/Source/WebInspectorUI/UserInterface/Views/TabBar.css >@@ -159,7 +159,7 @@ body:not(.docked) .tab-bar > .tabs > .item { > 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 @@ body.docked .tab-bar > .tabs > .item { > --tab-bar-item-vertical-margin: 4px; > } > >-.tab-bar > .tabs.calculate-width > .item { >+.tab-bar > .tabs.calculate-width > .item:not(.pinned) { > flex: initial; > } > >diff --git a/Source/WebInspectorUI/UserInterface/Views/TabBar.js b/Source/WebInspectorUI/UserInterface/Views/TabBar.js >index 2e518dfc5d230a95fcb83bd0a60b1cfdbe2249c6..e91df5afd4a7890fa9ad46bb43a99a825c3f265a 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TabBar.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TabBar.js >@@ -449,8 +449,7 @@ WI.TabBar = class TabBar extends WI.View > 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 @@ WI.TabBar = class TabBar extends WI.View > > // 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.round(availableSpace)) { > this._tabPickerTabBarItem.hidden = false; > availableSpace -= measureWidth(this._tabPickerTabBarItem); > >@@ -497,6 +496,10 @@ WI.TabBar = class TabBar extends WI.View > } 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"); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 208603
:
392481
|
393199
|
393731
|
394015
|
394117
|
394119
|
394121
|
394129
|
394130
|
394135