Ubuntu WebView should not silently honour fullscreen requests

Bug #1464249 reported by Olivier Tilloy
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
webbrowser-app (Ubuntu)
Fix Released
High
Olivier Tilloy

Bug Description

The current implementation¹ does this:

    onFullscreenRequested: _webview.fullscreen = fullscreen

¹ http://bazaar.launchpad.net/~phablet-team/webbrowser-app/trunk/view/head:/src/Ubuntu/Web/UbuntuWebView02.qml#L270

This default behaviour is not necessarily desirable for most embedders, who might want to intercept the request and cancel it.
Changing the default behaviour doesn’t require an API change, so it should be safe to do at any point in time (and the sooner the better).

Related branches

Olivier Tilloy (osomon)
Changed in webbrowser-app (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package webbrowser-app - 0.23+15.10.20150618-0ubuntu1

---------------
webbrowser-app (0.23+15.10.20150618-0ubuntu1) wily; urgency=medium

  [ CI Train Bot ]
  * New rebuild forced.

  [ Michael Terry ]
  * Fix spelling of OK in private browsing dialog.

  [ Olivier Tilloy ]
  * Actually push URLs to the clipboard. For some reason setting the
    "text/url-list" mime type doesn’t seem to work (or other
    applications do not implement pasting this kind of data), but
    "text/plain" works well enough for this purpose. (LP: #1463435)
  * Do not honour fullscreen requests silently at the Ubuntu WebView
    level. Instead delegate that behaviour to the webview implementation
    used by the browser and the webapp container. (LP: #1464249)
  * Toggle application-level fullscreen when pressing F11. (LP:
    #1464333)

  [ Ugo Riboni ]
  * Make the browser chrome usable on desktop by implementing common
    keyboard shortcuts and behaviors that users normally expect in such
    an app (LP: #1287361)

 -- CI Train Bot <email address hidden> Thu, 18 Jun 2015 08:12:37 +0000

Changed in webbrowser-app (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Oliver Grawert (ogra) wrote :

with this fix my App does not recieve any fullscreen events from an embedded WebView anymore with the following code:

        Connections {
            target: webview
            onFullscreenChanged: {
                nav.visible = !webview.fullscreen
                if (webview.fullscreen == true) {
                    window.visibility = 5
                } else {
                    window.visibility = 4
                }
            }
        }

when i hack /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/Extras/Browser/UbuntuWebView02.qml on the phone to revert the change all is fine and embedded videos properly emit the onFullscreenChanged to the webview. i assume i need to do any code changes on my side to use an embedded WebView this way now. are these changes somewhere documented ?

Revision history for this message
Oliver Grawert (ogra) wrote :

ok, seems it requires now that i add the line:

onFullscreenRequested: webview.fullscreen = fullscreen

to my WebView {} definition in the code ... we should document this in https://developer.ubuntu.com/api/qml/sdk-15.04/Ubuntu.Web.WebView/

Revision history for this message
Olivier Tilloy (osomon) wrote :

You’re right, this should be documented. I filed bug #1505690 to track this, thanks for pointing it out!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.