Bug 209346

Summary: Web Inspector: REGRESSION(r257835): close and undock buttons are shown in remote inspector
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, hi, inspector-bugzilla-changes, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
Bug Depends on: 208555    
Bug Blocks:    
Attachments:
Description Flags
Patch none

Description Devin Rousso 2020-03-20 10:19:58 PDT
# STEPS TO REPRODUCE:
1. connect an external device or open an iOS simulator
2. inspect anything
Comment 1 Devin Rousso 2020-03-20 10:20:32 PDT
Created attachment 394097 [details]
Patch
Comment 2 BJ Burg 2020-03-20 12:03:50 PDT
Comment on attachment 394097 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394097&action=review

r=me

> Source/WebInspectorUI/UserInterface/Base/Main.js:900
> +    WI.tabBar.resetCachedWidths();

How does the tabBar invalidate cached widths when the inspector window / view is resized? Surprised this is only called in one place.

> Source/WebInspectorUI/UserInterface/Base/Main.js:2359
> +    let closeHidden = WI._closeTabBarButton?.hidden;

o_O I guess it's OK!
Comment 3 EWS 2020-03-20 12:22:09 PDT
Committed r258778: <https://trac.webkit.org/changeset/258778>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 394097 [details].
Comment 4 Radar WebKit Bug Importer 2020-03-20 12:23:10 PDT
<rdar://problem/60698896>
Comment 5 Devin Rousso 2020-03-20 12:27:30 PDT
Comment on attachment 394097 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394097&action=review

>> Source/WebInspectorUI/UserInterface/Base/Main.js:900
>> +    WI.tabBar.resetCachedWidths();
> 
> How does the tabBar invalidate cached widths when the inspector window / view is resized? Surprised this is only called in one place.

When we're docked, the size of each `WI.TabBarItem` should never change, as we don't expand to fill available space.  When undocked, however, `WI.TabBarItem` do expand to fill as much available space as possible.  Along these lines, we have logic inside `WI.TabBar.prototype.layout` that handles this exact scenario :) <https://trac.webkit.org/browser/webkit/trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.js?rev=258623#L469>