Bug 209346 - Web Inspector: REGRESSION(r257835): close and undock buttons are shown in remote inspector
Summary: Web Inspector: REGRESSION(r257835): close and undock buttons are shown in rem...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on: 208555
Blocks:
  Show dependency treegraph
 
Reported: 2020-03-20 10:19 PDT by Devin Rousso
Modified: 2020-03-20 12:27 PDT (History)
5 users (show)

See Also:


Attachments
Patch (12.72 KB, patch)
2020-03-20 10:20 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>