[Webkit-unassigned] [Bug 76166] [WK2][GTK] FullScreen signals

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 14 01:53:59 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=76166





--- Comment #13 from Carlos Garcia Campos <cgarcia at igalia.com>  2012-03-14 01:53:58 PST ---
(From update of attachment 131323)
View in context: https://bugs.webkit.org/attachment.cgi?id=131323&action=review

Ideally, there would be a WKFullscreenClient in the C API that we would implement in WebKitWebView to emit our signals. But for some reason there isn't, so the solution, I think, could be to use an internal private GObject in the API layer, used by the WebKitWebViewBase to notify the WebKitWebView about enter/leave fullscreen.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:67
> +    ENTERING_FULLSCREEN,
> +    LEAVING_FULLSCREEN,

I would call these ENTER and LEAVE, since you can control whether to enter/leave fullscreen. Other signal names use the same pattern.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:680
> +     * signal is not handled the WebView will proceed to full screen

the #WebKitWebView

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:690
> +     * Since: 1.9.0

Don't use Since tags in WebKit2 code, there's no previous versions.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:706
> +     * Emitted when the WebView is about to restore its top level

the #WebKitWebView

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:714
> +     * Since: 1.9.0

Same here.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:889
> +gboolean webkitWebViewEnteringFullScreen(WebKitWebView* webView)
> +{
> +    return FALSE;
> +}
> +
> +gboolean webkitWebViewLeavingFullScreen(WebKitWebView* webView)
> +{
> +    return FALSE;
> +}

The default behaviour of true_handled is returning FALSE, so we don't need these default impl.

> Source/WebKit2/UIProcess/gtk/FullScreenWindowController.cpp:74
> +    gboolean returnValue;
> +    g_signal_emit_by_name(WEBKIT_WEB_VIEW(m_webViewBase), "entering-fullscreen", &returnValue);
> +    if (returnValue)
> +        return;

This is API of WebKitWebView, not WebKitWebViewBase, that would produce a critical warning at run time when using the C API. Out of the API layer, WebKitWebView shouldn't be used, that's why we have the separation.

> Source/WebKit2/UIProcess/gtk/FullScreenWindowController.cpp:95
> +    gboolean returnValue;
> +    g_signal_emit_by_name(WEBKIT_WEB_VIEW(m_webViewBase), "leaving-fullscreen", &returnValue);
> +    if (returnValue)
> +        return;

Ditto.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list