Skip to content
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

Expose _backgroundWebView, _backgroundContentURL and _backgroundContentIsServiceWorker as _WKWebExtension SPI. #8313

Merged
merged 1 commit into from
Jan 6, 2023

Conversation

xeenon
Copy link
Contributor

@xeenon xeenon commented Jan 6, 2023

0a3c1ae

Expose _backgroundWebView, _backgroundContentURL and _backgroundContentIsServiceWorker as _WKWebExtension SPI.
https://bugs.webkit.org/show_bug.cgi?id=250221

Reviewed by Brian Weinstein.

* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.mm:
(-[_WKWebExtension _backgroundContentIsServiceWorker]): Added.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm:
(-[_WKWebExtensionContext _backgroundWebView]): Added.
(-[_WKWebExtensionContext _backgroundContentURL]): Added.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContextPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionPrivate.h:
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::load): Added call to writeStateToStorage() to save the last base URL.
(WebKit::WebExtensionContext::backgroundContentURL): Return a null URL instead of asserting.
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
(WebKit::WebExtensionContext::backgroundWebView const): Added.

Canonical link: https://commits.webkit.org/258554@main

63dc388

Misc iOS, tvOS & watchOS macOS Linux Windows
  πŸ§ͺ style   πŸ›  ios   πŸ›  mac   πŸ›  wpe
  πŸ›  ios-sim   πŸ›  mac-AS-debug   πŸ›  gtk   πŸ›  wincairo
  πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2   πŸ§ͺ api-mac   πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios   πŸ§ͺ mac-wk1   πŸ§ͺ api-gtk
  πŸ›  tv   πŸ§ͺ mac-wk2
  πŸ›  tv-sim   πŸ§ͺ mac-AS-debug-wk2
  πŸ›  watch   πŸ§ͺ mac-wk2-stress
  πŸ›  watch-sim
βœ… πŸ›  πŸ§ͺ unsafe-merge

@xeenon xeenon self-assigned this Jan 6, 2023
@xeenon xeenon added the WebKit Extensions Bugs related to extension support. label Jan 6, 2023
@@ -35,6 +35,12 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (nonatomic, getter=_inTestingMode, setter=_setTestingMode:) BOOL _testingMode;

/*! @abstract The extension background view used for the extension, or `nil` if the extension does not have background content or it is currently unloaded. */
Copy link
Contributor

@kiaraarose kiaraarose Jan 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there certain files where we should use "`nil`" vs "\c nil"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backticks work in this, just not @param.

@xeenon xeenon added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 6, 2023
…ntIsServiceWorker as _WKWebExtension SPI.

https://bugs.webkit.org/show_bug.cgi?id=250221

Reviewed by Brian Weinstein.

* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.mm:
(-[_WKWebExtension _backgroundContentIsServiceWorker]): Added.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm:
(-[_WKWebExtensionContext _backgroundWebView]): Added.
(-[_WKWebExtensionContext _backgroundContentURL]): Added.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContextPrivate.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionPrivate.h:
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::WebExtensionContext::load): Added call to writeStateToStorage() to save the last base URL.
(WebKit::WebExtensionContext::backgroundContentURL): Return a null URL instead of asserting.
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
(WebKit::WebExtensionContext::backgroundWebView const): Added.

Canonical link: https://commits.webkit.org/258554@main
@webkit-commit-queue
Copy link
Collaborator

Committed 258554@main (0a3c1ae): https://commits.webkit.org/258554@main

Reviewed commits have been landed. Closing PR #8313 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit 0a3c1ae into WebKit:main Jan 6, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 6, 2023
@xeenon xeenon deleted the bug/250221 branch January 6, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKit Extensions Bugs related to extension support.
Projects
None yet
5 participants