[Webkit-unassigned] [Bug 75553] [GTK][WK2] Initial FullScreen support
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 5 00:49:43 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=75553
--- Comment #4 from Carlos Garcia Campos <cgarcia at igalia.com> 2012-01-05 00:49:43 PST ---
(From update of attachment 121118)
View in context: https://bugs.webkit.org/attachment.cgi?id=121118&action=review
> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:86
> + RefPtr<FullScreenWindowController> fullScreenWindowController;
I think this should be part of WebKitWebViewBase, not WebKitWebView, otherwise fullscreen won't work when using the C API.
> Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp:481
> +#if ENABLE(FULLSCREEN_API)
> + priv->pageProxy->fullScreenManager()->setWebView(webkitWebViewBase);
> +#endif
I think we can just ignore setWebView(). The fullscreen manager is created with a WebPageProxy that already has a method to get the view WebPageProxy::viewWidget();
> Source/WebKit2/UIProcess/gtk/FullScreenWindowController.cpp:24
> +#include "FullScreenWindowController.h"
I think we can avoid this object and move the implementation to WebKitWebViewBase
> Source/WebKit2/UIProcess/gtk/FullScreenWindowController.cpp:26
> +#include "IntRect.h"
Use <WebCore/IntRect.h>, we prefer angle-bracket includes for non wk2 headers.
> Source/WebKit2/UIProcess/gtk/FullScreenWindowController.cpp:61
> + case 'f':
> + case 'F':
Use GDK_KEY_f and GDK_KEY_F. Is it possible to exit fullscreen without the keyboard?
> Source/WebKit2/UIProcess/gtk/FullScreenWindowController.cpp:83
> + gdk_window_fullscreen(gtk_widget_get_parent_window(GTK_WIDGET(m_webView.get())));
You should use topLevelWindow instead of getting the view parent window. Or just call gtk_window_fullscreen().
> Source/WebKit2/UIProcess/gtk/FullScreenWindowController.cpp:100
> + gdk_window_unfullscreen(gtk_widget_get_parent_window(GTK_WIDGET(m_webView.get())));
Ditto.
> Source/WebKit2/UIProcess/gtk/FullScreenWindowController.cpp:111
> + GdkWindow* window = gtk_widget_get_parent_window(GTK_WIDGET(m_webView.get()));
Ditto.
> Source/WebKit2/UIProcess/gtk/FullScreenWindowController.cpp:113
> + gdk_window_get_frame_extents(window, &rect);
Isn't the FullScreenRect the screenRect()?
> Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:50
> - notImplemented();
> + if (!m_webView)
> + return;
> +
> + WebKitWebView* webView = WEBKIT_WEB_VIEW(m_webView);
> + RefPtr<FullScreenWindowController> controller = webkitWebViewFullscreenWindowController(webView);
> + controller->setWebView(webView);
> + controller->enterFullScreen();
Without the controller object this would be something like:
m_page->fullScreenManager()->willEnterFullScreen();
m_page->fullScreenManager()->beginEnterFullScreenAnimation(10);
webkitWebViewBaseEnterFullscreen(WEBKIT_WEB_VIEW_BASE(m_page->viewWidget());
m_page->fullScreenManager()->didEnterFullScreen();
WebKitWebViewBase would use a flag to know that it's in fullscreen mode and then in webkitWebViewBaseKeyPressEvent() you can check whether user pressed f, F or ESC while in fullscreen mode.
> Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:60
> - notImplemented();
> + if (!m_webView)
> + return;
> +
> + WebKitWebView* webView = WEBKIT_WEB_VIEW(m_webView);
> + RefPtr<FullScreenWindowController> controller = webkitWebViewFullscreenWindowController(webView);
> + controller->exitFullScreen();
This would be just
m_page->fullScreenManager()->willExitFullScreen();
m_page->fullScreenManager()->beginExitFullScreenAnimation(10);
webkitWebViewBaseExitFullscreen(WEBKIT_WEB_VIEW_BASE(m_page->viewWidget());
m_page->fullScreenManager()->didExitFullScreen();
> Source/WebKit2/UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:100
> - notImplemented();
> + if (!m_webView)
> + return;
> +
> + WebKitWebView* webView = WEBKIT_WEB_VIEW(m_webView);
> + RefPtr<FullScreenWindowController> controller = webkitWebViewFullscreenWindowController(webView);
> + rect = controller->getFullScreenRect();
Can we use PlatformScreen::screenRect() from WebCore?
--
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