backListCount()/forwardListCount() don't match the sizes of the backList() and forwardList() arrays#65158
Conversation
|
EWS run on previous version of this PR (hash 6945581) Details |
macOS Safer C++ Build #108210 (6945581)❌ Found 1 failing file with 2 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
iOS Safer C++ Build #26801 (6945581)❌ Found 1 failing file with 2 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
6945581 to
3a46c44
Compare
|
EWS run on previous version of this PR (hash 3a46c44) Details |
macOS Safer C++ Build #108484 (3a46c44)❌ Found 1 failing file with 2 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
iOS Safer C++ Build #27082 (3a46c44)❌ Found 1 failing file with 2 issues. Please address these issues before landing. See WebKit Guidelines for Safer C++ Programming. |
3a46c44 to
b2b4ea9
Compare
|
EWS run on previous version of this PR (hash b2b4ea9) Details |
b2b4ea9 to
8e63770
Compare
|
EWS run on current version of this PR (hash 8e63770) Details
|
…ist() and forwardList() arrays rdar://176640408 https://bugs.webkit.org/show_bug.cgi?id=315072 Reviewed by Chris Dumez. This broke with the "Skip back/forward items at the API level" changes in 311688@main and 311799@main After those changes, the backList()/forwardList() would return arrays with skipped items, but the old "get me the back/forward list count" APIs didn't do the skipping. Some clients were mixing and matching those, and they were having a bad time. This PR does some renaming for clarity, and makes the "count" methods just return the size of the calculated array, ensuring the same calculations are used across the board. Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKBackForwardListTests.mm * Source/WebKit/UIProcess/API/C/WKBackForwardListRef.cpp: (WKBackForwardListGetBackListCount): (WKBackForwardListGetForwardListCount): * Source/WebKit/UIProcess/API/glib/WebKitBackForwardList.cpp: (webkit_back_forward_list_get_length): (webkit_back_forward_list_get_back_list): (webkit_back_forward_list_get_forward_list): * Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp: (WebKit::WebAutomationSession::traverseHistoryInBrowsingContext): * Source/WebKit/UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::rawBackListEntryCount const): (WebKit::WebBackForwardList::rawForwardListEntryCount const): (WebKit::WebBackForwardList::backListCountForAPI const): (WebKit::WebBackForwardList::forwardListCountForAPI const): (WebKit::WebBackForwardList::counts const): (WebKit::WebBackForwardList::backList const): (WebKit::WebBackForwardList::forwardList const): (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit const): (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit const): (WebKit::WebBackForwardListWrapper::backListCountForAPI const): (WebKit::WebBackForwardListWrapper::forwardListCountForAPI const): (WebKit::WebBackForwardListWrapper::backList const): (WebKit::WebBackForwardListWrapper::forwardList const): (WebKit::WebBackForwardList::backListCount const): Deleted. (WebKit::WebBackForwardList::forwardListCount const): Deleted. (WebKit::WebBackForwardListWrapper::backListCount const): Deleted. (WebKit::WebBackForwardListWrapper::forwardListCount const): Deleted. * Source/WebKit/UIProcess/WebBackForwardList.h: * Source/WebKit/UIProcess/WebBackForwardList.swift: (Direction.rawBackListEntryCount): (Direction.rawForwardListEntryCount): (Direction.backListCountForAPI): (Direction.forwardListCountForAPI): (Direction.counts): (Direction.backListAsAPIArrayWithLimit(_:)): (Direction.forwardListAsAPIArrayWithLimit(_:)): (Direction.backListCount): Deleted. (Direction.forwardListCount): Deleted. * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKBackForwardListTests.mm: (verifyBackForwardListCountsMatchArraySizes): (setupBackForwardListWithItemsWithoutUserGesture): (runBackForwardNavigationSkipsItemsWithoutUserGestureCheck): (runJSHistoryBackDoesNotSkipItemsWithoutUserGestureCheck): Canonical link: https://commits.webkit.org/313516@main
8e63770 to
b8c7728
Compare
|
Committed 313516@main (b8c7728): https://commits.webkit.org/313516@main Reviewed commits have been landed. Closing PR #65158 and removing active labels. |
b8c7728
8e63770
🧪 win-tests🧪 ios-wk2-wpt🧪 api-mac-debug🧪 api-ios🧪 mac-AS-debug-wk2