[webkit-changes] [WebKit/WebKit] 10d6f8: [GLib] WebKitPermissionRequest should use G_DECLAR...

Adrian Perez noreply at github.com
Thu Feb 16 16:05:43 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 10d6f8608be482414bdde8ca71680efe694a116f
      https://github.com/WebKit/WebKit/commit/10d6f8608be482414bdde8ca71680efe694a116f
  Author: Adrian Perez de Castro <aperez at igalia.com>
  Date:   2023-02-16 (Thu, 16 Feb 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/glib/WebKitDeviceInfoPermissionRequest.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitGeolocationPermissionRequest.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitMediaKeySystemPermissionRequest.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitNotificationPermissionRequest.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitPermissionRequest.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitPermissionRequest.h.in
    M Source/WebKit/UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataAccessPermissionRequest.cpp

  Log Message:
  -----------
  [GLib] WebKitPermissionRequest should use G_DECLARE_INTERFACE in 2022 API
https://bugs.webkit.org/show_bug.cgi?id=252383

Reviewed by Michael Catanzaro.

Use G_DECLARE_INTERFACE in the new API for the WebKitPermissionRequest
type. It is not worth it to add a new WEBKIT_DECLARE_INTERFACE macro
because it would basically forward the parameters to the GLib one.
This also fixes the autoptr cleanup not being defined in the new API
after 260190 at main.

In the old API the interface type is named WebKitPermissionRequestIface,
whereas using the G_DECLARE_INTERFACE macro it is expected to be named
WebKitPermissionRequestInterface, and that needs choosing the name in
the header template. For the implementation files always use the new
name and typedef the old type name to the new to curb the difference.

* Source/WebKit/UIProcess/API/glib/WebKitPermissionRequest.h.in:
* Source/WebKit/UIProcess/API/glib/WebKitDeviceInfoPermissionRequest.cpp:
(webkit_permission_request_interface_init):
* Source/WebKit/UIProcess/API/glib/WebKitGeolocationPermissionRequest.cpp:
(webkit_permission_request_interface_init):
* Source/WebKit/UIProcess/API/glib/WebKitMediaKeySystemPermissionRequest.cpp:
(webkit_permission_request_interface_init):
* Source/WebKit/UIProcess/API/glib/WebKitNotificationPermissionRequest.cpp:
(webkit_permission_request_interface_init):
* Source/WebKit/UIProcess/API/glib/WebKitPermissionRequest.cpp:
(webkit_permission_request_default_init):
(webkit_permission_request_allow):
(webkit_permission_request_deny):
* Source/WebKit/UIProcess/API/glib/WebKitPermissionRequest.h.in:
* Source/WebKit/UIProcess/API/glib/WebKitUserMediaPermissionRequest.cpp:
(webkit_permission_request_interface_init):
* Source/WebKit/UIProcess/API/glib/WebKitWebsiteDataAccessPermissionRequest.cpp:
(webkit_permission_request_interface_init):

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




More information about the webkit-changes mailing list