[webkit-changes] [WebKit/WebKit] 10d192: Add support for loading the background content for...
Timothy Hatcher
noreply at github.com
Thu Apr 25 13:53:57 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 10d19200a9d72b72e9d2a0a149dc35da825df3aa
https://github.com/WebKit/WebKit/commit/10d19200a9d72b72e9d2a0a149dc35da825df3aa
Author: Timothy Hatcher <timothy at apple.com>
Date: 2024-04-25 (Thu, 25 Apr 2024)
Changed paths:
M Source/WebCore/en.lproj/Localizable.strings
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.h
M Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm
M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm
M Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm
M Source/WebKit/UIProcess/Extensions/WebExtension.h
M Source/WebKit/UIProcess/Extensions/WebExtensionContext.h
Log Message:
-----------
Add support for loading the background content for a _WKWebExtensionContext.
https://webkit.org/b/273269
rdar://126994428
Reviewed by Brian Weinstein.
Added a loadBackgroundContentWithCompletionHandler: method, and changed how the background
load errors are created. This is a step in the direction of having WebExtensionContext
track runtime errors separate from WebExtension (see bug 270580).
* Source/WebCore/en.lproj/Localizable.strings: Updated with update-webkit-localizable-strings.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtension.h:
(NS_ERROR_ENUM): Removed _WKWebExtensionErrorBackgroundContentFailedToLoad.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.h:
(NS_ERROR_ENUM): Added _WKWebExtensionContextErrorNoBackgroundContent and
_WKWebExtensionContextErrorBackgroundContentFailedToLoad.
* Source/WebKit/UIProcess/API/Cocoa/_WKWebExtensionContext.mm:
(-[_WKWebExtensionContext loadBackgroundContentWithCompletionHandler:]): Added.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionCocoa.mm:
(WebKit::toAPI): Removed BackgroundContentFailedToLoad.
(WebKit::WebExtension::createError): Ditto.
* Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm:
(WebKit::toAPI): Added new error codes.
(WebKit::WebExtensionContext::createError): Ditto.
(WebKit::WebExtensionContext::loadBackgroundContent): Added.
(WebKit::WebExtensionContext::loadBackgroundWebView): Set m_backgroundContentLoadError
instead of recording it on the WebExtension.
(WebKit::WebExtensionContext::didFailNavigation): Ditto.
* Source/WebKit/UIProcess/Extensions/WebExtension.h:
* Source/WebKit/UIProcess/Extensions/WebExtensionContext.h:
(WebKit::WebExtensionContext::backgroundContentLoadError const): Added.
Canonical link: https://commits.webkit.org/277998@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list