Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: afe7a8d8ea3366ef7a6870e27b5329645cfb956a
https://github.com/WebKit/WebKit/commit/afe7a8d8ea3366ef7a6870e27b5329645cfb956a
Author: Qianlang Chen <[email protected]>
Date: 2025-04-29 (Tue, 29 Apr 2025)
Changed paths:
M Source/WebInspectorUI/UserInterface/Base/Main.js
M Source/WebInspectorUI/UserInterface/Main.html
M Source/WebInspectorUI/UserInterface/Views/Main.css
M Source/WebInspectorUI/UserInterface/Views/Popover.js
M Source/WebInspectorUI/UserInterface/Views/TabBar.css
M Source/WebInspectorUI/UserInterface/Views/Variables.css
M Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.h
M Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm
M Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm
Log Message:
-----------
Web Inspector: Remove undocked-title-area element since inspector already
adjusts based on safeAreaInsets
rdar://149898806
https://bugs.webkit.org/show_bug.cgi?id=292205
Reviewed by Devin Rousso and BJ Burg.
The patch https://github.com/WebKit/WebKit/pull/43779 made Web Inspector
automatically adjust its visible area based on the WKInspectorWKWebView's
safeAreaInsets, which natively computes the margins on all four edges
that are blocked by other view elements. That patch introduced a
regression that the undocked Web Inspector started to have an extra
white space on the top under the title bar, which we then fixed in
https://github.com/WebKit/WebKit/pull/44438.
However, it turns out safeAreaInsets already includes the title bar's
height, so there is actually no need for the undocked-title-area element
anymore as the auto-adjustment already does the job well.
Note that dragging the title bar to move the window is an effect handled
by the window natively. By removing the undocked-title-area and thus a
call to WI.moveUndockedWindowMouseDown, we're letting the window itself
handle the drag to move instead. This preserves the normal dragging
behavior, and I tested that manually.
* Source/WebInspectorUI/UserInterface/Base/Main.js:
* Source/WebInspectorUI/UserInterface/Main.html:
* Source/WebInspectorUI/UserInterface/Views/Main.css:
(#main):
(#undocked-title-area): Deleted.
(body.mac-platform #undocked-title-area): Deleted.
(body:not(.mac-platform) #undocked-title-area): Deleted.
(body.docked #undocked-title-area): Deleted.
(body.window-inactive #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) #undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body.mac-platform #undocked-title-area):
Deleted.
(@media (prefers-color-scheme: dark) body:not(.mac-platform)
#undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body.mac-platform.window-inactive
#undocked-title-area): Deleted.
(@media (prefers-color-scheme: dark) body:not(.mac-platform).window-inactive
#undocked-title-area): Deleted.
* Source/WebInspectorUI/UserInterface/Views/Popover.js:
* Source/WebInspectorUI/UserInterface/Views/TabBar.css:
(.tab-bar):
* Source/WebInspectorUI/UserInterface/Views/Variables.css:
(:root):
(&.mac-platform:not(.docked)): Deleted.
- Deprecate and remove the undocked-title-area element.
* Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.h:
* Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm:
(-[WKInspectorViewController webView]):
(-[WKInspectorViewController observeValueForKeyPath:ofObject:change:context:]):
(-[WKInspectorViewController webViewWebContentProcessDidTerminate:]):
(-[WKInspectorViewController setIsAttached:]): Deleted.
* Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm:
(WebKit::WebInspectorUIProxy::platformAttach):
(WebKit::WebInspectorUIProxy::platformDetach):
- Restore the auto-adjusting behavior to also still take effect while
inspector is undocked, to let that handle the padding required for
the title bar's height.
Canonical link: https://commits.webkit.org/294303@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes