Bug 50572 - [GTK] Support the Mozilla-style Fullscreen Javascript API
Summary: [GTK] Support the Mozilla-style Fullscreen Javascript API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-06 09:53 PST by Philippe Normand
Modified: 2010-12-09 10:33 PST (History)
0 users

See Also:


Attachments
proposed patch (15.94 KB, patch)
2010-12-06 12:38 PST, Philippe Normand
mrobinson: review-
Details | Formatted Diff | Diff
proposed patch (15.56 KB, patch)
2010-12-08 08:45 PST, Philippe Normand
mrobinson: review+
Details | Formatted Diff | Diff
2010-12-06 Philippe Normand <pnormand@igalia.com> (18.76 KB, patch)
2010-12-09 03:57 PST, Philippe Normand
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2010-12-06 09:53:05 PST
See also Bug 43099.
A new setting in WebView will be needed.
Comment 1 Philippe Normand 2010-12-06 12:38:45 PST
Created attachment 75731 [details]
proposed patch
Comment 2 Philippe Normand 2010-12-06 12:41:50 PST
Since r72321 the fullscreen css is not loaded though... So setting an element to fullscreen has no effect currently, the fullscreen tests pass however ;) I'll probably open a separate bug for that issue.
Comment 3 Philippe Normand 2010-12-06 13:45:03 PST
Later on we could adapt our FullscreenController or create a new one like in Bug 49481
Comment 4 Martin Robinson 2010-12-08 07:30:37 PST
Comment on attachment 75731 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=75731&action=review

Looks good. The only two issues I have are preventing the documentation from being in our public documentation and the naming of the configure variables.  

> WebKit/gtk/webkit/webkitwebsettings.cpp:913
> +    /**
> +    * WebKitWebSettings:enable-javascript-fullscreen:
> +    *
> +    * Enable or disable support for the Javascript Fullscreen API.
> +    *
> +    * Since: 1.3.8
> +    */

Let's leave this undocumented or unparsed now for now, so that it is private. I don't think we should expose this until other Mac does.

> configure.ac:475
> +              AC_HELP_STRING([--enable-javascript-fullscreen],

I think this should be --enable-fullscreen-api to match the flags on build-webkit and the #ifdef.

> configure.ac:478
> +AC_MSG_RESULT([$enable_javascript_fullscreen])

Ditto.

> configure.ac:960
> +AM_CONDITIONAL([ENABLE_JAVASCRIPT_FULLSCREEN],[test "$enable_javascript_fullscreen" = "yes"])

Ditto.

> configure.ac:1031
> + Javascript Fullscreen support                            : $enable_javascript_fullscreen

Ditto.
Comment 5 Philippe Normand 2010-12-08 08:45:06 PST
Created attachment 75909 [details]
proposed patch
Comment 6 Martin Robinson 2010-12-09 03:30:59 PST
Comment on attachment 75909 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=75909&action=review

Thanks! Please fix the small issue before landing.

> configure.ac:474
> +AC_ARG_ENABLE(javascript_fullscreen,

Better say fullscreen_api here to match the rest of the call.
Comment 7 Philippe Normand 2010-12-09 03:57:58 PST
Created attachment 76042 [details]
2010-12-06  Philippe Normand  <pnormand@igalia.com>

Reviewed by Martin Robinson.

        [GTK] Support the Mozilla-style Fullscreen Javascript API
        https://bugs.webkit.org/show_bug.cgi?id=50572

        * configure.ac: new configure flag to disable the new Javascript
        Fullscreen API build. It is enabled by default.

WebCore:

        Reviewed by Martin Robinson.

        [GTK] Support the Mozilla-style Fullscreen Javascript API
        https://bugs.webkit.org/show_bug.cgi?id=50572

        * GNUmakefile.am: enable the Javascript Fullscreen API feature if
        it's been requested at configure time.

WebKit/gtk:

        Reviewed by Martin Robinson.

        [GTK] Support the Mozilla-style Fullscreen Javascript API
        https://bugs.webkit.org/show_bug.cgi?id=50572

        Fullscreen API support. It is controlled at runtime using a new
        setting called enable-fullscreen, set to FALSE by default.

        * WebCoreSupport/ChromeClientGtk.cpp:
        (WebKit::ChromeClient::supportsFullScreenForElement):
        (WebKit::ChromeClient::enterFullScreenForElement):
        (WebKit::ChromeClient::exitFullScreenForElement):
        * WebCoreSupport/ChromeClientGtk.h:
        * webkit/webkitwebsettings.cpp:
        (webkit_web_settings_class_init):
        (webkit_web_settings_set_property):
        (webkit_web_settings_get_property):
        (webkit_web_settings_copy):
        * webkit/webkitwebview.cpp:
        (webkit_web_view_update_settings):

WebKitTools:

        Reviewed by Martin Robinson.

        [GTK] Support the Mozilla-style Fullscreen Javascript API
        https://bugs.webkit.org/show_bug.cgi?id=50572

        Enable the Javascript Fullscreen support in the GtkLauncher. Also
        make DRT update the Chrome when the WebView settings have been
        reset to consistent values.

        * DumpRenderTree/gtk/DumpRenderTree.cpp:
        (resetDefaultsToConsistentValues):
        * GtkLauncher/main.c:
        (create_window):
        * Scripts/build-webkit:

LayoutTests:

        Reviewed by Martin Robinson.

        [GTK] Support the Mozilla-style Fullscreen Javascript API
        https://bugs.webkit.org/show_bug.cgi?id=50572

        * platform/gtk/Skipped: Unskip now passing fullscreen tests.
Comment 8 Martin Robinson 2010-12-09 10:27:58 PST
Comment on attachment 76042 [details]
2010-12-06  Philippe Normand  <pnormand@igalia.com>

Yay!
Comment 9 Philippe Normand 2010-12-09 10:33:44 PST
Committed r73624: <http://trac.webkit.org/changeset/73624>