Back button not enabled on sciencedirect.com to support Safari's "Close and return to ..." feature for new windows#65548
Conversation
|
EWS run on previous version of this PR (hash edd5ebb) Details |
|
|
||
| @end | ||
|
|
||
| TEST(WKBackForwardList, ItemAddedDelegateObservesUserGestureFlagAtCallbackTime) |
There was a problem hiding this comment.
optional: consider writing this or future tests using Swift Testing, it's much more ergonomic and nicer to use!
edd5ebb to
6b7554a
Compare
|
EWS run on current version of this PR (hash 6b7554a) Details |
|
The last EWS run had an apparently-new API test failure on iOS: The odds that this patch caused that test to fail seem extremely low to me. And also to Claude. |
Actually, I probably won't even wait... That test does a single synchronous HTML load then never navigates again or introspects the back/forward list. It doesn't plug into the delegate on bflist changes, or do anything else relevant. |
…se and return to ..." feature for new windows rdar://177792841 https://bugs.webkit.org/show_bug.cgi?id=315440 Reviewed by Richard Robinson. Before this change, we add new history items to the back/forward list in one step, then flag them as "created by JS without user interaction" in a separate step. The first step performs a delegate callback to notify the app that the bf-list changed. The app then runs some code based on the bf-list change. Then the second step updates the items flag, which can change the presentation of the bf-list, notably by making it shorter by hiding some items. But the app saw the "incorrect" list already, and already ran code, which might've been destructive. This patch sets the flag upon initial creation of the history item which removes this interstitial gap. This allows the app to make its decisions based on an always accurate presentation of the bf-list. Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKBackForwardListTests.mm * Source/WebCore/loader/FrameLoader.cpp: (WebCore::FrameLoader::loadInSameDocument): * Source/WebCore/loader/HistoryController.cpp: (WebCore::HistoryController::updateBackForwardListForFragmentScroll): (WebCore::HistoryController::updateForStandardLoad): (WebCore::HistoryController::updateBackForwardListClippedAtTarget): (WebCore::HistoryController::updateBackForwardListForReplaceState): * Source/WebCore/loader/HistoryController.h: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKBackForwardListTests.mm: (-[ItemAddedRecordingDelegate webView:didFinishNavigation:]): (-[ItemAddedRecordingDelegate _webView:navigation:didSameDocumentNavigation:]): (-[ItemAddedRecordingDelegate _webView:backForwardListItemAdded:removed:]): (TEST(WKBackForwardList, ItemAddedDelegateObservesUserGestureFlagAtCallbackTime)): Canonical link: https://commits.webkit.org/313814@main
6b7554a to
523b810
Compare
|
Committed 313814@main (523b810): https://commits.webkit.org/313814@main Reviewed commits have been landed. Closing PR #65548 and removing active labels. |
|
Fixing the build in #65591. |
🛠 gtk3-libwebrtc
🧪 mac-AS-debug-wk2
523b810
6b7554a
🧪 wpe-wk2🧪 api-mac-debug