[webkit-changes] [WebKit/WebKit] 513a45: [GTK] Fullscreen events should be handled asynchro...

Carlos Garcia Campos noreply at github.com
Tue Sep 12 00:56:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 513a457dd4968cd902d059742d73bb916111e13a
      https://github.com/WebKit/WebKit/commit/513a457dd4968cd902d059742d73bb916111e13a
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h
    M Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
    M Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
    M Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h

  Log Message:
  -----------
  [GTK] Fullscreen events should be handled asynchronously
https://bugs.webkit.org/show_bug.cgi?id=261405

Reviewed by Michael Catanzaro.

We currently notify the fullscreen manager that we have entered
fullscreen before the window has actually changed its state. We should
wait until the window is actually in fullscreen mode. Same happens for
the unfullscreen case. Another thing we need to take into account is
that the window can be already in fullscreen mode, or can be restored
from fullscreen by the system or application without the element asking
for leave fullscreen. When the window is already in fullscreen we just
make the element fullscreen without changing the window, leaving the
window fullscreen when the element leaves fullscreen mode. When the
system or application restores the window, we also request the element
to leave fullscreen mode. This behavior is consistent with other
browsers.

* Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewEnterFullScreen):
(webkitWebViewExitFullScreen):
* Source/WebKit/UIProcess/API/glib/WebKitWebViewPrivate.h:
* Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):
* Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:
(toplevelWindowStateEvent):
(webkitWebViewBaseKeyPressEvent):
(webkitWebViewBaseKeyPressed):
(toplevelWindowStateChanged):
(webkitWebViewBaseToplevelOnScreenWindowIsFullScreen):
(webkitWebViewBaseWillEnterFullScreen):
(webkitWebViewBaseEnterFullScreen):
(webkitWebViewBaseDidEnterFullScreen):
(webkitWebViewBaseWillExitFullScreen):
(webkitWebViewBaseExitFullScreen):
(webkitWebViewBaseDidExitFullScreen):
(webkitWebViewBaseRequestExitFullScreen):
(webkitWebViewBaseIsFullScreen):
(webkitWebViewBaseSynthesizeKeyEvent):
* Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h:

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




More information about the webkit-changes mailing list