After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 671195 - Improve Fullscreen support
Improve Fullscreen support
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Interface
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-02 08:43 UTC by Philippe Normand
Modified: 2012-06-23 21:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ephy-window: keep track of whether the downloads box is shown (907 bytes, patch)
2012-06-11 10:35 UTC, Claudio Saavedra
reviewed Details | Review
ephy-window: hide all chrome when entering html5 fullscreen mode (2.97 KB, patch)
2012-06-11 10:35 UTC, Claudio Saavedra
reviewed Details | Review
ephy-embed: show a message popup when entering html5 fullscreen mode (4.21 KB, patch)
2012-06-11 10:35 UTC, Claudio Saavedra
reviewed Details | Review
ephy-window: remove ephy-fullscreen-popup (19.97 KB, patch)
2012-06-20 08:06 UTC, Claudio Saavedra
committed Details | Review
ephy-window: keep track of whether the downloads box is shown (2.51 KB, patch)
2012-06-20 08:06 UTC, Claudio Saavedra
committed Details | Review
ephy-window: hide all chrome when entering fullscreen mode (2.00 KB, patch)
2012-06-20 08:06 UTC, Claudio Saavedra
reviewed Details | Review
ephy-embed: show a message popup when entering fullscreen mode (7.29 KB, patch)
2012-06-20 08:06 UTC, Claudio Saavedra
committed Details | Review
ephy-window: hide all chrome when entering fullscreen mode (1.76 KB, patch)
2012-06-20 11:50 UTC, Claudio Saavedra
committed Details | Review

Description Philippe Normand 2012-03-02 08:43:34 UTC
Since WebKitGtk 1.7.90 the WebView has two new signals: entering-fullscreen and leaving-fullscreen. These signals are emitted when the user requests full screen display for a specific HTML element and also when he clicks on the fullscreen button of the <video> element controls.

For more details see the spec: http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html

I'd like to integrate this new feature in ephy-window. When the entering-fullscreen signal is emitted we should somehow ask the user's approval and remember about his choice in a white-list. The user can deny or accept full screen display at this stage.

Once the window switched to full screen display we should inform the user how to exit from this display mode (escape and f on the keyboard work for instance).
Comment 1 Philippe Normand 2012-03-02 17:49:54 UTC
Chromium displays 2 very minimalistic popups, the first one to ask user permission with 2 buttons (allow/deny) and one to notify the user of the display change (example: "Vimeo is now full screen, Exit full screen (Esc)"). The "Exit full screen" is actually a link, so the user has a chance to click on it.

You can test this with Chromium 17, at least.
Comment 2 Claudio Saavedra 2012-05-22 17:11:37 UTC
Jon, Jakub, do you have any suggestions for the UI/UX design of this? Otherwise I'll cook something simple. I want at least basic support for this to be in 3.6.

First things that come to mind:

- how to display the notification (overlayed/popup/message area/etc)
- whether to go fullscreen before/after the user confirmation
- etc..
Comment 3 Jakub Steiner 2012-05-23 11:53:29 UTC
Why do we need to ask for permission for going fullscreen?
Comment 5 William Jon McCann 2012-05-23 13:43:27 UTC
I think that is a misunderstanding of the spec to be honest. What is required here is indicating what happened and allowing it to be changed not asking for permission up front. That seems really annoying and something we avoid in GNOME "Are you sure? (y/n)".

And even that doesn't really apply when the user explicitly asks for fullscreen.

So, I think we should do something like this:

 * Animate the transition to fullscreen to make it clear what is going on
 * Show the overlay toolbar at the top of the screen for a moment after the animation is complete
 * Show a leave fullscreen action in that toolbar
 * Hide the toolbar if the user clicks in the window content or after a second or two
 * Show the toolbar if the user goes to the top of the screen or maybe depending on the content if the user clicks on the content (eg. video)
Comment 6 Felipe Erias Morandeira 2012-05-23 16:06:18 UTC
I would go only with ESC to leave full-screen mode; 'f' is not a good choice because it can easily be entered if the web site has an input field or if it is somehow monitoring key presses, and furthermore it is a mnemonic that only really works in English.

Firefox shows a large banner ("Press ESC to leave full-screen mode") and dims the content for ~5 seconds. The user does not need to acknowledge a modal dialog before continuing. This might be a good compromise between informing the user and not being too disruptive.

Philippe's idea of asking at least once for each site looks reasonable as well. A possible approach might be to show a dialog the first time that you enter f-s mode from a given site, plus a small reminder afterwards.

Just showing the banner might work as well (and be less intrusive), whereas showing a modal dialog for every full-screen YouTube video looks like overkill.


Looking at the issue of an user not knowing how to get out of full-screen mode, another option could be to leave f-s if the user opens the Overview.

I am thinking of a confused user trying to leave f-s but not remembering to press ESC. In that scenario, launching the Overview looks like a reasonably likely thing to try, if only because it is a very common action in GNOME 3 (far more likely than Ctrl-W or other shortcuts, in any case).

Something like:
 - user can't leave f-s mode
 - user tries opening the Overview
 - Ephy leaves f-s mode
 - user goes back to Ephy from the Overview, all is normal again

This would have the additional benefit of providing a way to leave f-s using only the mouse (albeit a convoluted one).

(Btw, should there be a way to do this on a touch screen?)


TL;DR: I am leaning towards the following:
 - show an overlay banner whenever a web app goes full-screen
 - leave full-screen mode if user opens Overview
Comment 7 Claudio Saavedra 2012-06-11 10:35:26 UTC
Created attachment 216095 [details] [review]
ephy-window: keep track of whether the downloads box is shown
Comment 8 Claudio Saavedra 2012-06-11 10:35:30 UTC
Created attachment 216096 [details] [review]
ephy-window: hide all chrome when entering html5 fullscreen mode

We keep track of the state of the chrome before entering fullscreen
mode in order to restore it afterwards. Also force hiding of notebook
tabs and hide the downloads box.

This is restored afterwards when leaving the fullscreen mode.
Comment 9 Claudio Saavedra 2012-06-11 10:35:33 UTC
Created attachment 216097 [details] [review]
ephy-embed: show a message popup when entering html5 fullscreen mode
Comment 10 Claudio Saavedra 2012-06-11 10:37:48 UTC
There's a screencast here: http://people.gnome.org/~csaavedra/epiphany-html5-fullscreen.webm
Comment 11 Xan Lopez 2012-06-14 09:10:02 UTC
Review of attachment 216095 [details] [review]:

Why not make this an EPHY_WEB_VIEW_CHROME_DOWNLOADS_BOX flag, and hook it into the get_chromes_visibility stuff?
Comment 12 Xan Lopez 2012-06-14 09:12:23 UTC
Review of attachment 216096 [details] [review]:

::: src/ephy-window.c
@@ +2269,3 @@
+
+	sync_chromes_visibility (window);
+	gtk_notebook_set_show_tabs (window->priv->notebook, FALSE);

It seems sync_chrome_visibility should somewhat handle this already?

@@ +2270,3 @@
+	sync_chromes_visibility (window);
+	gtk_notebook_set_show_tabs (window->priv->notebook, FALSE);
+	gtk_widget_hide (window->priv->downloads_box);

As suggested it seems nicer to just make the sync method take care of everything.
Comment 13 Xan Lopez 2012-06-14 09:13:59 UTC
Review of attachment 216097 [details] [review]:

::: src/resources/epiphany.css
@@ +29,3 @@
+    border-radius: 7px;
+    border-color: black;
+}

Probably worth poking the design guys (mostly Lapo) about this.
Comment 14 Claudio Saavedra 2012-06-20 08:06:16 UTC
Created attachment 216791 [details] [review]
ephy-window: remove ephy-fullscreen-popup

We're no longer using it
Comment 15 Claudio Saavedra 2012-06-20 08:06:30 UTC
Created attachment 216792 [details] [review]
ephy-window: keep track of whether the downloads box is shown

We add it to EphyWebViewChrome and track it there.
Comment 16 Claudio Saavedra 2012-06-20 08:06:45 UTC
Created attachment 216793 [details] [review]
ephy-window: hide all chrome when entering fullscreen mode

We keep track of the state of the chrome before entering fullscreen
mode in order to restore it afterwards. Also, force hiding of notebook
tabs, since EphyNotebook is ubersmart about it.

When leaving fullscreen mode, restore to the previous state.
Comment 17 Claudio Saavedra 2012-06-20 08:06:58 UTC
Created attachment 216794 [details] [review]
ephy-embed: show a message popup when entering fullscreen mode

The message is different depending on whether we are entering HTML5 fullscreen
mode or application fullscreen, since the keys used to leave either mode are
different.
Comment 18 Xan Lopez 2012-06-20 09:38:59 UTC
Review of attachment 216791 [details] [review]:

Woot.
Comment 19 Xan Lopez 2012-06-20 09:41:08 UTC
Review of attachment 216792 [details] [review]:

Looks good.
Comment 20 Xan Lopez 2012-06-20 09:51:52 UTC
Review of attachment 216793 [details] [review]:

Hrm, I still don't like this very much. There should be a way to tell EphyNotebook "Hide the tabs now. Really, just do it." without leaking stuff into EphyWindow. One odd thing about the ephy_notebook_set_show_tabs method is that the bool parameter that is passed is not used later in the actual computation of the tabs visibility (unless I'm missing something here), so it seems this is somewhat broken/weird.
Comment 21 Xan Lopez 2012-06-20 10:00:36 UTC
Review of attachment 216794 [details] [review]:

::: embed/ephy-embed.c
@@ +304,3 @@
+
+  if (embed->priv->fullscreen_message_id)
+    g_source_remove (embed->priv->fullscreen_message_id);

If this is TRUE does it mean the label is already shown? Isn't adding a new timeout 5 seconds later to hide it sort of wrong? I think we should just exit if the message ID is not 0, unless I'm confused.

@@ +705,3 @@
   gtk_container_add (GTK_CONTAINER (overlay), scrolled_window);
 
+  /* floating message bar for html5 fullscreen */

Nitpick, proper capitalization and period at the end.
Comment 22 Claudio Saavedra 2012-06-20 11:42:19 UTC
(In reply to comment #20)
> Review of attachment 216793 [details] [review]:
> 
> Hrm, I still don't like this very much. There should be a way to tell
> EphyNotebook "Hide the tabs now. Really, just do it." without leaking stuff
> into EphyWindow. One odd thing about the ephy_notebook_set_show_tabs method is
> that the bool parameter that is passed is not used later in the actual
> computation of the tabs visibility (unless I'm missing something here), so it
> seems this is somewhat broken/weird.

Agreed, so I fixed now this property in bug 678468. A new, much simpler, patch follows.

(In reply to comment #21)
> Review of attachment 216794 [details] [review]:
> 
> ::: embed/ephy-embed.c
> @@ +304,3 @@
> +
> +  if (embed->priv->fullscreen_message_id)
> +    g_source_remove (embed->priv->fullscreen_message_id);
> 
> If this is TRUE does it mean the label is already shown? Isn't adding a new
> timeout 5 seconds later to hide it sort of wrong? I think we should just exit
> if the message ID is not 0, unless I'm confused.

This is for the cases when you go quickly from application-fullscreen to HTML5 fullscreen, so that the popup "Press ESC to leave" is shown long enough. Otherwise you risk showing it for a few seconds only. Basically, to restart the timeout when reentering fullscreen for whatever reason.

> 
> @@ +705,3 @@
>    gtk_container_add (GTK_CONTAINER (overlay), scrolled_window);
> 
> +  /* floating message bar for html5 fullscreen */
> 
> Nitpick, proper capitalization and period at the end.

Sure.
Comment 23 Claudio Saavedra 2012-06-20 11:46:00 UTC
Attachment 216791 [details] pushed as 8f4b964 - ephy-window: remove ephy-fullscreen-popup
Attachment 216792 [details] pushed as 6c69d49 - ephy-window: keep track of whether the downloads box is shown
Comment 24 Claudio Saavedra 2012-06-20 11:50:25 UTC
Created attachment 216822 [details] [review]
ephy-window: hide all chrome when entering fullscreen mode

We keep track of the state of the chrome before entering fullscreen
mode in order to restore it afterwards. Also, set tabs-allowed to
FALSE in the EphyNotebook when in fullscreen mode.

When leaving fullscreen mode, restore to the previous state.
Comment 25 Xan Lopez 2012-06-20 12:04:09 UTC
Review of attachment 216822 [details] [review]:

Looks good!
Comment 26 Xan Lopez 2012-06-20 12:49:08 UTC
(In reply to comment #22)
> This is for the cases when you go quickly from application-fullscreen to HTML5
> fullscreen, so that the popup "Press ESC to leave" is shown long enough.
> Otherwise you risk showing it for a few seconds only. Basically, to restart the
> timeout when reentering fullscreen for whatever reason.
> 

OK, let me put it in another way.

What's the scenario exactly in which ephy_embed_entering_fullscreen can be called, with the message shown (so gtk_widget_show has been called on it) and the timeout set to hide it, and where it makes sense to reset the timeout so it stays there for 5 more seconds? My idea would be to do nothing, so that the message is shown for 5 seconds in total, not 5 + whatever amount of time the message had been shown up to that point. Does this make sense?
Comment 27 Claudio Saavedra 2012-06-20 13:32:55 UTC
The following is the scenario: if you go from windowed mode to application fullscreen (via F11) in youtube, for instance, youtube will put the video in its widest non-fullscreen mode. We display the "Press F11 to leave fullscreen" for 5 seconds. If before those 5 seconds are gone you press the "Fullscreen" button in the youtube video, we enter the HTML5 fullscreen, with the video fullscreened. If we don't reset the timeout, what happens is that the banner, now updated with "Press ESC to leave fullscreen" is only shown for whatever time was left, which could be only one or less than a second, which is not enough for the user to read the new message.
Comment 28 Xan Lopez 2012-06-20 13:39:43 UTC
Review of attachment 216794 [details] [review]:

OK. I'm starting to think this whole thing of ESC vs. F11 depending on what kind of fs mode you are in exactly kinda sucks TBH.
Comment 29 Claudio Saavedra 2012-06-20 14:09:24 UTC
(In reply to comment #28)

> OK. I'm starting to think this whole thing of ESC vs. F11 depending on what
> kind of fs mode you are in exactly kinda sucks TBH.

I agree but we're kinda stuck here for now as there doesn't seem to be a way to tell wk to html5-unfullscreen at will. Also, Escape is already bound to stop loading, so using it also for unfullscreen when browsing in fullscreen mode is sort of odd.
Comment 30 Reinout van Schouwen 2012-06-23 21:41:17 UTC
(In reply to comment #29)

> I agree but we're kinda stuck here for now as there doesn't seem to be a way to
> tell wk to html5-unfullscreen at will. Also, Escape is already bound to stop
> loading, so using it also for unfullscreen when browsing in fullscreen mode is
> sort of odd.

It's not *that* odd. Historically, Netscape bound Esc to 'stop animations' whenever the page was fully loaded. Not sure if Firefox still does this, though. In any case, overloading Esc to mean something different when the page is not in loading state, has been done before.