Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2924745ed44fec69be0d1c58ee77e72817e5111f
https://github.com/WebKit/WebKit/commit/2924745ed44fec69be0d1c58ee77e72817e5111f
Author: Brady Eidson <[email protected]>
Date: 2025-11-21 (Fri, 21 Nov 2025)
Changed paths:
M Source/WebKit/Shared/WebBackForwardListFrameItem.cpp
M Source/WebKit/Shared/WebBackForwardListFrameItem.h
M Source/WebKit/Shared/WebBackForwardListItem.cpp
M Source/WebKit/Shared/WebBackForwardListItem.h
M Source/WebKit/UIProcess/API/Cocoa/WKBackForwardList.mm
M Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListPrivate.h
M Source/WebKit/UIProcess/WebBackForwardList.cpp
M Source/WebKit/UIProcess/WebBackForwardList.h
M Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
M Tools/MiniBrowser/mac/BrowserWindow.xib
A Tools/MiniBrowser/mac/HistoryButton.h
A Tools/MiniBrowser/mac/HistoryButton.m
M Tools/MiniBrowser/mac/WK2BrowserWindowController.h
M Tools/MiniBrowser/mac/WK2BrowserWindowController.m
Log Message:
-----------
MiniBrowser: Add back/forward menus to the back/forward buttons
rdar://165217446
https://bugs.webkit.org/show_bug.cgi?id=302957
Reviewed by Alex Christensen.
Browsers usually let you long press the back/forward buttons to see a
back/forward list,
and allow you to choose an item that is farther away than 1 in either direction.
So let's add "long press for back/forward list" to MiniBrowser.
I do this by adding an NSButton subclass that tracks `mouseDown:`, `mouseUp:`,
and detects
long-press with a timer.
As an added development feature if you hold `option` while clicking to bring up
the full
back/forward list, the list's logging string will dump to the system console,
with frame tree.
This is particularly useful while working on site isolation.
This is enabled by always compiling in the `loggingString` functionality for
back/forward
list objects and exposing that string as a test-only SPI on `WKBackForwardList`
* Source/WebKit/Shared/WebBackForwardListFrameItem.cpp:
(WebKit::WebBackForwardListFrameItem::loggingStringAtIndent):
* Source/WebKit/Shared/WebBackForwardListFrameItem.h:
* Source/WebKit/Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::loggingString):
* Source/WebKit/Shared/WebBackForwardListItem.h:
* Source/WebKit/UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList _loggingStringForTesting]):
* Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
* Source/WebKit/UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::loggingString):
* Source/WebKit/UIProcess/WebBackForwardList.h:
* Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
* Tools/MiniBrowser/mac/BrowserWindow.xib:
* Tools/MiniBrowser/mac/HistoryButton.h: Copied from
Source/WebKit/UIProcess/API/Cocoa/WKBackForwardListPrivate.h.
* Tools/MiniBrowser/mac/HistoryButton.m: Added.
(-[HistoryButton mouseDown:]):
(-[HistoryButton mouseUp:]):
(-[HistoryButton _cleanup]):
(-[HistoryButton _itemSelected:]):
(-[HistoryButton _showMenuTimerFired]):
* Tools/MiniBrowser/mac/WK2BrowserWindowController.h:
* Tools/MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController
webView:decidePolicyForNavigationAction:preferences:decisionHandler:]):
(-[WK2BrowserWindowController
webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[WK2BrowserWindowController webView:didStartProvisionalNavigation:]):
Canonical link: https://commits.webkit.org/303433@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications