-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow tabs.update to be called without a tabID #24964
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
b-weinstein:eng/Allow-tabs-update-to-be-called-without-a-tabID
Feb 22, 2024
Merged
Allow tabs.update to be called without a tabID #24964
webkit-commit-queue
merged 1 commit into
WebKit:main
from
b-weinstein:eng/Allow-tabs-update-to-be-called-without-a-tabID
Feb 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
EWS run on previous version of this PR (hash 6206c06) |
xeenon
approved these changes
Feb 22, 2024
xeenon
reviewed
Feb 22, 2024
Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm
Outdated
Show resolved
Hide resolved
6206c06
to
181cd64
Compare
EWS run on previous version of this PR (hash 181cd64) |
xeenon
approved these changes
Feb 22, 2024
181cd64
to
665c4c3
Compare
EWS run on current version of this PR (hash 665c4c3) |
https://bugs.webkit.org/show_bug.cgi?id=269934 rdar://123407828 Reviewed by Timothy Hatcher. The tabID is an optional argument to tabs.update. We were always attempting to get the value of the optional. If it isn't passed, then it is meant to fall back to the active tab of the current context, which means: - If this was called from a popup, then the active tab of the popup's window - If this was called from the background page, then the active tab of the active window This required some refactoring to WebExtensionContext::getTab and WebExtensionContext::getCurrentTab to support this, and some tests were added calling this method without a tab ID from both contexts. * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPITabsCocoa.mm: (WebKit::WebExtensionContext::tabsUpdate): (WebKit::WebExtensionContext::tabsReload): (WebKit::WebExtensionContext::tabsGoBack): (WebKit::WebExtensionContext::tabsGoForward): (WebKit::WebExtensionContext::tabsDetectLanguage): (WebKit::WebExtensionContext::tabsToggleReaderMode): (WebKit::WebExtensionContext::tabsGetZoom): (WebKit::WebExtensionContext::tabsSetZoom): (WebKit::WebExtensionContext::tabsExecuteScript): (WebKit::WebExtensionContext::tabsInsertCSS): (WebKit::WebExtensionContext::tabsRemoveCSS): * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::getWindow const): (WebKit::WebExtensionContext::getTab const): (WebKit::WebExtensionContext::getCurrentTab const): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: * Source/WebKit/UIProcess/Extensions/WebExtensionContext.messages.in: * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPITabsCocoa.mm: (WebKit::WebExtensionAPITabs::update): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIAction.mm: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPITabs.mm: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/275204@main
665c4c3
to
5e245ad
Compare
Committed 275204@main (5e245ad): https://commits.webkit.org/275204@main Reviewed commits have been landed. Closing PR #24964 and removing active labels. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
5e245ad
665c4c3
π wincairoπ§ͺ wpe-wk2π§ͺ webkitperlπ§ͺ ios-wk2π§ͺ api-macπ§ͺ api-wpeπ§ͺ ios-wk2-wptπ§ͺ mac-wk1π§ͺ api-iosπ§ͺ mac-wk2π§ͺ gtk-wk2π tvπ§ͺ mac-AS-debug-wk2π§ͺ api-gtkπ tv-simπ π§ͺ mergeπ watchπ watch-sim