[webkit-changes] [WebKit/WebKit] 2f0325: [WPE] WPE Platform: make width, height, scale and ...

Carlos Garcia Campos noreply at github.com
Wed Mar 13 23:10:12 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2f03251130ef53d46a41acffbebd1cb1a5f50f1f
      https://github.com/WebKit/WebKit/commit/2f03251130ef53d46a41acffbebd1cb1a5f50f1f
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
    M Source/WebKit/WPEPlatform/wpe/WPEView.cpp
    M Source/WebKit/WPEPlatform/wpe/WPEView.h
    M Source/WebKit/WPEPlatform/wpe/drm/WPEViewDRM.cpp
    M Source/WebKit/WPEPlatform/wpe/headless/WPEViewHeadless.cpp
    M Source/WebKit/WPEPlatform/wpe/wayland/WPEViewWayland.cpp

  Log Message:
  -----------
  [WPE] WPE Platform: make width, height, scale and state read only properties of WPEView
https://bugs.webkit.org/show_bug.cgi?id=270906

Reviewed by Alejandro G. Castro.

The API to get and set those properties is a bit confusing and users are
confused thinking they can call wpe_view_resize() from the app to resize
the view, for example. Those properties should only be changed by WPEView
derived classes in platform implementations.

This patch makes the properties read only and the setters are renamed as
notification functions and documented as only expected to be called by
derived classes. wpe_view_resize() now requests a resize and a virtual
method has been added for platforms to implement it only if they support
resizing (DRM doesn't, for example).

* Source/WebKit/WPEPlatform/wpe/WPEView.cpp:
(wpeViewGetProperty):
(wpe_view_class_init):
(wpe_view_get_width):
(wpe_view_get_height):
(wpe_view_resize):
(wpe_view_resized):
(wpe_view_scale_changed):
(wpe_view_state_changed):
(wpe_view_set_width): Deleted.
(wpe_view_set_height): Deleted.
(wpe_view_set_scale): Deleted.
(wpe_view_set_state): Deleted.
* Source/WebKit/WPEPlatform/wpe/WPEView.h:
* Source/WebKit/WPEPlatform/wpe/drm/WPEViewDRM.cpp:
(wpeViewDRMConstructed):
* Source/WebKit/WPEPlatform/wpe/headless/WPEViewHeadless.cpp:
(wpeViewHeadlessResize):
(wpeViewHeadlessSetFullscreen):
(wpe_view_headless_class_init):
* Source/WebKit/WPEPlatform/wpe/wayland/WPEViewWayland.cpp:
(wpeViewWaylandConstructed):
(wpeViewWaylandResize):
(wpe_view_wayland_class_init):

Canonical link: https://commits.webkit.org/276070@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