[webkit-changes] [WebKit/WebKit] 0676a9: Cherry-pick 261118 at main (878af52cf358). https://bu...
Carlos Garcia Campos
noreply at github.com
Tue Mar 7 23:02:08 PST 2023
Branch: refs/heads/webkitglib/2.40
Home: https://github.com/WebKit/WebKit
Commit: 0676a9f0b098a6ea80bfecfaa21c874a6947a0b2
https://github.com/WebKit/WebKit/commit/0676a9f0b098a6ea80bfecfaa21c874a6947a0b2
Author: Michael Catanzaro <mcatanzaro at redhat.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp
M Source/WebKit/UIProcess/API/glib/WebKitDownloadClient.cpp
M Source/WebKit/UIProcess/API/glib/WebKitDownloadPrivate.h
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp
Log Message:
-----------
Cherry-pick 261118 at main (878af52cf358). https://bugs.webkit.org/show_bug.cgi?id=238748
[GLib] Need API for asynchronously handling WebKitDownload::decide-destination
https://bugs.webkit.org/show_bug.cgi?id=238748
Reviewed by Carlos Garcia Campos.
Currently WebKitDownload::decide-destination is emitted when WebKit
wants to know the filesystem location to download the file to. The
application is expected to display a file chooser using
gtk_dialog_run(), then return the result to WebKit using
webkit_download_set_destination(). In GTK 4, gtk_dialog_run() no longer
exists. The only way to accomplish this is to hande it manually,
iterating the default GMainContext inside the signal handler callback.
This is called a "nested main loop" and it's very dangerous because it
frequently results in code being executed at unexpected times. For
example, the attached bug report shows an unintended but also
unavoidable example of a triple nested main loop that occurs where
a second download starts inside the first decide-destination signal
handler, then another, then another. Not good. (Note this is not a new
problem in GTK 4. gtk_dialog_run() no longer exists because it
internally ran a nested main loop, which had this exact same problem.)
To fix this, we need to allow applications to handle the
decide-destination signal asynchronously, so they can finish the signal
handler without immediately providing a destination, provide it later on
in a future main context iteration, and know that the download will not
actually begin until it has been provided. This is easy to do because
the download implementation is already internally asynchronous. A basic
test is added to make sure it even works.
This commit also contains a few drive-by changes in TestDownloads.cpp,
notably where two of the decide-destination callbacks were missing
return values and therefore triggering undefined behavior. It also fixes
a typo that got copy/pasted around and removes some references to URIs
that are now paths
* Source/WebKit/UIProcess/API/glib/WebKitDownload.cpp:
(_WebKitDownloadPrivate::~_WebKitDownloadPrivate):
(maybeFinishDecideDestination):
(webkitDownloadDecideDestination):
(webkit_download_class_init):
(webkitDownloadDecideDestinationWithSuggestedFilename):
(webkit_download_set_destination):
(webkit_download_cancel):
* Source/WebKit/UIProcess/API/glib/WebKitDownloadClient.cpp:
* Source/WebKit/UIProcess/API/glib/WebKitDownloadPrivate.h:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
(downloadLocalFileSuccessfully):
(testDownloadOverwriteDestinationDisallowed):
(testDownloadLocalFileError):
(testDownloadRemoteFile):
(testDownloadRemoteFileError):
(testDownloadAsyncDecideDestination):
(testDownloadAsyncDecideDestinationCancel):
(testDownloadMIMEType):
(testDownloadTextPlainMIMEType):
(testDownloadUserAgent):
(testDownloadEphemeralContext):
(testDownloadDestinationURI):
(beforeAll):
Canonical link: https://commits.webkit.org/261118@main
Commit: 76e78327e8bcd024a7e8509993aa617cc6fecdec
https://github.com/WebKit/WebKit/commit/76e78327e8bcd024a7e8509993aa617cc6fecdec
Author: Michael Catanzaro <mcatanzaro at redhat.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M Source/WebKit/PlatformGTK.cmake
M Source/WebKit/PlatformGTKDeprecated.cmake
M Source/WebKit/PlatformWPE.cmake
M Source/WebKit/PlatformWPEDeprecated.cmake
M Source/WebKit/SourcesGTK.txt
M Source/WebKit/SourcesGTKDeprecated.txt
M Source/WebKit/SourcesWPE.txt
M Source/WebKit/SourcesWPEDeprecated.txt
M Source/WebKit/UIProcess/API/glib/WebKitJavascriptResult.cpp
M Source/WebKit/UIProcess/API/glib/WebKitJavascriptResult.h.in
M Source/WebKit/UIProcess/API/glib/WebKitJavascriptResultPrivate.h
M Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp
M Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
M Source/WebKit/UIProcess/API/glib/WebKitWebView.h.in
M Source/WebKit/UIProcess/API/glib/webkit.h.in
M Source/WebKit/UIProcess/API/wpe/qt/WPEQtView.cpp
M Source/WebKit/gtk/migrating-to-webkitgtk-6.0.md
M Tools/MiniBrowser/gtk/main.c
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestGeolocationManager.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp
M Tools/TestWebKitAPI/Tests/WebKitGtk/TestInspectorServer.cpp
M Tools/TestWebKitAPI/Tests/WebKitGtk/TestWebViewEditor.cpp
M Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp
M Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h
Log Message:
-----------
Cherry-pick 261320 at main (df21fc613d97). https://bugs.webkit.org/show_bug.cgi?id=253476
[GLib] Remove WebKitJavascriptResult
https://bugs.webkit.org/show_bug.cgi?id=253476
Reviewed by Carlos Garcia Campos.
WebKitJavascriptResult is not actually doing anything useful anymore, so
get rid of it in the new API version by replacing it with direct use of
JSCValue.
In the old API version, all APIs added in 2.40 are also changed to use
JSCValue.
This also fixes some suspicious use of webkit_javascript_result_unref()
in TestWebKitWebView.cpp where multiple functions, including
testWebViewDefaultContentSecurityPolicy, were unreffing the
WebKitJavascriptResult returned by
WebViewTest::runJavaScriptAndWaitUntilFinished, but that is owned by
WebViewTest itself.
* Source/WebKit/PlatformGTK.cmake:
* Source/WebKit/PlatformGTKDeprecated.cmake:
* Source/WebKit/PlatformWPE.cmake:
* Source/WebKit/PlatformWPEDeprecated.cmake:
* Source/WebKit/SourcesGTK.txt:
* Source/WebKit/SourcesGTKDeprecated.txt:
* Source/WebKit/SourcesWPE.txt:
* Source/WebKit/SourcesWPEDeprecated.txt:
* Source/WebKit/UIProcess/API/glib/WebKitJavascriptResult.cpp:
* Source/WebKit/UIProcess/API/glib/WebKitJavascriptResult.h.in:
* Source/WebKit/UIProcess/API/glib/WebKitJavascriptResultPrivate.h:
* Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp:
(webkit_user_content_manager_new): Deleted.
(webkit_user_content_manager_add_style_sheet): Deleted.
(webkit_user_content_manager_remove_style_sheet): Deleted.
(webkit_user_content_manager_remove_all_style_sheets): Deleted.
(webkit_user_content_manager_add_script): Deleted.
(webkit_user_content_manager_remove_script): Deleted.
(webkit_user_content_manager_remove_all_scripts): Deleted.
(_WebKitScriptMessageReply::_WebKitScriptMessageReply): Deleted.
(_WebKitScriptMessageReply::sendValue): Deleted.
(_WebKitScriptMessageReply::sendErrorMessage): Deleted.
(_WebKitScriptMessageReply::~_WebKitScriptMessageReply): Deleted.
(webkit_script_message_reply_ref): Deleted.
(webkit_script_message_reply_unref): Deleted.
(webKitScriptMessageReplyCreate): Deleted.
(webkit_script_message_reply_return_value): Deleted.
(webkit_script_message_reply_return_error_message): Deleted.
(webkit_user_content_manager_register_script_message_handler): Deleted.
(webkit_user_content_manager_unregister_script_message_handler): Deleted.
(webkit_user_content_manager_register_script_message_handler_with_reply): Deleted.
(webkit_user_content_manager_register_script_message_handler_in_world): Deleted.
(webkit_user_content_manager_unregister_script_message_handler_in_world): Deleted.
(webkit_user_content_manager_add_filter): Deleted.
(webkit_user_content_manager_remove_filter): Deleted.
(webkit_user_content_manager_remove_filter_by_id): Deleted.
(webkit_user_content_manager_remove_all_filters): Deleted.
(webkitUserContentManagerGetUserContentControllerProxy): Deleted.
* Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewRunJavaScriptWithParams):
(webkitWebViewRunJavascriptWithoutForcedUserGestures):
(webkitWebViewEvaluateJavascriptInternal):
(webkit_web_view_evaluate_javascript):
(webkit_web_view_evaluate_javascript_finish):
(webkitWebViewCallAsyncJavascriptFunctionInternal):
(webkit_web_view_call_async_javascript_function):
(webkit_web_view_call_async_javascript_function_finish):
(webkit_web_view_run_javascript):
(webkit_web_view_run_javascript_in_world):
(webkit_web_view_run_async_javascript_function_in_world):
(resourcesStreamReadCallback):
* Source/WebKit/UIProcess/API/glib/WebKitWebView.h.in:
* Source/WebKit/UIProcess/API/glib/webkit.h.in:
* Source/WebKit/UIProcess/API/wpe/qt/WPEQtView.cpp:
(jsAsyncReadyCallback):
* Source/WebKit/gtk/migrating-to-webkitgtk-6.0.md:
* Tools/MiniBrowser/gtk/main.c:
(aboutDataScriptMessageReceivedCallback):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp:
(ConsoleMessageTest::consoleMessageReceivedCallback):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestGeolocationManager.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestInputMethodContext.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp:
(WebSocketTest::webSocketTestResultCallback):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
(testWebExtensionIsolatedWorld):
(testWebExtensionWindowObjectCleared):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitPolicyClient.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
(isStyleSheetInjectedForURLAtPath):
(isScriptInjectedForURLAtPath):
(UserScriptMessageTest::scriptMessageReceived):
(UserScriptMessageTest::waitUntilMessageReceived):
(UserScriptMessageTest::postMessageAndWaitUntilReceived):
(UserScriptMessageTest::asyncScriptMessageReceived):
(UserScriptMessageTest::waitUntilPromiseResolved):
(UserScriptMessageTest::postMessageAndWaitForPromiseResolved):
(testUserContentManagerScriptMessageReceived):
(testUserContentManagerScriptMessageInWorldReceived):
(testUserContentManagerScriptMessageWithReplyReceived):
(testUserContentManagerScriptMessageFromDOMBindings):
(isCSSBlockedForURLAtPath):
(UserScriptMessageTest::UserScriptMessageTest): Deleted.
(UserScriptMessageTest::~UserScriptMessageTest): Deleted.
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(testWebContextURIScheme):
(testWebContextLanguages):
(xhrMessageReceivedCallback):
(testWebContextSecurityFileXHR):
(testWebContextTimeZoneOverride):
(testWebContextTimeZoneOverrideInWorker):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewRunAsyncFunctions):
(testWebViewRunJavaScript):
(testWebViewPageVisibility):
(testWebViewDocumentFocus):
(testWebViewCORSAllowlist):
(testWebViewDefaultContentSecurityPolicy):
(testWebViewWebExtensionMode):
(testWebViewDisableWebSecurity):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(testWebViewHandleCorruptedLocalStorage):
* Tools/TestWebKitAPI/Tests/WebKitGtk/TestInspectorServer.cpp:
(testInspectorServerPageList):
(testInspectorHTTPServerPageList):
* Tools/TestWebKitAPI/Tests/WebKitGtk/TestWebViewEditor.cpp:
(testWebViewEditorInsertImage):
(testWebViewEditorCreateLink):
* Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::~WebViewTest):
(WebViewTest::assertJavaScriptBecomesTrue):
(runJavaScriptReadyCallback):
(runAsyncJavaScriptFunctionInWorldReadyCallback):
(WebViewTest::runJavaScriptAndWaitUntilFinished):
(WebViewTest::runJavaScriptFromGResourceAndWaitUntilFinished):
(WebViewTest::runJavaScriptInWorldAndWaitUntilFinished):
(WebViewTest::runAsyncJavaScriptFunctionInWorldAndWaitUntilFinished):
(WebViewTest::runJavaScriptWithoutForcedUserGesturesAndWaitUntilFinished):
(WebViewTest::javascriptResultToCString):
(WebViewTest::javascriptResultToNumber):
(WebViewTest::javascriptResultToBoolean):
(WebViewTest::javascriptResultIsNull):
(WebViewTest::javascriptResultIsUndefined):
(WebViewTest::runWebProcessTest):
* Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
Canonical link: https://commits.webkit.org/261320@main
Commit: da6e77b397497a00a046ad80d0fa4f94a2154864
https://github.com/WebKit/WebKit/commit/da6e77b397497a00a046ad80d0fa4f94a2154864
Author: Michael Catanzaro <mcatanzaro at redhat.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M Source/WebKit/PlatformGTK.cmake
M Source/WebKit/PlatformGTKDeprecated.cmake
M Source/WebKit/PlatformWPE.cmake
M Source/WebKit/PlatformWPEDeprecated.cmake
M Source/WebKit/Scripts/glib/generate-api-header.py
M Source/WebKit/Shared/API/glib/WebKitUserMessage.cpp
M Source/WebKit/SourcesGTK.txt
M Source/WebKit/SourcesWPE.txt
M Source/WebKit/UIProcess/API/glib/WebKitInjectedBundleClient.cpp
M Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
M Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in
M Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h
M Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
M Source/WebKit/UIProcess/API/glib/webkit.h.in
M Source/WebKit/UIProcess/API/gtk/WebKitVersion.h.in
M Source/WebKit/UIProcess/API/wpe/WebKitVersion.h.in
R Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp
R Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h
M Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp
M Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp
M Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.h.in
R Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtensionPrivate.h
A Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebProcessExtension.cpp
A Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebProcessExtension.h.in
A Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebProcessExtensionPrivate.h
A Source/WebKit/WebProcess/InjectedBundle/API/glib/WebProcessExtensionManager.cpp
A Source/WebKit/WebProcess/InjectedBundle/API/glib/WebProcessExtensionManager.h
R Source/WebKit/WebProcess/InjectedBundle/API/glib/webkit-web-extension.h.in
A Source/WebKit/WebProcess/InjectedBundle/API/glib/webkit-web-process-extension.h.in
M Source/WebKit/WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.cpp.in
M Source/WebKit/WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypesGtk3.h.in
M Source/WebKit/WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypesGtk4.h.in
M Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.cpp.in
R Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.in
A Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypesWPE1.h.in
A Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypesWPE2.h.in
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/WebPage.messages.in
M Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp
M Source/WebKit/WebProcess/WebProcess.h
M Source/WebKit/WebProcess/WebProcess.messages.in
M Source/WebKit/WebProcess/glib/WebProcessGLib.cpp
A Source/WebKit/gtk/gtk3-urlmap.js.in
A Source/WebKit/gtk/gtk3-webkitgtk.toml.in
A Source/WebKit/gtk/gtk4-urlmap.js.in
A Source/WebKit/gtk/gtk4-webkitgtk.toml.in
M Source/WebKit/gtk/migrating-to-webkitgtk-6.0.md
R Source/WebKit/gtk/urlmap.js.in
R Source/WebKit/gtk/webkitgtk-web-extension.pc.in
A Source/WebKit/gtk/webkitgtk-web-process-extension.pc.in
A Source/WebKit/gtk/webkitgtk-web-process-extension.toml.in
R Source/WebKit/gtk/webkitgtk-webextension.toml.in
R Source/WebKit/gtk/webkitgtk.toml.in
M Source/WebKit/webkitglib-symbols.map
R Source/WebKit/wpe/urlmap.js
R Source/WebKit/wpe/wpe-web-extension-uninstalled.pc.in
R Source/WebKit/wpe/wpe-web-extension.pc.in
A Source/WebKit/wpe/wpe-web-process-extension-uninstalled.pc.in
A Source/WebKit/wpe/wpe-web-process-extension.pc.in
A Source/WebKit/wpe/wpe-web-process-extension.toml.in
A Source/WebKit/wpe/wpe1-urlmap.js
A Source/WebKit/wpe/wpe2-urlmap.js
R Source/WebKit/wpe/wpewebextension.toml.in
M Source/WebKit/wpe/wpewebkit.toml.in
M Source/cmake/OptionsGTK.cmake
M Source/cmake/OptionsWPE.cmake
M Tools/PlatformWPE.cmake
M Tools/Scripts/webkitpy/style/checker.py
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/TestMultiprocess.cpp
R Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp
A Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebProcessExtensions.cpp
R Tools/TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp
A Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessExtensionTest.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp
M Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.h
M Tools/TestWebKitAPI/Tests/WebKitGtk/AutocleanupsTest.cpp
M Tools/TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp
M Tools/TestWebKitAPI/Tests/WebKitGtk/DOMDOMWindowTest.cpp
M Tools/TestWebKitAPI/Tests/WebKitGtk/DOMNodeFilterTest.cpp
M Tools/TestWebKitAPI/Tests/WebKitGtk/DOMNodeTest.cpp
M Tools/TestWebKitAPI/Tests/WebKitGtk/DOMXPathNSResolverTest.cpp
M Tools/TestWebKitAPI/Tests/WebKitGtk/TestDOMDOMWindow.cpp
M Tools/TestWebKitAPI/glib/CMakeLists.txt
M Tools/TestWebKitAPI/glib/PlatformGTK.cmake
M Tools/TestWebKitAPI/glib/TestExpectations.json
M Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.cpp
M Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.h
M Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp
M Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h
Log Message:
-----------
Cherry-pick 261349 at main (e60e9083903f). https://bugs.webkit.org/show_bug.cgi?id=226665
[GLib] Rename WebKitWebExtension to WebKitWebProcessExtension
https://bugs.webkit.org/show_bug.cgi?id=226665
Reviewed by Adrian Perez de Castro.
This should avoid confusion between web process extensions vs.
WebExtensions, the popular and entirely unrelated API for Chrome,
Firefox, and Safari extensions.
* Source/WebKit/PlatformGTK.cmake:
* Source/WebKit/PlatformGTKDeprecated.cmake:
* Source/WebKit/PlatformWPE.cmake:
* Source/WebKit/PlatformWPEDeprecated.cmake:
* Source/WebKit/Scripts/glib/generate-api-header.py:
* Source/WebKit/Shared/API/glib/WebKitUserMessage.cpp:
* Source/WebKit/SourcesGTK.txt:
* Source/WebKit/SourcesWPE.txt:
* Source/WebKit/UIProcess/API/glib/WebKitInjectedBundleClient.cpp:
* Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp:
(webkit_web_context_class_init):
(createDefaultWebContext): Deleted.
(webkit_web_context_get_default): Deleted.
(webkit_web_context_new): Deleted.
(webkit_web_context_new_ephemeral): Deleted.
(webkit_web_context_new_with_website_data_manager): Deleted.
(webkit_web_context_get_website_data_manager): Deleted.
(webkit_web_context_is_ephemeral): Deleted.
(webkit_web_context_is_automation_allowed): Deleted.
(webkit_web_context_set_automation_allowed): Deleted.
(webkit_web_context_get_network_session_for_automation): Deleted.
(webkit_web_context_set_cache_model): Deleted.
(webkit_web_context_get_cache_model): Deleted.
(webkit_web_context_clear_cache): Deleted.
(webkit_web_context_set_network_proxy_settings): Deleted.
(webkit_web_context_download_uri): Deleted.
(webkit_web_context_get_cookie_manager): Deleted.
(webkit_web_context_get_geolocation_manager): Deleted.
(ensureFaviconDatabase): Deleted.
(webkit_web_context_set_favicon_database_directory): Deleted.
(webkit_web_context_get_favicon_database_directory): Deleted.
(webkit_web_context_get_favicon_database): Deleted.
(webkit_web_context_get_security_manager): Deleted.
(webkit_web_context_set_additional_plugins_directory): Deleted.
(webkit_web_context_get_plugins): Deleted.
(webkit_web_context_get_plugins_finish): Deleted.
(webkit_web_context_register_uri_scheme): Deleted.
(webkit_web_context_set_sandbox_enabled): Deleted.
(pathIsHomeDirectory): Deleted.
(pathIsBlocked): Deleted.
(webkit_web_context_add_path_to_sandbox): Deleted.
(webkit_web_context_get_sandbox_enabled): Deleted.
(webkit_web_context_get_spell_checking_enabled): Deleted.
(webkit_web_context_set_spell_checking_enabled): Deleted.
(webkit_web_context_get_spell_checking_languages): Deleted.
(webkit_web_context_set_spell_checking_languages): Deleted.
(webkit_web_context_set_preferred_languages): Deleted.
(webkit_web_context_set_tls_errors_policy): Deleted.
(webkit_web_context_get_tls_errors_policy): Deleted.
(webkit_web_context_set_web_extensions_directory): Deleted.
(webkit_web_context_set_web_extensions_initialization_user_data): Deleted.
(webkit_web_context_set_disk_cache_directory): Deleted.
(webkit_web_context_prefetch_dns): Deleted.
(webkit_web_context_allow_tls_certificate_for_host): Deleted.
(webkit_web_context_set_process_model): Deleted.
(webkit_web_context_get_process_model): Deleted.
(webkit_web_context_set_web_process_count_limit): Deleted.
(webkit_web_context_get_web_process_count_limit): Deleted.
(addOriginToMap): Deleted.
(webkit_web_context_initialize_notification_permissions): Deleted.
(webkit_web_context_send_message_to_all_extensions): Deleted.
(webkit_web_context_set_use_system_appearance_for_scrollbars): Deleted.
(webkit_web_context_get_use_system_appearance_for_scrollbars): Deleted.
(webkit_web_context_get_time_zone_override): Deleted.
(webkitWebContextInitializeNotificationPermissions): Deleted.
(webkitWebContextDownloadStarted): Deleted.
(webkitWebContextInitializeWebExtensions): Deleted.
(webkitWebContextGetProcessPool): Deleted.
(webkitWebContextCreatePageForWebView): Deleted.
(webkitWebContextWebViewDestroyed): Deleted.
(webkitWebContextGetWebViewForPage): Deleted.
* Source/WebKit/UIProcess/API/glib/WebKitWebContext.h.in:
* Source/WebKit/UIProcess/API/glib/WebKitWebContextPrivate.h:
* Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:
* Source/WebKit/UIProcess/API/glib/webkit.h.in:
* Source/WebKit/UIProcess/API/gtk/WebKitVersion.h.in:
* Source/WebKit/UIProcess/API/wpe/WebKitVersion.h.in:
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp:
(WKBundleInitialize):
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp:
(webkitWebProcessExtensionCreate):
(webkitWebProcessExtensionDidReceiveUserMessage):
(webkitWebProcessExtensionSetGarbageCollectOnPageDestroy):
(webkitWebExtensionCreate): Deleted.
(webkitWebExtensionDidReceiveUserMessage): Deleted.
(webkitWebExtensionSetGarbageCollectOnPageDestroy): Deleted.
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.h.in:
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebProcessExtension.cpp: Copied from Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtension.cpp.
(webkitWebProcessExtensionCreate):
(webkitWebProcessExtensionDidReceiveUserMessage):
(webkitWebProcessExtensionSetGarbageCollectOnPageDestroy):
(webkit_web_process_extension_get_page):
(webkit_web_process_extension_send_message_to_context):
(webkit_web_process_extension_send_message_to_context_finish):
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebProcessExtension.h.in: Added.
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebProcessExtensionPrivate.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebExtensionPrivate.h.
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebProcessExtensionManager.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp.
(WebKit::WebProcessExtensionManager::singleton):
(WebKit::WebProcessExtensionManager::scanModules):
(WebKit::parseUserData):
(WebKit::WebProcessExtensionManager::initializeWebProcessExtension):
(WebKit::WebProcessExtensionManager::initialize):
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebProcessExtensionManager.h: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h.
(WebKit::WebProcessExtensionManager::extension const):
* Source/WebKit/WebProcess/InjectedBundle/API/glib/webkit-web-process-extension.h.in: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/glib/webkit-web-extension.h.in.
* Source/WebKit/WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypes.cpp.in:
* Source/WebKit/WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypesGtk3.h.in:
* Source/WebKit/WebProcess/InjectedBundle/API/gtk/WebKitWebProcessEnumTypesGtk4.h.in:
* Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.cpp.in:
* Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypesWPE1.h.in: Copied from Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.in.
* Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypesWPE2.h.in: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/wpe/WebKitWebProcessEnumTypes.h.in.
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/WebPage.messages.in:
* Source/WebKit/WebProcess/WebPage/glib/WebPageGLib.cpp:
(WebKit::WebPage::sendMessageToWebProcessExtensionWithReply):
(WebKit::WebPage::sendMessageToWebProcessExtension):
(WebKit::WebPage::sendMessageToWebExtensionWithReply): Deleted.
(WebKit::WebPage::sendMessageToWebExtension): Deleted.
* Source/WebKit/WebProcess/WebProcess.h:
* Source/WebKit/WebProcess/WebProcess.messages.in:
* Source/WebKit/WebProcess/glib/WebProcessGLib.cpp:
(WebKit::WebProcess::sendMessageToWebProcessExtension):
(WebKit::WebProcess::sendMessageToWebExtension): Deleted.
* Source/WebKit/gtk/gtk3-urlmap.js.in: Copied from Source/WebKit/gtk/urlmap.js.in.
* Source/WebKit/gtk/gtk3-webkitgtk.toml.in: Copied from Source/WebKit/gtk/webkitgtk.toml.in.
* Source/WebKit/gtk/gtk4-urlmap.js.in: Renamed from Source/WebKit/gtk/urlmap.js.in.
* Source/WebKit/gtk/gtk4-webkitgtk.toml.in: Renamed from Source/WebKit/gtk/webkitgtk.toml.in.
* Source/WebKit/gtk/migrating-to-webkitgtk-6.0.md:
* Source/WebKit/gtk/webkitgtk-web-process-extension.pc.in: Renamed from Source/WebKit/gtk/webkitgtk-web-extension.pc.in.
* Source/WebKit/gtk/webkitgtk-web-process-extension.toml.in: Renamed from Source/WebKit/gtk/webkitgtk-webextension.toml.in.
* Source/WebKit/webkitglib-symbols.map:
* Source/WebKit/wpe/wpe-web-process-extension-uninstalled.pc.in: Renamed from Source/WebKit/wpe/wpe-web-extension-uninstalled.pc.in.
* Source/WebKit/wpe/wpe-web-process-extension.pc.in: Renamed from Source/WebKit/wpe/wpe-web-extension.pc.in.
* Source/WebKit/wpe/wpe-web-process-extension.toml.in: Renamed from Source/WebKit/wpe/wpewebextension.toml.in.
* Source/WebKit/wpe/wpe1-urlmap.js: Copied from Source/WebKit/wpe/urlmap.js.
(const.baseURLApiLevelSuffix):
* Source/WebKit/wpe/wpe2-urlmap.js: Renamed from Source/WebKit/wpe/urlmap.js.
(const.baseURLApiLevelSuffix):
* Source/WebKit/wpe/wpewebkit.toml.in:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:
* Tools/PlatformWPE.cmake:
* Tools/Scripts/webkitpy/style/checker.py:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestMultiprocess.cpp:
(testProcessPerWebView):
(testMultiprocessWebViewCreateReadyClose):
* Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebProcessExtensions.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp.
(checkTitle):
(testWebProcessExtensionGetTitle):
(inputElementIsUserEdited):
(testWebProcessExtensionInputElementIsUserEdited):
(documentLoadedCallback):
(testDocumentLoadedSignal):
(webProcessTerminatedCallback):
(testWebKitWebViewProcessCrashed):
(scriptDialogCallback):
(runJavaScriptInIsolatedWorldFinishedCallback):
(testWebProcessExtensionIsolatedWorld):
(didAssociateFormControlsCallback):
(testWebProcessExtensionFormControlsAssociated):
(FormSubmissionTest::FormSubmissionTest):
(FormSubmissionTest::~FormSubmissionTest):
(FormSubmissionTest::testFormSubmissionResult):
(FormSubmissionTest::willSendDOMEventCallback):
(FormSubmissionTest::willCompleteCallback):
(FormSubmissionTest::runJavaScriptAndWaitUntilFormSubmitted):
(testWebProcessExtensionFormSubmissionSteps):
(webViewPageIDChanged):
(testWebProcessExtensionPageID):
(UserMessageTest::webViewUserMessageReceivedCallback):
(UserMessageTest::webContextUserMessageReceivedCallback):
(UserMessageTest::UserMessageTest):
(UserMessageTest::~UserMessageTest):
(UserMessageTest::sendMessage):
(UserMessageTest::sendMessageToAllExtensions):
(UserMessageTest::viewUserMessageReceived):
(UserMessageTest::contextUserMessageReceived):
(UserMessageTest::waitUntilViewMessagesReceived):
(UserMessageTest::waitUntilViewMessageReceived):
(UserMessageTest::waitUntilContextMessageReceived):
(readFileDescriptor):
(testWebProcessExtensionUserMessages):
(testWebProcessExtensionWindowObjectCleared):
(beforeAll):
(afterAll):
* Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessExtensionTest.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp.
(DelayedSignal::DelayedSignal):
(emitDocumentLoaded):
(documentLoadedCallback):
(emitURIChanged):
(uriChangedCallback):
(sendRequestCallback):
(serializeContextMenu):
(serializeNode):
(contextMenuCallback):
(consoleMessageSentCallback):
(emitFormControlsAssociated):
(formControlsAssociatedForFrameCallback):
(formControlsAssociatedCallback):
(emitFormSubmissionEvent):
(willSubmitFormDeprecatedCallback):
(handleFormSubmissionCallback):
(willSendSubmitEventCallback):
(willSubmitFormCallback):
(pageMessageReceivedCallback):
(emitPageCreated):
(pageCreatedCallback):
(extensionMessageReceivedCallback):
* Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
(windowObjectClearedCallback):
(webkit_web_extension_initialize):
* Tools/TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.h:
* Tools/TestWebKitAPI/Tests/WebKitGtk/AutocleanupsTest.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGtk/DOMDOMWindowTest.cpp:
(WebKitDOMDOMWindowTest::testSignals):
(WebKitDOMDOMWindowTest::testDispatchEvent):
(WebKitDOMDOMWindowTest::testGetComputedStyle):
(WebKitDOMDOMWindowTest::runTest):
* Tools/TestWebKitAPI/Tests/WebKitGtk/DOMNodeFilterTest.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGtk/DOMNodeTest.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGtk/DOMXPathNSResolverTest.cpp:
* Tools/TestWebKitAPI/Tests/WebKitGtk/TestDOMDOMWindow.cpp:
(beforeAll):
* Tools/TestWebKitAPI/glib/CMakeLists.txt:
* Tools/TestWebKitAPI/glib/PlatformGTK.cmake:
* Tools/TestWebKitAPI/glib/TestExpectations.json:
* Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.cpp:
(dbusServerConnection):
* Tools/TestWebKitAPI/glib/WebKitGLib/TestMain.h:
(Test::initializeWebProcessExtensionsCallback):
(Test::Test):
(Test::initializeWebProcessExtensions):
(Test::initializeWebExtensionsCallback): Deleted.
(Test::initializeWebExtensions): Deleted.
* Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::extensionProxy):
* Tools/TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
Canonical link: https://commits.webkit.org/261349@main
Commit: 42a4dcf86dfc21059da90e02353a8dd653f08989
https://github.com/WebKit/WebKit/commit/42a4dcf86dfc21059da90e02353a8dd653f08989
Author: Carlos Garcia Campos <cgarcia at igalia.com>
Date: 2023-03-08 (Wed, 08 Mar 2023)
Changed paths:
M Source/WebKit/Shared/NativeWebKeyboardEvent.h
M Source/WebKit/Shared/WebEvent.serialization.in
M Source/WebKit/Shared/WebKeyboardEvent.cpp
M Source/WebKit/Shared/WebKeyboardEvent.h
M Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp
M Source/WebKit/Shared/gtk/WebEventFactory.cpp
M Source/WebKit/Shared/gtk/WebEventFactory.h
M Source/WebKit/Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp
M Source/WebKit/Shared/libwpe/WebEventFactory.cpp
M Source/WebKit/Shared/libwpe/WebEventFactory.h
M Source/WebKit/SourcesGTK.txt
M Source/WebKit/SourcesWPE.txt
A Source/WebKit/UIProcess/API/glib/KeyAutoRepeatHandler.cpp
A Source/WebKit/UIProcess/API/glib/KeyAutoRepeatHandler.h
M Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
M Source/WebKit/UIProcess/API/wpe/WPEView.cpp
M Source/WebKit/UIProcess/API/wpe/WPEView.h
Log Message:
-----------
Cherry-pick 261363 at main (416736dee2ce). https://bugs.webkit.org/show_bug.cgi?id=253507
[GTK][WPE] Implement KeyboardEvent.repeat
https://bugs.webkit.org/show_bug.cgi?id=253507
Reviewed by Michael Catanzaro.
It's always false for GTK and WPE. This is also used since 259146 at main
to decide when to use the keyboard scrolling animation for page scrolls.
Neither GTK nor libpwe provide information about whether a key press
event is auto-repeated or not, so this adds a simple helper class to
handle it.
* Source/WebKit/Shared/NativeWebKeyboardEvent.h:
* Source/WebKit/Shared/WebEvent.serialization.in:
* Source/WebKit/Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent):
* Source/WebKit/Shared/WebKeyboardEvent.h:
* Source/WebKit/Shared/gtk/NativeWebKeyboardEventGtk.cpp:
(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
* Source/WebKit/Shared/gtk/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebKeyboardEvent):
* Source/WebKit/Shared/gtk/WebEventFactory.h:
* Source/WebKit/Shared/libwpe/NativeWebKeyboardEventLibWPE.cpp:
(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
* Source/WebKit/Shared/libwpe/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebKeyboardEvent):
* Source/WebKit/SourcesGTK.txt:
* Source/WebKit/UIProcess/API/glib/KeyAutoRepeatHandler.cpp: Added.
(WebKit::KeyAutoRepeatHandler::keyPress):
(WebKit::KeyAutoRepeatHandler::keyRelease):
* Source/WebKit/UIProcess/API/glib/KeyAutoRepeatHandler.h: Added.
* Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent):
(webkitWebViewBaseKeyReleaseEvent):
(webkitWebViewBaseKeyPressed):
(webkitWebViewBaseKeyReleased):
(webkitWebViewBaseSynthesizeKeyEvent):
* Source/WebKit/UIProcess/API/wpe/WPEView.cpp:
(WKWPE::View::handleKeyboardEvent):
(WKWPE::View::synthesizeCompositionKeyPress):
* Source/WebKit/UIProcess/API/wpe/WPEView.h:
Canonical link: https://commits.webkit.org/261363@main
Compare: https://github.com/WebKit/WebKit/compare/82301581f8c9...42a4dcf86dfc
More information about the webkit-changes
mailing list