[tabs] WebView as a Tab child does not work reliably and sometimes crashes

Bug #1124065 reported by Timo Eskola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu UI Toolkit
Fix Released
Critical
Tim Peeters
ubuntu-ui-toolkit (Ubuntu)
Fix Released
Undecided
Unassigned
Raring
Won't Fix
Undecided
Unassigned

Bug Description

I tried to use WebView in Tabs, but it does not work as expected.

The example below starts nicely with qmlscene. Flicking between tab 1 and tab 2 is also fine. If I flick to tab 3 and back to tab 1, the WebView has empty page. Usally qmlscene crashes after a while.

import QtQuick 2.0
import QtWebKit 3.0
import Ubuntu.Components 0.1

MainView {
    id: mainView
    width: units.gu(45)
    height: units.gu(80)

    Tabs {
        id: tabs
        anchors.fill: parent
        ItemStyle.class: "new-tabs"
        Tab {
            title: "tab 1"
            autoHideTabBar: false
            page: WebView {
                id: webView
                anchors.fill: parent
                url: "http://www.ubuntu.com"
            }
            ProgressBar {
                anchors.left: parent.left
                anchors.right: parent.right
                anchors.bottom: parent.bottom
                minimumValue: 0
                maximumValue: 100
                value: webView.loadProgress
                visible: value < 100
            }
        }
        Tab {
            title: "tab 2"
            page: Text {
                text: "This is the second tab."
                anchors.margins: units.gu(1)
            }
        }
        Tab {
            title: "tab 3"
            page: Text {
                text: "This is the third tab."
                anchors.margins: units.gu(1)
            }
        }
        Tab {
            title: "tab 4"
            page: Text {
                text: "This is the fourth tab."
                anchors.margins: units.gu(1)
            }
        }
    }
}

Related branches

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
assignee: nobody → Tim Peeters (tpeeters)
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → High
Tim Peeters (tpeeters)
summary: - WebView as a Tab child does not work
+ [tabs] WebView as a Tab child does not work
Changed in ubuntu-ui-toolkit:
importance: High → Critical
summary: - [tabs] WebView as a Tab child does not work
+ [tabs] WebView as a Tab child does not work reliably and sometimes
+ crashes
Revision history for this message
Cris Dywan (kalikiana) wrote :

I've found WebView to be very sensitive to sizing in general. In the attached case, the WebView only shows up if width and height are given explicitly - anchors are not available in a Row.

Revision history for this message
Tim Peeters (tpeeters) wrote :
Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
Revision history for this message
Tim Peeters (tpeeters) wrote :

Note that if you embed the WebView inside a Page { }, then the auto-hiding header will work well together with the WebView contents

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-ui-toolkit at revision 480, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: In Progress → Fix Committed
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (23.9 KiB)

This bug was fixed in the package ubuntu-ui-toolkit - 0.1.46daily13.06.05.1-0ubuntu1

---------------
ubuntu-ui-toolkit (0.1.46daily13.06.05.1-0ubuntu1) saucy; urgency=low

  [ Zoltán Balogh ]
  * update the example app for the latest UI Toolkit.
  * A simple app to check few locales.
  * Add qttools5-dev-tools to build dependencies to provide
    qhelpgenerator for creating QtC help files from documentation.
  * Build documentation and publish the qch file.
  * Offer symlinks for qmlscene via 'qmlrunner' package. See package
    description for usage instructions. (LP: #1155634). (LP: #1155634)

  [ Loïc Molinari ]
  * [UbuntuShape] Correctly stored the current material. (LP: #1132771)
  * [UbuntuShape] Ensured the texture is available in updatePaintNode().
    (LP: #1171437)

  [ Kaleo ]
  * QML_IMPORT_PATH is deprecated for QtQuick 2.0. Switch to
    QML2_IMPORT_PATH.
  * Added syntax description for CHANGES file in CHANGES.syntax.
  * UCScalingImageProvider: respect 'requestedSize' parameter. That
    ensures that the 'sourceSize' property of Image is respected even
    when the toolkit automatically scales the asset for the device. (LP:
    #1130120)
  * Added documentation for bitmap suffixes in the resolution
    independence page. (LP: #1092051)
  * Revamped component showcase now called 'Ubuntu UI Toolkit Gallery'.
    Works on Ubuntu Touch. (LP: #1130603)
  * Benchmarks for time critical components.
  * Added ListItem.ValueSelector example. Fixed incorrect 'Multi value'
    label. (LP: #1172663)
  * Toolkit Gallery: added examples for Sheets.
  * Automatic rotation of applications depending on the device
    orientation. For applications that are using MainView, they opt-in
    by setting 'automaticOrientation' to true. New component
    OrientationHelper for applications that do not use MainView but
    still need an easy way to automatically rotate.
  * UbuntuShape: fix slight distortion of image when set. This
    distortion was quite disturbing when the content has text in it, as
    it is often the case in Popups and Popovers. (LP: #1170878)
  * Use standard animation ubuntu snap beat for popups fade in.
  * Removed unnecessary clipping from Tabs, Popover, Dialog and
    MainView.
  * All ListItems: set default contents right and left margins to 2 gu.
    ListItems Base, Standard and ValueSelector: deprecated private
    properties __leftIconMargin and __rightIconMargin IconVisual
    (private): removed properties leftIconMargin and rightIconMargin
    Standard: removed ugly progression highlight background when there
    is no split.
  * ListItems: constrain size of the icon by default. Deprecated private
    properties __iconWidth and __iconHeight.
  * Ubuntu UI Toolkit Gallery tweaks: - Made window wider and left
    column the width of the phone: 40gu. - Removed 'slider.' from Slider
    example's labels. - Renamed 'Switches' into 'Toggles'. Renamed
    'Progress Bars' into 'Progress and activity'. - Use resolution
    independence for navigation example screenshots.
  * Support source with quotes in .sci files. (LP: #1080719)
  * Reverted unjustified changes to ubuntu-ui-toolkit-gallery.desktop.
  * Popover: simplified com...

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

raring has seen the end of its life and is no longer receiving any updates. Marking the raring task for this ticket as "Won't Fix".

Changed in ubuntu-ui-toolkit (Ubuntu Raring):
status: New → Won't Fix
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.