[webkit-changes] [WebKit/WebKit] 71df87: [GLib] WebKitWebHitTestResult should use compositi...

Adrian Perez noreply at github.com
Tue Jan 31 16:53:02 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 71df87cb0f482d857f21d1d93d13d097b14eaa42
      https://github.com/WebKit/WebKit/commit/71df87cb0f482d857f21d1d93d13d097b14eaa42
  Author: Adrian Perez de Castro <aperez at igalia.com>
  Date:   2023-01-31 (Tue, 31 Jan 2023)

  Changed paths:
    M Source/WebKit/Shared/API/glib/WebKitHitTestResult.cpp
    M Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebHitTestResult.cpp
    M Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebHitTestResult.h.in
    M Source/WebKit/gtk/migrating-to-webkitgtk-6.0.md

  Log Message:
  -----------
  [GLib] WebKitWebHitTestResult should use composition instead of subclassing
https://bugs.webkit.org/show_bug.cgi?id=251075

Reviewed by Michael Catanzaro.

Make WebKitWebHitTestResult a final type that inherits directly from
GObject with the new 2022 GLib API, which uses a WebKitHitTestResult
instance internally. The methods which were previously inherited from
the base class are added, with their implementations forwarding to the
corresponding WebKitHitTestResult ones. While at it, WebKitHitTestResult
can now be made final and the _WebKitWebHitTestResultClass struct can be
removed from the public header.

* Source/WebKit/Shared/API/glib/WebKitHitTestResult.cpp: Make the type
  final with in new 2022 API.
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebHitTestResult.cpp:
(webkitWebHitTestResultCreate): Arrange to instantiate the contained
WebKitHitTestResult with the new API.
(webkit_web_hit_test_result_get_context): Added, forwards its
implementation to the corresponding WebKitHitTestResult method.
(webkit_web_hit_test_result_context_is_link): Ditto.
(webkit_web_hit_test_result_context_is_image): Ditto.
(webkit_web_hit_test_result_context_is_media): Ditto.
(webkit_web_hit_test_result_context_is_editable): Ditto.
(webkit_web_hit_test_result_context_is_selection): Ditto.
(webkit_web_hit_test_result_get_link_uri): Ditto.
(webkit_web_hit_test_result_get_link_title): Ditto.
(webkit_web_hit_test_result_get_link_label): Ditto.
(webkit_web_hit_test_result_get_image_uri): Ditto.
(webkit_web_hit_test_result_get_media_uri): Ditto.
(webkit_web_hit_test_result_context_is_scrollbar): Ditto.
* Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebHitTestResult.h.in:
  Add methods for the new 2022 API which cover the functionality which
  was previously inherited from WebKitHitTestResult.
* Source/WebKit/gtk/migrating-to-webkitgtk-6.0.md: Added migration note.

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




More information about the webkit-changes mailing list