diff -Nru webbrowser-app-0.23+16.04.20160405/debian/changelog webbrowser-app-0.23+16.04.20160408.1/debian/changelog --- webbrowser-app-0.23+16.04.20160405/debian/changelog 2016-04-12 23:25:27.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/changelog 2016-04-12 23:25:28.000000000 +0000 @@ -1,3 +1,45 @@ +webbrowser-app (0.23+16.04.20160408.1-0ubuntu1) xenial; urgency=medium + + [ CI Train Bot ] + * Resync trunk. + + [ Loïc Molinari ] + * Made AddressBar height scalable with regards to the grid units + system. + + [ Olivier Tilloy ] + * Add dep8 tests and instructions to run them in qemu or on a phone. + Original work by Leo Arias and Vincent Ladeuil. added: debian/tests/ + debian/tests/control debian/tests/touch-session-autopilot + * Catch ESC key event one level up to ensure that it’s not incorrectly + bubbled up to the outer component. (LP: #1557016) + * Customize the contents of the media permission dialog to avoid + truncated text. (LP: #1554220) + * Do not write the session to a temporary file when no target file is + defined. + * Fix a failing unit test with Qt 5.6. (LP: #1565507) + * Fix broken webapp container autopilot tests. (LP: #1557019) + * Fix issues with item selection in the downloads page: do not allow + selecting multiple files when only one is expected do not allow + entering delete mode (with a long press on an item) while in picker + mode (LP: #1534112, #1561575) + * Fix unit tests when run under an sbuild chroot. (LP: #1567294) + * Import QQuickShortcut from Qt 5.5 to properly handle window-level + keyboard shortcuts. We cannot bump the dependency on Qt to 5.5 as + the stable overlay PPA for devices currently has Qt 5.4.1. (LP: + #1542224, #1545802, #1537782) + * Make the autopilot tests more reliable when dragging the bottom + edge. (LP: #1560109) + * Remove workaround for bug #1526940 that was fixed in the latest + release of the UITK. (LP: #1526940) + * Rename debian packages to follow new QML module naming convention. + (LP: #1342031) + * Simplify the implementation of HistoryViewWide quite a bit, and as a + side effect fix a unit test failure when run against the staging + branch of the UITK. (LP: #1567337) + + -- Olivier Tilloy Fri, 08 Apr 2016 17:07:04 +0000 + webbrowser-app (0.23+16.04.20160405-0ubuntu1) xenial; urgency=medium * Add --open-external-url-in-overlay option to allow externals urls diff -Nru webbrowser-app-0.23+16.04.20160405/debian/control webbrowser-app-0.23+16.04.20160408.1/debian/control --- webbrowser-app-0.23+16.04.20160405/debian/control 2016-04-12 23:25:27.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/control 2016-04-12 23:25:28.000000000 +0000 @@ -32,7 +32,7 @@ qtdeclarative5-private-dev, qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3), xvfb, -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Homepage: https://launchpad.net/webbrowser-app # If you aren't a member of ~phablet-team but need to upload packaging changes, # just go ahead. ~phablet-team will notice and sync up the code again. @@ -51,8 +51,8 @@ qml-module-qtquick2 (>= 5.4), qml-module-qtquick-layouts, qml-module-qtquick-window2 (>= 5.3), + qml-module-ubuntu-web (= ${binary:Version}), qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3), - qtdeclarative5-ubuntu-web-plugin (= ${binary:Version}), qtdeclarative5-unity-action-plugin, Replaces: webbrowser-app-assets, qtdeclarative5-ubuntu-ui-extras-browser-plugin (<< 0.22), @@ -73,18 +73,18 @@ libqt5sql5-sqlite, qml-module-qtquick2 (>= 5.4), qml-module-qtquick-window2 (>= 5.3), - qtdeclarative5-accounts-plugin, + qml-module-ubuntu-onlineaccounts, + qml-module-ubuntu-web (= ${binary:Version}), qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3), - qtdeclarative5-ubuntu-web-plugin (= ${binary:Version}), qtdeclarative5-unity-action-plugin, unity-webapps-qml, webbrowser-app (= ${binary:Version}), -Suggests: qtdeclarative5-online-accounts-client0.1 (>= 0.3), +Suggests: qml-module-ubuntu-onlineaccounts-client (>= 0.3), Description: Ubuntu web applications container A lightweight webapp container tailored for Ubuntu, based on the Oxide browser engine and using the Ubuntu UI components. -Package: qtdeclarative5-ubuntu-ui-extras-browser-plugin +Package: qml-module-ubuntu-ui-extras-browser Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} @@ -93,14 +93,23 @@ qml-module-qtquick2 (>= 5.4), qml-module-qtquick-window2 (>= 5.3), qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3), - qtdeclarative5-ubuntu-web-plugin (= ${binary:Version}), -Replaces: webbrowser-app (<< 0.21) -Breaks: webbrowser-app (<< 0.21) -Description: Ubuntu web QML plugin - A standalone QML plugin that contains the UbuntuWebView component - , in the Ubuntu.Components.Extras.Browser module. + qml-module-ubuntu-web (= ${binary:Version}), +Replaces: webbrowser-app (<< 0.21), qtdeclarative5-ubuntu-ui-extras-browser-plugin (<< ${source:Version}) +Breaks: webbrowser-app (<< 0.21), qtdeclarative5-ubuntu-ui-extras-browser-plugin (<< ${source:Version}) +Description: Ubuntu web QML module + A standalone QML module that contains the UbuntuWebView component + , in the Ubuntu.Components.Extras.Browser namespace. -Package: qtdeclarative5-ubuntu-web-plugin +Package: qtdeclarative5-ubuntu-ui-extras-browser-plugin +Architecture: any +Multi-Arch: same +Section: oldlibs +Depends: qml-module-ubuntu-ui-extras-browser, ${misc:Depends} +Description: transitional dummy package for the Ubuntu web QML module + A standalone QML module that contains the UbuntuWebView component + , in the Ubuntu.Components.Extras.Browser namespace. + +Package: qml-module-ubuntu-web Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} @@ -110,18 +119,41 @@ qml-module-qtquick2 (>= 5.4), qml-module-qtquick-window2 (>= 5.3), qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3), -Description: Ubuntu web QML plugin - A standalone QML plugin that contains the WebView component, - in the Ubuntu.Web module. +Breaks: qtdeclarative5-ubuntu-web-plugin (<< ${source:Version}) +Replaces: qtdeclarative5-ubuntu-web-plugin (<< ${source:Version}) +Description: Ubuntu web QML module + A standalone QML module that contains the WebView component, + in the Ubuntu.Web namespace. -Package: qtdeclarative5-ubuntu-web-plugin-doc +Package: qtdeclarative5-ubuntu-web-plugin +Architecture: any +Multi-Arch: same +Section: oldlibs +Depends: qml-module-ubuntu-web, ${misc:Depends} +Description: transitional dummy package for the Ubuntu web QML module + A standalone QML module that contains the WebView component, + in the Ubuntu.Web namespace. + +Package: qml-module-ubuntu-web-doc Section: doc Architecture: all Multi-Arch: foreign -Depends: ${misc:Depends}, -Description: Ubuntu web QML plugin HTML documentation - A standalone QML plugin that contains the WebView component, - in the Ubuntu.Web module. This package contains the public +Depends: ${misc:Depends} +Breaks: qtdeclarative5-ubuntu-web-plugin-doc (<< ${source:Version}) +Replaces: qtdeclarative5-ubuntu-web-plugin-doc (<< ${source:Version}) +Description: Ubuntu web QML module HTML documentation + A standalone QML module that contains the WebView component, + in the Ubuntu.Web namespace. This package contains the public + HTML documentation. + +Package: qtdeclarative5-ubuntu-web-plugin-doc +Section: oldlibs +Architecture: all +Multi-Arch: foreign +Depends: qml-module-ubuntu-web-doc, ${misc:Depends} +Description: transitional dummy package for the Ubuntu web QML module HTML documentation + A standalone QML module that contains the WebView component, + in the Ubuntu.Web namespace. This package contains the public HTML documentation. Package: webbrowser-app-autopilot diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-ui-extras-browser.install webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-ui-extras-browser.install --- webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-ui-extras-browser.install 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-ui-extras-browser.install 2016-04-12 23:25:28.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/qt5/qml/Ubuntu/Components/Extras/Browser/* diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-ui-extras-browser.lintian-overrides webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-ui-extras-browser.lintian-overrides --- webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-ui-extras-browser.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-ui-extras-browser.lintian-overrides 2016-04-12 23:25:28.000000000 +0000 @@ -0,0 +1,3 @@ +qml-module-ubuntu-ui-extras-browser: pkg-has-shlibs-control-file-but-no-actual-shared-libs +qml-module-ubuntu-ui-extras-browser: postinst-has-useless-call-to-ldconfig +qml-module-ubuntu-ui-extras-browser: postrm-has-useless-call-to-ldconfig diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-web-doc.install webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-web-doc.install --- webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-web-doc.install 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-web-doc.install 2016-04-12 23:25:28.000000000 +0000 @@ -0,0 +1 @@ +usr/share/doc/ubuntu-web diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-web.install webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-web.install --- webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-web.install 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-web.install 2016-04-12 23:25:28.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/qt5/qml/Ubuntu/Web/* diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-web.lintian-overrides webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-web.lintian-overrides --- webbrowser-app-0.23+16.04.20160405/debian/qml-module-ubuntu-web.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qml-module-ubuntu-web.lintian-overrides 2016-04-12 23:25:28.000000000 +0000 @@ -0,0 +1,3 @@ +qml-module-ubuntu-web: pkg-has-shlibs-control-file-but-no-actual-shared-libs +qml-module-ubuntu-web: postinst-has-useless-call-to-ldconfig +qml-module-ubuntu-web: postrm-has-useless-call-to-ldconfig diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-ui-extras-browser-plugin.install webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-ui-extras-browser-plugin.install --- webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-ui-extras-browser-plugin.install 2016-04-12 23:25:27.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-ui-extras-browser-plugin.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/qt5/qml/Ubuntu/Components/Extras/Browser/* diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-ui-extras-browser-plugin.lintian-overrides webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-ui-extras-browser-plugin.lintian-overrides --- webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-ui-extras-browser-plugin.lintian-overrides 2016-04-12 23:25:27.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-ui-extras-browser-plugin.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -qtdeclarative5-ubuntu-ui-extras-browser-plugin: pkg-has-shlibs-control-file-but-no-actual-shared-libs -qtdeclarative5-ubuntu-ui-extras-browser-plugin: postinst-has-useless-call-to-ldconfig -qtdeclarative5-ubuntu-ui-extras-browser-plugin: postrm-has-useless-call-to-ldconfig diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-web-plugin-doc.install webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-web-plugin-doc.install --- webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-web-plugin-doc.install 2016-04-12 23:25:27.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-web-plugin-doc.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/share/doc/ubuntu-web diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-web-plugin.install webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-web-plugin.install --- webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-web-plugin.install 2016-04-12 23:25:27.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-web-plugin.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/qt5/qml/Ubuntu/Web/* diff -Nru webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-web-plugin.lintian-overrides webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-web-plugin.lintian-overrides --- webbrowser-app-0.23+16.04.20160405/debian/qtdeclarative5-ubuntu-web-plugin.lintian-overrides 2016-04-12 23:25:27.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/qtdeclarative5-ubuntu-web-plugin.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -qtdeclarative5-ubuntu-web-plugin: pkg-has-shlibs-control-file-but-no-actual-shared-libs -qtdeclarative5-ubuntu-web-plugin: postinst-has-useless-call-to-ldconfig -qtdeclarative5-ubuntu-web-plugin: postrm-has-useless-call-to-ldconfig diff -Nru webbrowser-app-0.23+16.04.20160405/debian/rules webbrowser-app-0.23+16.04.20160408.1/debian/rules --- webbrowser-app-0.23+16.04.20160405/debian/rules 2016-04-12 23:25:27.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/rules 2016-04-12 23:25:28.000000000 +0000 @@ -7,6 +7,8 @@ export DEB_BUILD_HARDENING=1 export DPKG_GENSYMBOLS_CHECK_LEVEL=4 +BUILDHOME=/tmp/home + %: dh $@ --parallel --with translations @@ -32,3 +34,12 @@ # Unfortunately, the default build directory is not exposed # (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=601774). $(MAKE) -C obj-$(DEB_HOST_GNU_TYPE) webbrowser-app.pot + +override_dh_clean: + dh_clean + rm -rf $(BUILDHOME) + +override_dh_auto_test: + mkdir -p $(BUILDHOME) + HOME=$(BUILDHOME) dh_auto_test + diff -Nru webbrowser-app-0.23+16.04.20160405/debian/tests/control webbrowser-app-0.23+16.04.20160408.1/debian/tests/control --- webbrowser-app-0.23+16.04.20160405/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/tests/control 2016-04-12 23:25:28.000000000 +0000 @@ -0,0 +1,26 @@ +# Copyright 2015 Canonical +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 3, as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# autopkgtest is a test dependency so we don't need to copy +# ubuntu-touch-session to the testbed but can use it from autopkgtest instead + +Test-Command: debian/tests/touch-session-autopilot webbrowser_app +Restrictions: allow-stderr +Classes: ubuntu-touch +Depends: webbrowser-app-autopilot, autopkgtest, python3-evdev + +Test-Command: debian/tests/touch-session-autopilot webapp_container +Restrictions: allow-stderr +Classes: ubuntu-touch +Depends: webapp-container-autopilot, autopkgtest, python3-evdev diff -Nru webbrowser-app-0.23+16.04.20160405/debian/tests/touch-session-autopilot webbrowser-app-0.23+16.04.20160408.1/debian/tests/touch-session-autopilot --- webbrowser-app-0.23+16.04.20160405/debian/tests/touch-session-autopilot 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/debian/tests/touch-session-autopilot 2016-04-12 23:25:28.000000000 +0000 @@ -0,0 +1,35 @@ +#!/bin/sh + +# Copyright 2015 Canonical +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 3, as published +# by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# This runs the $1 autopilot suite ensuring that the testbed is configured +# properly + +SUITE=$1 + +set -e + +if ! pgrep -f unity-system-compositor ; then + # We're not using Mir, setup enough of an X stack + + # FIXME: We won't need an X stack once Mir provides mirvfb or any other + # mean to test consistently on all platforms -- vila 2015-04-22 + sudo -A ADT_NORMAL_USER=${USER} sh -e /usr/share/autopkgtest/setup-commands/ubuntu-touch-session + # Import the environment produced above in the current shell + set -a + . /etc/environment +fi + +autopilot3 run -v -f subunit -o ${ADT_ARTIFACTS} ${SUITE} diff -Nru webbrowser-app-0.23+16.04.20160405/po/sr.po webbrowser-app-0.23+16.04.20160408.1/po/sr.po --- webbrowser-app-0.23+16.04.20160405/po/sr.po 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/po/sr.po 2016-04-08 17:05:30.000000000 +0000 @@ -2,26 +2,27 @@ # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the webbrowser-app package. # FIRST AUTHOR , 2013. -# +# Мирослав Николић , 2016. msgid "" msgstr "" "Project-Id-Version: webbrowser-app\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2016-02-25 21:16+0100\n" -"PO-Revision-Date: 2016-01-21 22:24+0000\n" -"Last-Translator: Bojan Bogdanović \n" -"Language-Team: Serbian \n" +"PO-Revision-Date: 2016-04-05 07:29+0000\n" +"Last-Translator: Мирослав Николић \n" +"Language-Team: Serbian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && " "n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -"X-Launchpad-Export-Date: 2016-03-26 05:41+0000\n" -"X-Generator: Launchpad (build 17967)\n" +"X-Launchpad-Export-Date: 2016-04-07 05:55+0000\n" +"X-Generator: Launchpad (build 17972)\n" +"Language: sr\n" #: src/app/AlertDialog.qml:23 msgid "JavaScript Alert" -msgstr "JavaScript обавештење" +msgstr "Обавештење скрипте Јаве" #: src/app/AlertDialog.qml:26 src/app/AuthenticationDialog.qml:47 #: src/app/ConfirmDialog.qml:26 src/app/HttpAuthenticationDialog.qml:59 @@ -32,13 +33,13 @@ #: src/app/AuthenticationDialog.qml:24 src/app/HttpAuthenticationDialog.qml:25 msgid "Authentication required." -msgstr "Обавезна је аутентификација." +msgstr "Потребно је потврђивање идентитета." #. TRANSLATORS: %1 refers to the URL of the current website #: src/app/AuthenticationDialog.qml:26 #, qt-format msgid "The website %1 requires authentication." -msgstr "Веб страница на %1 захтева аутентификацију." +msgstr "Веб страница „%1“ захтева потврду идентитета." #: src/app/AuthenticationDialog.qml:34 src/app/HttpAuthenticationDialog.qml:39 msgid "Username" @@ -66,7 +67,7 @@ #: src/app/BeforeUnloadDialog.qml:23 msgid "Confirm Navigation" -msgstr "Потврда навигације" +msgstr "Потврди навигацију" #: src/app/BeforeUnloadDialog.qml:26 msgid "Leave" @@ -87,8 +88,8 @@ "You are trying to securely reach %1, but the security certificate of this " "website is not trusted." msgstr "" -"Покушавате да безбедно дођете до %1, али сертификат ове веб странице није од " -"поверења." +"Покушавате безбедно да приступите „%1“, али безбедносно уверење ове веб " +"странице није поверљиво." #: src/app/CertificateVerificationDialog.qml:29 #: src/app/InvalidCertificateErrorSheet.qml:160 @@ -102,7 +103,7 @@ #: src/app/ConfirmDialog.qml:23 msgid "JavaScript Confirmation" -msgstr "ЈаваСкрипт потврда" +msgstr "Потврда скрипте Јаве" #: src/app/ErrorSheet.qml:36 msgid "Network Error" @@ -112,12 +113,11 @@ #: src/app/ErrorSheet.qml:42 #, qt-format msgid "It appears you are having trouble viewing: %1." -msgstr "Изгледа да имате проблема гледајући: %1." +msgstr "Изгледа да имате проблема са прегледањем: %1." #: src/app/ErrorSheet.qml:48 msgid "Please check your network settings and try refreshing the page." -msgstr "" -"Молимо да проверите подешавање мреже и покушајте са освежавањем странице." +msgstr "Проверите подешавање мреже и покушајте да освежите страницу." #: src/app/ErrorSheet.qml:53 msgid "Refresh page" @@ -125,11 +125,11 @@ #: src/app/GeolocationPermissionRequest.qml:28 msgid "Permission Request" -msgstr "Захтев за овлашћење" +msgstr "Захтев за дозволе" #: src/app/GeolocationPermissionRequest.qml:29 msgid "This page wants to know your device’s location." -msgstr "Ова страница жели да зна положај вашег уређаја." +msgstr "Ова страница жели да зна место вашег уређаја." #: src/app/GeolocationPermissionRequest.qml:33 msgid "Deny" @@ -141,7 +141,7 @@ #: src/app/InvalidCertificateErrorSheet.qml:55 msgid "This site security certificate is not trusted.\n" -msgstr "Потврда безбедности ове странице није од поверења.\n" +msgstr "Безбедносно уверење ове странице није од поверења.\n" #: src/app/InvalidCertificateErrorSheet.qml:63 msgid "Learn more" @@ -232,8 +232,8 @@ "You should not proceed, especially if you have never seen this warning " "before for this site." msgstr "" -"Не препоручује се да наставите, нарочито ако никад раније нисте видели ово " -"упозорење за ову страницу." +"Не препоручује вам се да наставите, нарочито ако никад раније нисте видели " +"ово упозорење за ову страницу." #. TRANSLATORS: %1 refers to the domain name of the SSL certificate #: src/app/InvalidCertificateErrorSheet.qml:187 @@ -242,8 +242,8 @@ "You attempted to reach %1 but the server presented a security certificate " "which does not match the identity of the site." msgstr "" -"Покушали сте да приступите %1 али је сервер понудио потврду безбедности која " -"се не поклапа са идентитетом странице." +"Покушали сте да приступите на „%1“ али је сервер приказао безбедносно " +"уверење које се не поклапа са идентитетом странице." #. TRANSLATORS: %1 refers to the domain name of the SSL certificate #: src/app/InvalidCertificateErrorSheet.qml:190 @@ -252,8 +252,8 @@ "You attempted to reach %1 but the server presented a security certificate " "which has expired." msgstr "" -"Покушали сте да приступите %1 али је сервер понудио потврду безбедности која " -"је истекла." +"Покушали сте да приступите на „%1“ али је сервер приказао безбедносно " +"уверење које је истекло." #. TRANSLATORS: %1 refers to the domain name of the SSL certificate #: src/app/InvalidCertificateErrorSheet.qml:193 @@ -262,8 +262,8 @@ "You attempted to reach %1 but the server presented a security certificate " "which contains invalid dates." msgstr "" -"Покушали сте да приступите %1 али је сервер понудио потврду безбедности која " -"садржи неисправне датуме." +"Покушали сте да приступите „%1“ али је сервер приказао безбедносно уверење " +"које садржи неисправне датуме." #. TRANSLATORS: %1 refers to the domain name of the SSL certificate #: src/app/InvalidCertificateErrorSheet.qml:196 @@ -272,8 +272,8 @@ "You attempted to reach %1 but the server presented a security certificate " "issued by an entity that is not trusted." msgstr "" -"Покушали сте да приступите %1 али је сервер понудио потврду безбедности која " -"је издата од стране организације која није од поверења." +"Покушали сте да приступите „%1“ али је сервер приказао безбедносно уверење " +"које је издато од стране организације која није од поверења." #. TRANSLATORS: %1 refers to the domain name of the SSL certificate #: src/app/InvalidCertificateErrorSheet.qml:199 @@ -282,8 +282,8 @@ "You attempted to reach %1 but the server presented a security certificate " "that has been revoked." msgstr "" -"Покушали сте да приступите %1 али је сервер понудио потврду безбедности која " -"је повучена." +"Покушали сте да приступите „%1“ али је сервер приказао безбедносно уверење " +"које је повучено." #. TRANSLATORS: %1 refers to the domain name of the SSL certificate #: src/app/InvalidCertificateErrorSheet.qml:202 @@ -292,8 +292,8 @@ "You attempted to reach %1 but the server presented an invalid security " "certificate." msgstr "" -"Покушали сте да приступите %1 али је сервер понудио неисправну потврду " -"безбедности." +"Покушали сте да приступите „%1“ али је сервер приказао неисправно " +"безбедносно уверење." #. TRANSLATORS: %1 refers to the domain name of the SSL certificate #: src/app/InvalidCertificateErrorSheet.qml:205 @@ -302,8 +302,8 @@ "You attempted to reach %1 but the server presented an insecure security " "certificate." msgstr "" -"Покушали сте да приступите %1 али је сервер понудио небезбедну потврду " -"безбедности." +"Покушали сте да приступите „%1“ али је сервер приказао безбедносно уверење " +"које није безбедно." #. TRANSLATORS: %1 refers to the domain name of the SSL certificate #: src/app/InvalidCertificateErrorSheet.qml:208 @@ -313,23 +313,23 @@ "You attempted to reach %1 but the server presented a security certificate " "which failed our security checks for an unknown reason." msgstr "" -"Безбедносна потврда ове странице није од поверења\n" -"Покушали сте да приступите %1 али је сервер понудио потврду безбедности која " -"није прошла наше безбедносне провере из непознатих разлога." +"Безбедносно уверење ове странице није од поверења\n" +"Покушали сте да приступите „%1“ али је сервер приказао безбедносно уверење " +"које није прошло наше безбедносне провере из непознатих разлога." #: src/app/PromptDialog.qml:23 msgid "JavaScript Prompt" -msgstr "Јаваскрипт питање" +msgstr "Питање скрипте Јаве" #: src/app/ProxyAuthenticationDialog.qml:22 msgid "Proxy authentication required." -msgstr "Посредник захтева аутентификацију." +msgstr "Посредник захтева потврду идентитета." #. TRANSLATORS: %1 refers to the proxy address, %2 refers to the proxy port #: src/app/ProxyAuthenticationDialog.qml:24 #, qt-format msgid "The website %1:%2 requires authentication." -msgstr "Веб страница %1:%2 захтева аутентификацију." +msgstr "Веб страница „%1:%2“ захтева потврду идентитета." #: src/app/actions/Back.qml:23 msgid "Back" @@ -339,7 +339,7 @@ #. Keywords may actually be sentences, and must be separated by semi-colons. #: src/app/actions/Back.qml:26 msgid "Older Page" -msgstr "Старија страна" +msgstr "Старија страница" #: src/app/actions/Bookmark.qml:23 msgid "Bookmark" @@ -349,7 +349,7 @@ #. Keywords may actually be sentences, and must be separated by semi-colons. #: src/app/actions/Bookmark.qml:26 msgid "Add This Page to Bookmarks" -msgstr "Додај ову страницу међу обележиваче" +msgstr "Додајте ову страницу међу обележиваче" #: src/app/actions/BookmarkLink.qml:22 msgid "Bookmark link" @@ -383,27 +383,27 @@ #: src/app/actions/Erase.qml:22 msgid "Erase" -msgstr "Обришите" +msgstr "Обриши" #: src/app/actions/FindInPage.qml:23 src/app/webbrowser/Browser.qml:552 msgid "Find in page" -msgstr "Пронађи на страни" +msgstr "Пронађи на страници" #. TRANSLATORS: This is a free-form list of keywords associated to the 'Find in Page' action. #. Keywords may actually be sentences, and must be separated by semi-colons. #: src/app/actions/FindInPage.qml:26 msgid "Search in Page" -msgstr "Претражи страницу" +msgstr "Тражи на страници" #: src/app/actions/Forward.qml:23 msgid "Forward" -msgstr "вија" +msgstr "Напред" #. TRANSLATORS: This is a free-form list of keywords associated to the 'Forward' action. #. Keywords may actually be sentences, and must be separated by semi-colons. #: src/app/actions/Forward.qml:26 msgid "Newer Page" -msgstr "Новија страна" +msgstr "Новија страница" #: src/app/actions/GoTo.qml:23 msgid "Goto" @@ -413,7 +413,7 @@ #. Keywords may actually be sentences, and must be separated by semi-colons. #: src/app/actions/GoTo.qml:26 msgid "Address;URL;www" -msgstr "Адреса;УРЛ;веб" +msgstr "адреса;УРЛ;веб" #: src/app/actions/NewTab.qml:23 src/app/webbrowser/Browser.qml:435 #: src/app/webbrowser/TabsBar.qml:91 @@ -424,7 +424,7 @@ #. Keywords may actually be sentences, and must be separated by semi-colons. #: src/app/actions/NewTab.qml:26 msgid "Open a New Tab" -msgstr "Отвори нови лист" +msgstr "Отворите нови лист" #: src/app/actions/OpenImageInNewTab.qml:22 msgid "Open image in new tab" @@ -440,11 +440,11 @@ #: src/app/actions/OpenVideoInNewTab.qml:22 msgid "Open video in new tab" -msgstr "Отвори видео у новом језичку" +msgstr "Отвори видео у новом листу" #: src/app/actions/Paste.qml:22 msgid "Paste" -msgstr "Налепи" +msgstr "Убаци" #: src/app/actions/Redo.qml:22 msgid "Redo" @@ -495,11 +495,11 @@ #: src/app/webbrowser/AddressBar.qml:246 msgid "find in page" -msgstr "пронађи на страни" +msgstr "нађи на страници" #: src/app/webbrowser/AddressBar.qml:247 msgid "search or enter an address" -msgstr "тражи или унеси адресу" +msgstr "тражите или унесите адресу" #: src/app/webbrowser/BookmarkOptions.qml:48 msgid "Bookmark Added" @@ -528,7 +528,7 @@ #: src/app/webbrowser/BookmarkOptions.qml:115 msgid "Create new folder" -msgstr "Креирај нову фасциклу" +msgstr "Направи нову фасциклу" #: src/app/webbrowser/BookmarkOptions.qml:153 #: src/app/webbrowser/SettingsPage.qml:339 @@ -540,7 +540,7 @@ #: src/app/webbrowser/NewTabView.qml:258 src/app/webbrowser/SettingsPage.qml:91 #: src/app/webbrowser/SettingsPage.qml:303 msgid "Homepage" -msgstr "Почетна страна" +msgstr "Матична страница" #: src/app/webbrowser/BookmarksView.qml:81 #: src/app/webbrowser/BookmarksViewWide.qml:80 @@ -567,7 +567,7 @@ #: src/app/webbrowser/Browser.qml:546 #: src/app/webbrowser/HistoryViewWide.qml:381 msgid "History" -msgstr "Историја" +msgstr "Историјат" #: src/app/webbrowser/Browser.qml:559 src/app/webbrowser/DownloadsPage.qml:57 msgid "Downloads" @@ -597,14 +597,14 @@ #: src/app/webbrowser/Browser.qml:1346 msgid "Press ESC To Exit Full Screen" -msgstr "Притисните ЕСЦ да напустите пуни екран" +msgstr "Притисните „ЕСЦ“ да напустите пуни екран" #: src/app/webbrowser/ContentDownloadDialog.qml:82 msgid "" "Choose an application to open this file or add it to the downloads folder." msgstr "" -"Изаберите програм да отворите овај тип датотеке или је додајте у фасциклу " -"Преузми." +"Изаберите програм за отварање ове врсте датотеке или је додајте у фасциклу " +"преузимања." #: src/app/webbrowser/ContentDownloadDialog.qml:88 msgid "Choose an application" @@ -660,7 +660,7 @@ #: src/app/webbrowser/HistoryViewWide.qml:196 msgid "All History" -msgstr "Комплетна историја" +msgstr "Сав историјат" #: src/app/webbrowser/HistoryViewWide.qml:210 #: src/app/webbrowser/HistoryViewWide.qml:295 @@ -669,23 +669,23 @@ #: src/app/webbrowser/HistoryViewWide.qml:462 msgid "search history" -msgstr "историја претраге" +msgstr "историјат претраге" #: src/app/webbrowser/LeavePrivateModeDialog.qml:24 msgid "Going to public mode will close all private tabs" -msgstr "Прелазак на јавни режим ће затворити све приватне листове" +msgstr "Прелазак на јавни режим затвориће све приватне листове" #: src/app/webbrowser/MediaAccessDialog.qml:28 msgid "Allow this domain to access your camera and microphone?" -msgstr "Дозволи овој веб страници приступ вашој камери и микрофону?" +msgstr "Да дозволим овој веб страници да приступи вашој камери и микрофону?" #: src/app/webbrowser/MediaAccessDialog.qml:29 msgid "Allow this domain to access your camera?" -msgstr "Дозволи овој веб страници приступ вашој камери?" +msgstr "Да дозволим овој веб страници да приступи вашој камери?" #: src/app/webbrowser/MediaAccessDialog.qml:30 msgid "Allow this domain to access your microphone?" -msgstr "Дозволи овој веб страници приступ вашем микрофону?" +msgstr "Да дозволим овој веб страници да приступи вашем микрофону?" #. TRANSLATORS: %1 is the URL of the site requesting access to camera and/or microphone and %2 is the URL of the site that embeds it #: src/app/webbrowser/MediaAccessDialog.qml:39 @@ -710,12 +710,13 @@ "Pages that you view in this tab won't appear in your browser history.\n" "Bookmarks you create will be preserved, however." msgstr "" -"Стране које посетите у овом листу неће се појавити у историји претраживача.\n" -"Међутим, обележивачи које креирате биће сачувани." +"Странице које посетите у овом листу неће се појавити у историјату " +"прегледника.\n" +"Међутим, обележивачи које направите биће сачувани." #: src/app/webbrowser/NewTabView.qml:148 msgid "More" -msgstr "Више" +msgstr "Још" #: src/app/webbrowser/NewTabView.qml:335 #: src/app/webbrowser/NewTabViewWide.qml:138 @@ -724,25 +725,25 @@ #: src/app/webbrowser/NewTabView.qml:366 msgid "You haven't visited any site yet" -msgstr "Нисте посетили ни једну старницу до сада" +msgstr "До сада нисте посетили ни једну страницу" #: src/app/webbrowser/SadTab.qml:48 msgid "The rendering process has been closed for this tab." -msgstr "Процес рендеровања је затворен за овај лист." +msgstr "Процес исцртавања је затворен за овај лист." #. TRANSLATORS: %1 is the URL of the page that crashed the renderer process #: src/app/webbrowser/SadTab.qml:65 #, qt-format msgid "Something went wrong while displaying %1." -msgstr "Нешто је пошло лоше при приказивању %1." +msgstr "Нешто је пошло наопако приликом приказивања „%1“." #: src/app/webbrowser/SadTab.qml:67 msgid "" "The system is low on memory and can't display this webpage. Try closing " "unneeded tabs and reloading." msgstr "" -"Систем је на минимуму меморије и не може приказати ову страницу. Покушајте " -"да затворите непотребне листове и освежите станицу." +"Систему недостаје меморије и не може приказати ову страницу. Покушајте да " +"затворите непотребне листове и освежите станицу." #: src/app/webbrowser/SadTab.qml:80 msgid "Close tab" @@ -750,49 +751,48 @@ #: src/app/webbrowser/SecurityCertificatePopover.qml:69 msgid "This site has insecure content" -msgstr "Ова страница има небезбедног садржаја" +msgstr "Ова страница има садржај који није безбедан" #: src/app/webbrowser/SecurityCertificatePopover.qml:70 msgid "Identity Not Verified" -msgstr "Идентитет није верификован" +msgstr "Идентитет није проверен" #: src/app/webbrowser/SecurityCertificatePopover.qml:78 msgid "The identity of this website has not been verified." -msgstr "Идентитет овог веб сајта није верификован." +msgstr "Идентитет овог веб сајта није проверен." #: src/app/webbrowser/SecurityCertificatePopover.qml:89 msgid "Server certificate does not match the identity of the site." -msgstr "Сертификат сервера се не поклапа са идентитетом странице." +msgstr "Уверење сервера се не поклапа са идентитетом странице." #: src/app/webbrowser/SecurityCertificatePopover.qml:91 msgid "Server certificate has expired." -msgstr "Сртификат сервера је истекао." +msgstr "Уверење сервера је истекло." #: src/app/webbrowser/SecurityCertificatePopover.qml:93 msgid "Server certificate contains invalid dates." -msgstr "Сертификат сервера садржи неисправне датуме." +msgstr "Уверење сервера садржи неисправне датуме." #: src/app/webbrowser/SecurityCertificatePopover.qml:95 msgid "Server certificate is issued by an entity that is not trusted." -msgstr "Сертификат сервера је издат од стране којој се не може веровати." +msgstr "Уверење сервера је издато од стране којој се не може веровати." #: src/app/webbrowser/SecurityCertificatePopover.qml:97 msgid "Server certificate has been revoked." -msgstr "Сертификат сервера је опозван." +msgstr "Уверење сервера је опозвано." #: src/app/webbrowser/SecurityCertificatePopover.qml:99 msgid "Server certificate is invalid." -msgstr "Сертификат сервера није валидан." +msgstr "Уверење сервера није исправно." #: src/app/webbrowser/SecurityCertificatePopover.qml:101 msgid "Server certificate is insecure." -msgstr "Сертификат сервера не несигуран." +msgstr "Уверење сервера није безбедно." #: src/app/webbrowser/SecurityCertificatePopover.qml:103 msgid "Server certificate failed our security checks for an unknown reason." msgstr "" -"Сертификат сервера је није прошао наше сигурносне провере из непознатог " -"разлога." +"Уверење сервера није прошао наше безбедносне провере из непознатог разлога." #: src/app/webbrowser/SecurityCertificatePopover.qml:126 msgid "You are connected to" @@ -800,7 +800,7 @@ #: src/app/webbrowser/SecurityCertificatePopover.qml:148 msgid "Which is run by" -msgstr "За који је задужен" +msgstr "Кога покреће" #: src/app/webbrowser/SettingsDeviceSelector.qml:43 msgid "Default" @@ -809,7 +809,7 @@ #: src/app/webbrowser/SettingsPage.qml:80 #: src/app/webbrowser/SettingsPage.qml:156 msgid "Search engine" -msgstr "Претраживач" +msgstr "Погон претраге" #: src/app/webbrowser/SettingsPage.qml:100 msgid "Restore previous session at startup" @@ -822,7 +822,7 @@ #: src/app/webbrowser/SettingsPage.qml:126 msgid "Reset browser settings" -msgstr "Враћање прегледача на почетна подешавања" +msgstr "Враћање подешавања прегледача" #: src/app/webbrowser/SettingsPage.qml:229 #: src/app/webbrowser/SettingsPage.qml:367 @@ -831,19 +831,19 @@ #: src/app/webbrowser/SettingsPage.qml:235 msgid "Clear Browsing History" -msgstr "Обриши историју претраге" +msgstr "Обриши историјат претраге" #: src/app/webbrowser/SettingsPage.qml:238 msgid "Clear Browsing History?" -msgstr "Обриши историју претраге?" +msgstr "Да обришем историјат претраге?" #: src/app/webbrowser/SettingsPage.qml:245 msgid "Clear Cache" -msgstr "Очисти кеш" +msgstr "Очисти оставу" #: src/app/webbrowser/SettingsPage.qml:247 msgid "Clear Cache?" -msgstr "Очисти кеш?" +msgstr "Да очистим оставу?" #: src/app/webbrowser/SettingsPage.qml:282 msgid "Clear" @@ -859,7 +859,7 @@ #: src/app/webbrowser/TabPreview.qml:86 msgid "Tap to view" -msgstr "Тапни да погледаш" +msgstr "Лупните за преглед" #: src/app/webbrowser/TabsBar.qml:102 msgid "Close Tab" @@ -874,19 +874,19 @@ #: src/app/webcontainer/webapp-container.qml:67 #, qt-format msgid "%1 - Ubuntu Web Browser" -msgstr "%1 — Убунту Прегледач веба" +msgstr "%1 — Убунтуов прегледник веба" #: src/app/webbrowser/webbrowser-app.qml:37 #: src/app/webcontainer/webapp-container.qml:69 msgid "Ubuntu Web Browser" -msgstr "Убунту Прегледач веба" +msgstr "Убунтуов прегледник веба" #: src/app/webcontainer/AccountChooserDialog.qml:62 msgid "" "No accounts have been linked to this webapp; press the item below to add an " "account." msgstr "" -"Ни један налог није повезан за ову веб апликацију; притисните ставку испод " +"Ни један налог није повезан са овом веб апликацијом; притисните ставку испод " "да додате налог." #: src/app/webcontainer/AccountChooserDialog.qml:78 @@ -895,7 +895,7 @@ #: src/app/webcontainer/AccountChooserDialog.qml:87 msgid "Don't use an account" -msgstr "Немојте користити налог" +msgstr "Немој користити налог" #: src/app/webcontainer/AccountErrorScreen.qml:39 msgid "Account error" @@ -910,15 +910,14 @@ "Account window could not be opened. You can only create one account at a " "time; please try again after closing all other account windows." msgstr "" -"Прозор налога не може бити отворен. Можете креирати само један налог у исто " -"време; молимо да покушате поново када затворите све друге прозоре са " -"налозима." +"Прозор налога не може бити отворен. Можете направити само један налог " +"одједном; покушајте поново када затворите све друге прозоре са налозима." #. TRANSLATORS: %1 refers to the application name, %2 refers to the account provider #: src/app/webcontainer/AccountsSplashScreen.qml:45 #, qt-format msgid "%1 needs to access your %2 online account." -msgstr "%1 мора да приступи вашем %2 налогу." +msgstr "%1 треба да приступи вашем %2 налогу." #. TRANSLATORS: %1 refers to the application name, %2 refers to the account provider #: src/app/webcontainer/AccountsSplashScreen.qml:55 @@ -930,7 +929,7 @@ msgid "" "Choose an account now, or skip this step and choose an online account later." msgstr "" -"Изаберите сада налог, или прескочите овај корак и изаберите налог касније." +"Сада изаберите налог, или прескочите овај корак и касније изаберите налог." #: src/app/webcontainer/AccountsSplashScreen.qml:77 msgid "Close the app" @@ -942,7 +941,7 @@ #: src/app/webcontainer/AccountsSplashScreen.qml:84 msgid "Choose account" -msgstr "Изаберите налог" +msgstr "Изабери налог" #: src/app/webcontainer/SadPage.qml:45 msgid "Oops, something went wrong." @@ -950,11 +949,11 @@ #: po/src/app/webbrowser/webbrowser-app.desktop.in.in.h:1 msgid "Browser" -msgstr "Прегледач" +msgstr "Прегледник" #: po/src/app/webbrowser/webbrowser-app.desktop.in.in.h:2 msgid "Web Browser" -msgstr "Прегледач веба" +msgstr "Прегледник веба" #: po/src/app/webbrowser/webbrowser-app.desktop.in.in.h:3 msgid "Browse the World Wide Web" @@ -962,7 +961,7 @@ #: po/src/app/webbrowser/webbrowser-app.desktop.in.in.h:4 msgid "Internet;WWW;Browser;Web;Explorer" -msgstr "Интернет;WWW;Прегледач;Веб;Претраживач" +msgstr "интернет;прегледник;веб;претраживач;WWW" #~ msgid "" #~ "Ubuntu suggests you check your network settings and try refreshing the page." diff -Nru webbrowser-app-0.23+16.04.20160405/README webbrowser-app-0.23+16.04.20160408.1/README --- webbrowser-app-0.23+16.04.20160405/README 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/README 2016-04-08 17:06:03.000000000 +0000 @@ -44,7 +44,8 @@ = Automated UI tests = webbrowser-app uses autopilot (https://launchpad.net/autopilot) to test its UI. -To run the tests, you will need to install python3-autopilot and autopilot-qt5. +To run the tests locally, you will need to install python3-autopilot and +autopilot-qt5. Then do the following: $ cd tests/autopilot/ @@ -54,6 +55,9 @@ $ autopilot3 list webbrowser_app +In order to run the tests in a virtual machine with an environment closer to +what a user will get in Ubuntu Touch, see the Dep8 tests section. + = Code coverage = @@ -69,6 +73,56 @@ interactive human-readable report in HTML format (coveragereport/index.html). += Dep8 tests = + +Dep8 tests exercise the package "as-installed". + +Currently, the webbrowser-app has one suite of dep8 tests that uses autopilot +(https://launchpad.net/autopilot) to test from the point of view of the user. + +To run the tests you will need autopkgtest: + + $ sudo apt-get install autopkgtest + +You can use multiple test beds to execute the tests. Below you will find +instructions to run them in a virtual machine +You can find more information with: + + $ man adt-run + +== Run dep8 tests == + +To run the tests in a qemu virtual machine, you will first have to create it +(see /usr/share/doc/autopkgtest/README.running-tests.rst.gz). We output the +image to ~/ rather than the current directory, so it will be in a safer +place to avoid rebuilding images every time. You can store it in any +directory you wish. This image is better consumed "fresh", building it daily +will avoid long updates/upgrades when running the tests. + + $ adt-buildvm-ubuntu-cloud -r $(lsb_release -c -s) -a amd64 -o ~/ + +Then run the tests using adt-run with the qemu virtualization host against +the current archive. + + $ adt-run -B -U --unbuilt-tree . \ + -o ~/adt-browser-test/$(date +%Y-%m-%d-%H-%M) \ + --- qemu ~/adt-$(lsb_release -c -s)-amd64-cloud.img + +The tests can also be run on a local phone. + + $ adt-run -B -U --unbuilt-tree . \ + -o ~/adt-browser-test/$(date +%Y-%m-%d-%H-%M) \ + --- ssh -s adb -- -p --serial + +== Examine the dep8 autopilot results == + +To examine the test results, which are in subunit format, additional tools are +required, such as trv (https://launchpad.net/trv). + +You can find the results file in the directory +~/adt-browser-test/$(date +%Y-%m-%d-%H-%M)/artifacts. + + = Settings = webbrowser-app supports a limited set of custom settings, persisted on disk in @@ -88,4 +142,3 @@ - restoreSession: whether to restore the previous browsing session at startup (defaults to true) - diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/browserapplication.cpp webbrowser-app-0.23+16.04.20160408.1/src/app/browserapplication.cpp --- webbrowser-app-0.23+16.04.20160405/src/app/browserapplication.cpp 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/browserapplication.cpp 2016-04-08 17:06:26.000000000 +0000 @@ -38,6 +38,7 @@ #include "favicon-fetcher.h" #include "meminfo.h" #include "mime-database.h" +#include "qquickshortcut_p.h" #include "session-storage.h" #include "webbrowser-window.h" @@ -179,6 +180,7 @@ qmlRegisterSingletonType(uri, 0, 1, "MemInfo", MemInfo_singleton_factory); qmlRegisterSingletonType(uri, 0, 1, "MimeDatabase", MimeDatabase_singleton_factory); qmlRegisterType(uri, 0, 1, "SessionStorage"); + qmlRegisterType(uri, 0, 1, "Shortcut"); const char* gesturesUri = "Ubuntu.Gestures"; qmlRegisterSingletonType(gesturesUri, 0, 1, "Direction", Direction_singleton_factory); diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/CMakeLists.txt webbrowser-app-0.23+16.04.20160408.1/src/app/CMakeLists.txt --- webbrowser-app-0.23+16.04.20160405/src/app/CMakeLists.txt 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/CMakeLists.txt 2016-04-08 17:06:26.000000000 +0000 @@ -27,13 +27,15 @@ session-storage.cpp single-instance-manager.cpp webbrowser-window.cpp + qquickshortcut.cpp ) add_library(${COMMONLIB} STATIC ${COMMONLIB_SRC}) include_directories(${unity8_SOURCE_DIR}/libs/UbuntuGestures ${unity8_SOURCE_DIR}/plugins - ${LIBAPPARMOR_INCLUDE_DIRS}) + ${LIBAPPARMOR_INCLUDE_DIRS} + ${Qt5Gui_PRIVATE_INCLUDE_DIRS}) target_link_libraries(${COMMONLIB} Qt5::Core Qt5::Gui diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/FilteredKeyboardModel.qml webbrowser-app-0.23+16.04.20160408.1/src/app/FilteredKeyboardModel.qml --- webbrowser-app-0.23+16.04.20160405/src/app/FilteredKeyboardModel.qml 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/FilteredKeyboardModel.qml 2016-04-08 17:06:26.000000000 +0000 @@ -0,0 +1,33 @@ +/* + * Copyright 2016 Canonical Ltd. + * + * This file is part of webbrowser-app. + * + * webbrowser-app is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 3. + * + * webbrowser-app is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import QtQuick 2.4 +import Ubuntu.Components 1.3 +import Unity.InputInfo 0.1 + +SortFilterModel { + model: InputDeviceModel { + deviceFilter: InputInfo.Keyboard + } + filter { + // Filter out autopilot-emulated keyboards + // (see https://launchpad.net/bugs/1542224). + property: "name" + pattern: /^(?!py-evdev-uinput).*$/ + } +} diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/MediaAccessDialog.qml webbrowser-app-0.23+16.04.20160408.1/src/app/MediaAccessDialog.qml --- webbrowser-app-0.23+16.04.20160405/src/app/MediaAccessDialog.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/MediaAccessDialog.qml 2016-04-08 17:05:46.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2015 Canonical Ltd. + * Copyright 2015-2016 Canonical Ltd. * * This file is part of webbrowser-app. * @@ -24,30 +24,54 @@ property var request modal: true - title: request.isForAudio && request.isForVideo ? - i18n.tr("Allow this domain to access your camera and microphone?") : - (request.isForVideo ? i18n.tr("Allow this domain to access your camera?") - : i18n.tr("Allow this domain to access your microphone?")) + Label { + elide: Text.ElideRight + textSize: Label.Large + color: theme.palette.normal.overlayText + text: i18n.tr("Permission") + } - text: request.embedder.toString() !== request.origin.toString() ? - internal.textWhenEmbedded : request.origin + Label { + color: theme.palette.normal.baseText + wrapMode: Text.Wrap + text: (request.isForAudio && request.isForVideo) + ? i18n.tr("Allow this domain to access your camera and microphone?") + : (request.isForVideo ? i18n.tr("Allow this domain to access your camera?") + : i18n.tr("Allow this domain to access your microphone?")) + } - Row { - id: internal + Label { + color: theme.palette.normal.baseText + wrapMode: Text.Wrap + text: (request.embedder.toString() !== request.origin.toString()) + // TRANSLATORS: %1 is the URL of the site requesting access to camera and/or microphone and %2 is the URL of the site that embeds it + ? i18n.tr("%1 (embedded in %2)").arg(request.origin).arg(request.embedder) + : request.origin + } - // TRANSLATORS: %1 is the URL of the site requesting access to camera and/or microphone and %2 is the URL of the site that embeds it - readonly property string textWhenEmbedded: i18n.tr("%1 (embedded in %2)") - .arg(request.origin).arg(request.embedder) + Item { + height: units.gu(2) + Rectangle { + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + height: units.dp(1) + color: theme.palette.normal.base + } + } + + Row { height: units.gu(4) spacing: units.gu(2) - anchors.horizontalCenter: parent.horizontalCenter + layoutDirection: Qt.RightToLeft Button { - id: allowButton objectName: "mediaAccessDialog.allowButton" text: i18n.tr("Yes") color: UbuntuColors.green - width: units.gu(14) + width: units.gu(10) onClicked: { request.allow() hide() @@ -55,15 +79,22 @@ } Button { - id: denyButton objectName: "mediaAccessDialog.denyButton" text: i18n.tr("No") - color: UbuntuColors.red - width: units.gu(14) + color: UbuntuColors.lightGrey + width: units.gu(10) onClicked: { request.deny() hide() } } } + + // adjust default dialog visuals to custom design requirements + // (should not be needed when updated dialog implementation lands in UITK) + Binding { + target: __foreground + property: "margins" + value: units.gu(2) + } } diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/qquickshortcut.cpp webbrowser-app-0.23+16.04.20160408.1/src/app/qquickshortcut.cpp --- webbrowser-app-0.23+16.04.20160405/src/app/qquickshortcut.cpp 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/qquickshortcut.cpp 2016-04-08 17:06:26.000000000 +0000 @@ -0,0 +1,283 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtQuick module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qquickshortcut_p.h" + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +/*! + \qmltype Shortcut + \instantiates QQuickShortcut + \inqmlmodule QtQuick + \since 5.5 + \ingroup qtquick-input + \brief Provides keyboard shortcuts + + The Shortcut type provides a way of handling keyboard shortcuts. The shortcut can + be set to one of the \l{QKeySequence::StandardKey}{standard keyboard shortcuts}, + or it can be described with a string containing a sequence of up to four key + presses that are needed to \l{Shortcut::activated}{activate} the shortcut. + + \qml + Item { + id: view + + property int currentIndex + + Shortcut { + sequence: StandardKey.NextChild + onActivated: view.currentIndex++ + } + } + \endqml + + \sa Keys +*/ + +/*! \qmlsignal QtQuick::Shortcut::activated() + + This signal is emitted when the shortcut is activated. + + The corresponding handler is \c onActivated. +*/ + +/*! \qmlsignal QtQuick::Shortcut::activatedAmbiguously() + + This signal is emitted when the shortcut is activated ambigously, + meaning that it matches the start of more than one shortcut. + + The corresponding handler is \c onActivatedAmbiguously. +*/ + +QQuickShortcut::QQuickShortcut(QObject *parent) : QObject(parent), m_id(0), + m_enabled(true), m_completed(false), m_autorepeat(true), m_context(Qt::WindowShortcut) +{ +} + +QQuickShortcut::~QQuickShortcut() +{ + ungrabShortcut(); +} + +/*! + \qmlproperty keysequence QtQuick::Shortcut::sequence + + This property holds the shortcut's key sequence. The key sequence can be set + to one of the \l{QKeySequence::StandardKey}{standard keyboard shortcuts}, or + it can be described with a string containing a sequence of up to four key + presses that are needed to \l{Shortcut::activated}{activate} the shortcut. + + The default value is an empty key sequence. + + \qml + Shortcut { + sequence: "Ctrl+E,Ctrl+W" + onActivated: edit.wrapMode = TextEdit.Wrap + } + \endqml +*/ +QVariant QQuickShortcut::sequence() const +{ + return m_sequence; +} + +void QQuickShortcut::setSequence(const QVariant &sequence) +{ + if (sequence == m_sequence) + return; + + QKeySequence shortcut; + if (sequence.type() == QVariant::Int) + shortcut = QKeySequence(static_cast(sequence.toInt())); + else + shortcut = QKeySequence::fromString(sequence.toString()); + + grabShortcut(shortcut, m_context); + + m_sequence = sequence; + m_shortcut = shortcut; + emit sequenceChanged(); +} + +/*! + \qmlproperty bool QtQuick::Shortcut::enabled + + This property holds whether the shortcut is enabled. + + The default value is \c true. +*/ +bool QQuickShortcut::isEnabled() const +{ + return m_enabled; +} + +void QQuickShortcut::setEnabled(bool enabled) +{ + if (enabled == m_enabled) + return; + + if (m_id) + QGuiApplicationPrivate::instance()->shortcutMap.setShortcutEnabled(enabled, m_id, this); + + m_enabled = enabled; + emit enabledChanged(); +} + +/*! + \qmlproperty bool QtQuick::Shortcut::autoRepeat + + This property holds whether the shortcut can auto repeat. + + The default value is \c true. +*/ +bool QQuickShortcut::autoRepeat() const +{ + return m_autorepeat; +} + +void QQuickShortcut::setAutoRepeat(bool repeat) +{ + if (repeat == m_autorepeat) + return; + + if (m_id) + QGuiApplicationPrivate::instance()->shortcutMap.setShortcutAutoRepeat(repeat, m_id, this); + + m_autorepeat = repeat; + emit autoRepeatChanged(); +} + +/*! + \qmlproperty enumeration QtQuick::Shortcut::context + + This property holds the \l{Qt::ShortcutContext}{shortcut context}. + + Supported values are: + \list + \li \c Qt.WindowShortcut (default) - The shortcut is active when its parent item is in an active top-level window. + \li \c Qt.ApplicationShortcut - The shortcut is active when one of the application's windows are active. + \endlist + + \qml + Shortcut { + sequence: StandardKey.Quit + context: Qt.ApplicationShortcut + onActivated: Qt.quit() + } + \endqml +*/ +Qt::ShortcutContext QQuickShortcut::context() const +{ + return m_context; +} + +void QQuickShortcut::setContext(Qt::ShortcutContext context) +{ + if (context == m_context) + return; + + grabShortcut(m_shortcut, context); + + m_context = context; + emit contextChanged(); +} + +void QQuickShortcut::classBegin() +{ +} + +void QQuickShortcut::componentComplete() +{ + m_completed = true; + grabShortcut(m_shortcut, m_context); +} + +bool QQuickShortcut::event(QEvent *event) +{ + if (m_enabled && event->type() == QEvent::Shortcut) { + QShortcutEvent *se = static_cast(event); + if (se->shortcutId() == m_id && se->key() == m_shortcut){ + if (se->isAmbiguous()) + emit activatedAmbiguously(); + else + emit activated(); + return true; + } + } + return false; +} + +static bool qQuickShortcutContextMatcher(QObject *obj, Qt::ShortcutContext context) +{ + switch (context) { + case Qt::ApplicationShortcut: + return true; + case Qt::WindowShortcut: + while (obj && !obj->isWindowType()) { + obj = obj->parent(); + if (QQuickItem *item = qobject_cast(obj)) + obj = item->window(); + } + return obj && obj == QGuiApplication::focusWindow(); + default: + return false; + } +} + +void QQuickShortcut::grabShortcut(const QKeySequence &sequence, Qt::ShortcutContext context) +{ + ungrabShortcut(); + + if (m_completed && !sequence.isEmpty()) { + QGuiApplicationPrivate *pApp = QGuiApplicationPrivate::instance(); + m_id = pApp->shortcutMap.addShortcut(this, sequence, context, qQuickShortcutContextMatcher); + if (!m_enabled) + pApp->shortcutMap.setShortcutEnabled(false, m_id, this); + if (!m_autorepeat) + pApp->shortcutMap.setShortcutAutoRepeat(false, m_id, this); + } +} + +void QQuickShortcut::ungrabShortcut() +{ + if (m_id) { + QGuiApplicationPrivate::instance()->shortcutMap.removeShortcut(m_id, this); + m_id = 0; + } +} + +QT_END_NAMESPACE diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/qquickshortcut_p.h webbrowser-app-0.23+16.04.20160408.1/src/app/qquickshortcut_p.h --- webbrowser-app-0.23+16.04.20160405/src/app/qquickshortcut_p.h 1970-01-01 00:00:00.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/qquickshortcut_p.h 2016-04-08 17:06:26.000000000 +0000 @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the QtQuick module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL21$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 or version 3 as published by the Free +** Software Foundation and appearing in the file LICENSE.LGPLv21 and +** LICENSE.LGPLv3 included in the packaging of this file. Please review the +** following information to ensure the GNU Lesser General Public License +** requirements will be met: https://www.gnu.org/licenses/lgpl.html and +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QQUICKSHORTCUT_P_H +#define QQUICKSHORTCUT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickShortcut : public QObject, public QQmlParserStatus +{ + Q_OBJECT + Q_INTERFACES(QQmlParserStatus) + Q_PROPERTY(QVariant sequence READ sequence WRITE setSequence NOTIFY sequenceChanged FINAL) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) + Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY autoRepeatChanged FINAL) + Q_PROPERTY(Qt::ShortcutContext context READ context WRITE setContext NOTIFY contextChanged FINAL) + +public: + explicit QQuickShortcut(QObject *parent = Q_NULLPTR); + ~QQuickShortcut(); + + QVariant sequence() const; + void setSequence(const QVariant &sequence); + + bool isEnabled() const; + void setEnabled(bool enabled); + + bool autoRepeat() const; + void setAutoRepeat(bool repeat); + + Qt::ShortcutContext context() const; + void setContext(Qt::ShortcutContext context); + +Q_SIGNALS: + void sequenceChanged(); + void enabledChanged(); + void autoRepeatChanged(); + void contextChanged(); + + void activated(); + void activatedAmbiguously(); + +protected: + void classBegin() Q_DECL_OVERRIDE; + void componentComplete() Q_DECL_OVERRIDE; + bool event(QEvent *event) Q_DECL_OVERRIDE; + + void grabShortcut(const QKeySequence &sequence, Qt::ShortcutContext context); + void ungrabShortcut(); + +private: + int m_id; + bool m_enabled; + bool m_completed; + bool m_autorepeat; + QKeySequence m_shortcut; + Qt::ShortcutContext m_context; + QVariant m_sequence; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHORTCUT_P_H diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/session-storage.cpp webbrowser-app-0.23+16.04.20160408.1/src/app/session-storage.cpp --- webbrowser-app-0.23+16.04.20160405/src/app/session-storage.cpp 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/session-storage.cpp 2016-04-08 17:06:37.000000000 +0000 @@ -77,6 +77,9 @@ void SessionStorage::store(const QString& data) const { + if (m_dataFile.isEmpty()) { + return; + } QString tempName = m_dataFile + "." + \ QString::number(QDateTime::currentDateTime().toMSecsSinceEpoch());; QFile file(tempName); diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/single-instance-manager.cpp webbrowser-app-0.23+16.04.20160408.1/src/app/single-instance-manager.cpp --- webbrowser-app-0.23+16.04.20160405/src/app/single-instance-manager.cpp 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/single-instance-manager.cpp 2016-04-08 17:06:48.000000000 +0000 @@ -69,6 +69,8 @@ } } QString name = profile.absoluteFilePath(QStringLiteral("SingletonSocket")); + // XXX: Unix domain sockets limit the length of the pathname to 108 characters. + // We should probably handle QAbstractSocket::HostNotFoundError explicitly. if (listen(name)) { return true; diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/AddressBar.qml webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/AddressBar.qml --- webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/AddressBar.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/AddressBar.qml 2016-04-08 17:06:32.000000000 +0000 @@ -55,8 +55,6 @@ readonly property Item __actionButton: action readonly property Item __bookmarkToggle: bookmarkToggle - height: textField.height - function selectAll() { textField.selectAll() } diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/Browser.qml webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/Browser.qml --- webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/Browser.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/Browser.qml 2016-04-08 17:06:26.000000000 +0000 @@ -63,21 +63,6 @@ } Connections { - target: tabsModel - onCurrentIndexChanged: { - // Remove focus from the address bar when the current tab - // changes to ensure that its contents are updated. - contentsContainer.forceActiveFocus() - - // In narrow mode, the tabslist is a stack: - // the current tab is always at the top. - if (!browser.wide) { - tabsModel.move(tabsModel.currentIndex, 0) - } - } - } - - Connections { target: currentWebview /* Note that we are connecting the mediaAccessPermissionRequested signal @@ -111,6 +96,10 @@ deviceFilter: InputInfo.TouchScreen } + FilteredKeyboardModel { + id: keyboardModel + } + Component { id: mediaAccessDialogComponent MediaAccessDialog { } @@ -689,6 +678,7 @@ BottomEdgeHandle { id: bottomEdgeHandle + objectName: "bottomEdgeHandle" anchors { left: parent.left @@ -727,7 +717,6 @@ Image { id: bottomEdgeHint - objectName: "bottomEdgeHint" source: "assets/bottom_edge_hint.png" property bool forceShow: false anchors { @@ -1425,21 +1414,12 @@ Component { id: bookmarkOptionsComponent BookmarkOptions { - id: bookmarkOptions folderModel: BookmarksFolderListModel { sourceModel: BookmarksModel } - Component.onCompleted: { - forceActiveFocus() - } + Component.onCompleted: forceActiveFocus() - // Fragile workaround for https://launchpad.net/bugs/1546677. - // By destroying the popover, its visibility isn’t changed to - // false, and thus the bookmark is not removed. - function closeAndConfirm() { - destroy() - } onVisibleChanged: { if (!visible) { BookmarksModel.remove(bookmarkUrl) @@ -1452,28 +1432,11 @@ } } - Keys.onPressed: { - if (bookmarkOptionsShortcuts.processKey(event.key, event.modifiers)) { - event.accepted = true - } - } - - KeyboardShortcuts { - id: bookmarkOptionsShortcuts - KeyboardShortcut { - key: Qt.Key_Return - onTriggered: closeAndConfirm() - } - - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_D - onTriggered: { - BookmarksModel.remove(bookmarkUrl) - closeAndConfirm() - } - } - } + // Fragile workaround for https://launchpad.net/bugs/1546677. + // By destroying the popover, its visibility isn’t changed to + // false, and thus the bookmark is not removed. + Keys.onEnterPressed: destroy() + Keys.onReturnPressed: destroy() } } @@ -1627,16 +1590,7 @@ } function maybeFocusAddressBar() { - // XXX: this is not the right condition, but it is better than - // inferring a "desktop" form factor from various heuristics. - // The real fix is to detect whether there is a physical keyboard - // connected, for which there is currently no API yet (there will - // be a QInputInfo API in a future version of Qt). - // Wide mode might be in use on a device without a physical - // keyboard (e.g. a 10" tablet), and conversely the browser window - // might be shrinked to a narrow layout on a desktop setup with a - // physical keyboard and no OSK. - if (browser.wide) { + if (keyboardModel.count > 0) { focusAddressBar() } else { contentsContainer.forceActiveFocus() @@ -1682,14 +1636,14 @@ } } + property var currentBookmarkOptionsDialog: null function addBookmark(url, title, icon, location) { if (title == "") title = UrlUtils.removeScheme(url) BookmarksModel.add(url, title, icon, "") if (location === undefined) location = chrome.bookmarkTogglePlaceHolder - PopupUtils.open(bookmarkOptionsComponent, - location, - {"bookmarkUrl": url, - "bookmarkTitle": title}) + var properties = {"bookmarkUrl": url, "bookmarkTitle": title} + currentBookmarkOptionsDialog = PopupUtils.open(bookmarkOptionsComponent, + location, properties) } } @@ -1926,6 +1880,13 @@ Connections { target: tabsModel + onCurrentIndexChanged: { + // In narrow mode, the tabslist is a stack: + // the current tab is always at the top. + if (!browser.wide) { + tabsModel.move(tabsModel.currentIndex, 0) + } + } onCurrentTabChanged: { chrome.findInPageMode = false var tab = tabsModel.currentTab @@ -1972,206 +1933,187 @@ } } - Keys.onPressed: if (shortcuts.processKey(event.key, event.modifiers)) event.accepted = true - KeyboardShortcuts { - id: shortcuts - - // Ctrl+Tab or Ctrl+PageDown: cycle through open tabs - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_Tab - enabled: tabContainer.visible || recentView.visible - onTriggered: internal.switchToNextTab() - } - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_PageDown - enabled: tabContainer.visible || recentView.visible - onTriggered: internal.switchToNextTab() - } - - // Ctrl+Shift+Tab or Ctrl+PageUp: cycle through open tabs in reverse order - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_Backtab - enabled: tabContainer.visible || recentView.visible - onTriggered: internal.switchToPreviousTab() - } - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_PageUp - enabled: tabContainer.visible || recentView.visible - onTriggered: internal.switchToPreviousTab() - } - - // Ctrl+Shift+W or Ctrl+Shift+T: Undo close tab - KeyboardShortcut { - modifiers: Qt.ControlModifier | Qt.ShiftModifier - key: Qt.Key_W - enabled: tabContainer.visible || recentView.visible - onTriggered: internal.undoCloseTab() - } - - KeyboardShortcut { - modifiers: Qt.ControlModifier | Qt.ShiftModifier - key: Qt.Key_T - enabled: tabContainer.visible || recentView.visible - onTriggered: internal.undoCloseTab() - } - - // Ctrl+W or Ctrl+F4: Close the current tab - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_W - enabled: tabContainer.visible || recentView.visible - onTriggered: internal.closeCurrentTab() - } - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_F4 - enabled: tabContainer.visible || recentView.visible - onTriggered: internal.closeCurrentTab() - } - - // Ctrl+T: Open a new Tab - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_T - enabled: tabContainer.visible || recentView.visible || - bookmarksViewLoader.active || historyViewLoader.active - onTriggered: { - openUrlInNewTab("", true) - if (recentView.visible) recentView.reset() - bookmarksViewLoader.active = false - historyViewLoader.active = false - } + // TODO: internationalize non-standard key sequences? + + // Ctrl+Tab or Ctrl+PageDown: cycle through open tabs + Shortcut { + sequence: StandardKey.NextChild + enabled: tabContainer.visible || recentView.visible + onActivated: internal.switchToNextTab() + } + Shortcut { + sequence: "Ctrl+PgDown" + enabled: tabContainer.visible || recentView.visible + onActivated: internal.switchToNextTab() + } + + // Ctrl+Shift+Tab or Ctrl+PageUp: cycle through open tabs in reverse order + Shortcut { + sequence: StandardKey.PreviousChild + enabled: tabContainer.visible || recentView.visible + onActivated: internal.switchToPreviousTab() + } + Shortcut { + sequence: "Ctrl+Shift+Tab" + enabled: tabContainer.visible || recentView.visible + onActivated: internal.switchToPreviousTab() + } + Shortcut { + sequence: "Ctrl+PgUp" + enabled: tabContainer.visible || recentView.visible + onActivated: internal.switchToPreviousTab() + } + + // Ctrl+W or Ctrl+F4: Close the current tab + Shortcut { + sequence: StandardKey.Close + enabled: tabContainer.visible || recentView.visible + onActivated: internal.closeCurrentTab() + } + Shortcut { + sequence: "Ctrl+F4" + enabled: tabContainer.visible || recentView.visible + onActivated: internal.closeCurrentTab() + } + + // Ctrl+Shift+W or Ctrl+Shift+T: Undo close tab + Shortcut { + sequence: "Ctrl+Shift+W" + enabled: tabContainer.visible || recentView.visible + onActivated: internal.undoCloseTab() + } + Shortcut { + sequence: "Ctrl+Shift+T" + enabled: tabContainer.visible || recentView.visible + onActivated: internal.undoCloseTab() + } + + // Ctrl+T: Open a new Tab + Shortcut { + sequence: StandardKey.AddTab + enabled: tabContainer.visible || recentView.visible || + bookmarksViewLoader.active || historyViewLoader.active + onActivated: { + openUrlInNewTab("", true) + if (recentView.visible) recentView.reset() + bookmarksViewLoader.active = false + historyViewLoader.active = false } + } - // F6 or Ctrl+L or Alt+D: Select the content in the address bar - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_L - enabled: tabContainer.visible - onTriggered: internal.focusAddressBar(true) - } - KeyboardShortcut { - modifiers: Qt.AltModifier - key: Qt.Key_D - enabled: tabContainer.visible - onTriggered: internal.focusAddressBar(true) - } - KeyboardShortcut { - key: Qt.Key_F6 - enabled: tabContainer.visible - onTriggered: internal.focusAddressBar(true) - } - - // Ctrl+D: Toggle bookmarked state on current Tab - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_D - enabled: tabContainer.visible - onTriggered: { - if (currentWebview) { - if (BookmarksModel.contains(currentWebview.url)) { - BookmarksModel.remove(currentWebview.url) - } else { - internal.addBookmark(currentWebview.url, currentWebview.title, currentWebview.icon) - } + // F6 or Ctrl+L or Alt+D: Select the content in the address bar + Shortcut { + sequence: "F6" + enabled: tabContainer.visible + onActivated: internal.focusAddressBar(true) + } + Shortcut { + sequence: "Ctrl+L" + enabled: tabContainer.visible + onActivated: internal.focusAddressBar(true) + } + Shortcut { + sequence: "Alt+D" + enabled: tabContainer.visible + onActivated: internal.focusAddressBar(true) + } + + // Ctrl+D: Toggle bookmarked state on current Tab + Shortcut { + sequence: "Ctrl+D" + enabled: tabContainer.visible + onActivated: { + if (internal.currentBookmarkOptionsDialog) { + internal.currentBookmarkOptionsDialog.hide() + } else if (currentWebview) { + if (BookmarksModel.contains(currentWebview.url)) { + BookmarksModel.remove(currentWebview.url) + } else { + internal.addBookmark(currentWebview.url, currentWebview.title, currentWebview.icon) } } } + } - // Ctrl+H: Show History - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_H - enabled: tabContainer.visible - onTriggered: historyViewLoader.active = true - } + // Ctrl+H: Show History + Shortcut { + sequence: "Ctrl+H" + enabled: tabContainer.visible + onActivated: historyViewLoader.active = true + } - // Ctrl+Shift+O: Show Bookmarks - KeyboardShortcut { - modifiers: Qt.ControlModifier | Qt.ShiftModifier - key: Qt.Key_O - enabled: tabContainer.visible - onTriggered: bookmarksViewLoader.active = true - } + // Ctrl+Shift+O: Show Bookmarks + Shortcut { + sequence: "Ctrl+Shift+O" + enabled: tabContainer.visible + onActivated: bookmarksViewLoader.active = true + } - // Alt+← or Backspace: Goes to the previous page in history - KeyboardShortcut { - modifiers: Qt.AltModifier - key: Qt.Key_Left - enabled: tabContainer.visible - onTriggered: internal.historyGoBack() - } - KeyboardShortcut { - key: Qt.Key_Backspace - enabled: tabContainer.visible - onTriggered: internal.historyGoBack() - } + // Alt+← or Backspace: Goes to the previous page in history + Shortcut { + sequence: StandardKey.Back + enabled: tabContainer.visible + onActivated: internal.historyGoBack() + } + Shortcut { + sequence: "Backspace" + enabled: tabContainer.visible + onActivated: internal.historyGoBack() + } - // Alt+→ or Shift+Backspace: Goes to the next page in history - KeyboardShortcut { - modifiers: Qt.AltModifier - key: Qt.Key_Right - enabled: tabContainer.visible - onTriggered: internal.historyGoForward() - } - KeyboardShortcut { - modifiers: Qt.ShiftModifier - key: Qt.Key_Backspace - enabled: tabContainer.visible - onTriggered: internal.historyGoForward() - } + // Alt+→ or Shift+Backspace: Goes to the next page in history + Shortcut { + sequence: StandardKey.Forward + enabled: tabContainer.visible + onActivated: internal.historyGoForward() + } + Shortcut { + sequence: "Shift+Backspace" + enabled: tabContainer.visible + onActivated: internal.historyGoForward() + } - // F5 or Ctrl+R: Reload current Tab - KeyboardShortcut { - key: Qt.Key_F5 - enabled: tabContainer.visible - onTriggered: if (currentWebview) currentWebview.reload() - } - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_R - enabled: tabContainer.visible - onTriggered: if (currentWebview) currentWebview.reload() - } + // F5 or Ctrl+R: Reload current Tab + Shortcut { + sequence: StandardKey.Refresh + enabled: tabContainer.visible + onActivated: if (currentWebview) currentWebview.reload() + } + Shortcut { + sequence: "F5" + enabled: tabContainer.visible + onActivated: if (currentWebview) currentWebview.reload() + } - // Ctrl+F: Find in Page - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_F - enabled: tabContainer.visible && !newTabViewLoader.active - onTriggered: chrome.findInPageMode = true - } + // Ctrl+F: Find in Page + Shortcut { + sequence: StandardKey.Find + enabled: tabContainer.visible && !newTabViewLoader.active + onActivated: chrome.findInPageMode = true + } - // Ctrl+J: Show downloads page - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_J - enabled: chrome.visible && - downloadHandlerLoader.status == Loader.Ready && - contentHandlerLoader.status == Loader.Ready && - !downloadsViewLoader.active - onTriggered: downloadsViewLoader.active = true - } + // Ctrl+J: Show downloads page + Shortcut { + sequence: "Ctrl+J" + enabled: chrome.visible && + downloadHandlerLoader.status == Loader.Ready && + contentHandlerLoader.status == Loader.Ready && + !downloadsViewLoader.active + onActivated: downloadsViewLoader.active = true + } - // Ctrl+Shift+G: Find previous - KeyboardShortcut { - modifiers: Qt.ControlModifier | Qt.ShiftModifier - key: Qt.Key_G - enabled: currentWebview && chrome.findInPageMode - onTriggered: currentWebview.findController.previous() - } + // Ctrl+G: Find next + Shortcut { + sequence: StandardKey.FindNext + enabled: currentWebview && chrome.findInPageMode + onActivated: currentWebview.findController.next() + } - // Ctrl+G: Find next - KeyboardShortcut { - modifiers: Qt.ControlModifier - key: Qt.Key_G - enabled: currentWebview && chrome.findInPageMode - onTriggered: currentWebview.findController.next() - } + // Ctrl+Shift+G: Find previous + Shortcut { + sequence: StandardKey.FindPrevious + enabled: currentWebview && chrome.findInPageMode + onActivated: currentWebview.findController.previous() } Loader { diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/DownloadsPage.qml webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/DownloadsPage.qml --- webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/DownloadsPage.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/DownloadsPage.qml 2016-04-08 17:06:20.000000000 +0000 @@ -164,6 +164,28 @@ } } + property int selectedIndex: -1 + ViewItems.selectMode: downloadsItem.selectMode || downloadsItem.pickingMode + ViewItems.onSelectedIndicesChanged: { + if (downloadsItem.multiSelect) { + return + } + // Enforce single selection mode to work around + // the lack of such a feature in the UITK. + if (ViewItems.selectedIndices.length > 1 && selectedIndex != -1) { + var selection = ViewItems.selectedIndices + selection.splice(selection.indexOf(selectedIndex), 1) + selectedIndex = selection[0] + ViewItems.selectedIndices = selection + return + } + if (ViewItems.selectedIndices.length > 0) { + selectedIndex = ViewItems.selectedIndices[0] + } else { + selectedIndex = -1 + } + } + delegate: DownloadDelegate { downloadManager: downloadsItem.downloadManager downloadId: model.downloadId @@ -175,33 +197,22 @@ ? "image://thumbnailer/file://" + model.path : "" icon: MimeDatabase.iconForMimetype(model.mimetype) incomplete: !model.complete - selectMode: downloadsItem.selectMode || downloadsItem.pickingMode visible: !(selectMode && incomplete) errorMessage: model.error paused: model.paused - // Work around bug #1493880 - property bool lastSelected - - onSelectedChanged: { - if (!multiSelect && selected && lastSelected != selected) { - downloadsListView.ViewItems.selectedIndices = [index] - } - lastSelected = selected - } onClicked: { - if (model.complete) { - if (selectMode) { - selected = !selected - } else { - exportPeerPicker.contentType = MimeTypeMapper.mimeTypeToContentType(model.mimetype) - exportPeerPicker.visible = true - exportPeerPicker.path = model.path - } + if (model.complete && !selectMode) { + exportPeerPicker.contentType = MimeTypeMapper.mimeTypeToContentType(model.mimetype) + exportPeerPicker.visible = true + exportPeerPicker.path = model.path } } onPressAndHold: { + if (downloadsItem.selectMode || downloadsItem.pickingMode) { + return + } downloadsItem.selectMode = true downloadsItem.multiSelect = true if (downloadsItem.selectMode) { diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/HistoryViewWide.qml webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/HistoryViewWide.qml --- webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/HistoryViewWide.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/HistoryViewWide.qml 2016-04-08 17:06:54.000000000 +0000 @@ -109,7 +109,7 @@ spacing: units.gu(1) - Item { + FocusScope { width: units.gu(40) height: parent.height @@ -118,54 +118,17 @@ objectName: "lastVisitDateListView" anchors.fill: parent + focus: true currentIndex: 0 - onCurrentIndexChanged: { - if (currentItem) { - historyLastVisitDateModel.lastVisitDate = currentItem.lastVisitDate - } - urlsListView.ViewItems.selectedIndices = [] - } - - // Manually track the current date, so that we can detect when - // the ListView automatically changes the currentItem as result - // of a change in the model that removes the currentItem. - // When this happens, we reset the currentItem to "all dates". - property date currentDate - - // Ignore currentItemChanged signals while we are changing the - // currentIndex manually (as a result of either UP and DOWN key - // presses, or clicking on items) - // Any other emission of currentItemChanged will therefore be - // from ListView changing it automatically. - function explicitlyChangeCurrentIndex(changeAction) { - explicitlySettingCurrentIndex = true - changeAction() - explicitlySettingCurrentIndex = false - currentDate = currentItem.lastVisitDate - } - property bool explicitlySettingCurrentIndex: false - Keys.onDownPressed: explicitlyChangeCurrentIndex(incrementCurrentIndex) - Keys.onUpPressed: explicitlyChangeCurrentIndex(function() { - if (lastVisitDateListView.currentIndex == 0 && searchMode) { - searchQuery.focus = true - } else { - lastVisitDateListView.decrementCurrentIndex() - } - }) - - onCurrentItemChanged: { - if (explicitlySettingCurrentIndex) return; - if (currentItem.lastVisitDate.valueOf() !== currentDate.valueOf()) { - currentIndex = 0 - } - } + onCurrentIndexChanged: urlsListView.ViewItems.selectedIndices = [] model: HistoryLastVisitDateListModel { sourceModel: historyLastVisitDateModel.model } delegate: ListItem { + id: lastVisitDateDelegate objectName: "lastVisitDateDelegate" property var lastVisitDate: model.lastVisitDate @@ -215,7 +178,7 @@ } fontSize: "small" - color: (!lastVisitDateListView.activeFocus && (lastVisitDateListView.currentIndex == index)) ? UbuntuColors.orange : UbuntuColors.darkGrey + color: (!lastVisitDateListView.activeFocus && lastVisitDateDelegate.ListView.isCurrentItem) ? UbuntuColors.orange : UbuntuColors.darkGrey } divider { @@ -227,10 +190,34 @@ Behavior on opacity { UbuntuNumberAnimation {} } } - onClicked: ListView.view.explicitlyChangeCurrentIndex(function() { ListView.view.currentIndex = index }) + onClicked: ListView.view.currentIndex = index + + ListView.onRemove: { + if (ListView.isCurrentItem) { + // For some reason, setting the current index here + // results in it being reset to its previous value + // right away. Delaying it with a timer so the + // operation is queued does the trick. + resetIndexTimer.restart() + } + } } highlight: ListViewHighlight {} + + Timer { + id: resetIndexTimer + interval: 0 + onTriggered: lastVisitDateListView.currentIndex = 0 + } + } + + Keys.onUpPressed: { + if (searchMode) { + searchQuery.focus = true + } else { + event.accepted = false + } } Scrollbar { @@ -254,7 +241,7 @@ model: SortFilterModel { id: historyLastVisitDateModel - property date lastVisitDate + readonly property date lastVisitDate: lastVisitDateListView.currentItem ? lastVisitDateListView.currentItem.lastVisitDate : "" filter { property: "lastVisitDateString" pattern: new RegExp(lastVisitDate.isValid() ? "^%1$".arg(Qt.formatDate(lastVisitDate, "yyyy-MM-dd")) : "") @@ -357,6 +344,14 @@ top: parent.top } + Keys.onEscapePressed: { + if (searchQuery.activeFocus) { + historyViewWide.searchMode = false + } else { + event.accepted = false + } + } + Label { visible: !urlsListView.ViewItems.selectMode && !historyViewWide.searchMode @@ -453,7 +448,6 @@ visible: historyViewWide.searchMode readonly property var terms: text.split(/\s+/g).filter(function(term) { return term.length > 0 }) - Keys.onEscapePressed: historyViewWide.searchMode = false Keys.onDownPressed: urlsListView.focus = true } diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/KeyboardShortcut.qml webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/KeyboardShortcut.qml --- webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/KeyboardShortcut.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/KeyboardShortcut.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -/* - * Copyright 2015 Canonical Ltd. - * - * This file is part of webbrowser-app. - * - * webbrowser-app is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * webbrowser-app is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick 2.4 -import Ubuntu.Components 1.3 - -Action { - property int key - property int modifiers: Qt.NoModifier -} diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/KeyboardShortcuts.qml webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/KeyboardShortcuts.qml --- webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/KeyboardShortcuts.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/KeyboardShortcuts.qml 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright 2015 Canonical Ltd. - * - * This file is part of webbrowser-app. - * - * webbrowser-app is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 3. - * - * webbrowser-app is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -import QtQuick 2.4 - -Item { - function processKey(key, modifiers) { - for (var i = 0; i < data.length; i++) { - var shortcut = data[i]; - - if (!shortcut.enabled) continue - if (key !== shortcut.key) continue - - if (shortcut.modifiers === Qt.NoModifier) { - if (modifiers === Qt.NoModifier) { - shortcut.trigger() - return true - } - } else if ((modifiers & shortcut.modifiers) === shortcut.modifiers) { - shortcut.trigger() - return true - } - } - return false - } -} diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/ListViewHighlight.qml webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/ListViewHighlight.qml --- webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/ListViewHighlight.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/ListViewHighlight.qml 2016-04-08 17:06:26.000000000 +0000 @@ -18,7 +18,7 @@ import QtQuick 2.4 import Ubuntu.Components 1.3 -import Unity.InputInfo 0.1 +import ".." Rectangle { color: "transparent" @@ -33,8 +33,7 @@ readonly property bool hasKeyboard: keyboardModel.count > 0 - InputDeviceModel { + FilteredKeyboardModel { id: keyboardModel - deviceFilter: InputInfo.Keyboard } } diff -Nru webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/NavigationBar.qml webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/NavigationBar.qml --- webbrowser-app-0.23+16.04.20160405/src/app/webbrowser/NavigationBar.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/src/app/webbrowser/NavigationBar.qml 2016-04-08 17:06:32.000000000 +0000 @@ -115,7 +115,8 @@ leftMargin: Math.round(backButton.width + forwardButton.width + units.gu(1)) right: rightButtonsBar.left rightMargin: units.gu(1) - verticalCenter: parent.verticalCenter + top: parent.top + bottom: parent.bottom } icon: (internal.webview && internal.webview.certificateError) ? "" : tab ? tab.icon : "" @@ -220,15 +221,18 @@ id: internal property var openDrawer: null readonly property var webview: tab ? tab.webview : null + } - onWebviewChanged: { - if (webview) { - addressbar.actualUrl = webview.url - addressbar.securityStatus = webview.securityStatus - } else { - addressbar.actualUrl = "" - addressbar.securityStatus = null - } + onTabChanged: { + if (tab) { + addressbar.actualUrl = tab.url + addressbar.securityStatus = (tab.webview ? tab.webview.securityStatus : null) + if (!tab.url.toString() && editing) { + addressbar.text = "" + } + } else { + addressbar.actualUrl = "" + addressbar.securityStatus = null } } diff -Nru webbrowser-app-0.23+16.04.20160405/tests/autopilot/webapp_container/tests/test_context_menu.py webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webapp_container/tests/test_context_menu.py --- webbrowser-app-0.23+16.04.20160405/tests/autopilot/webapp_container/tests/test_context_menu.py 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webapp_container/tests/test_context_menu.py 2016-04-08 17:05:52.000000000 +0000 @@ -298,7 +298,6 @@ self._test_copy_image() -@testtools.skipIf(model() != "Desktop", "on desktop only") class TestContextMenuTextArea(TestContextMenuBase): def _test_actions(self): @@ -316,6 +315,7 @@ self.menu = self._open_context_menu(webview) +@testtools.skipIf(model() != "Desktop", "on desktop only") class TestContextMenuTextAreaMainWebView(TestContextMenuTextArea): def setUp(self): @@ -327,6 +327,7 @@ self._test_actions() +@testtools.skipIf(model() != "Desktop", "on desktop only") class TestContextMenuTextAreaOverlayWebView(TestContextMenuTextArea): def setUp(self): diff -Nru webbrowser-app-0.23+16.04.20160405/tests/autopilot/webbrowser_app/emulators/browser.py webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webbrowser_app/emulators/browser.py --- webbrowser-app-0.23+16.04.20160405/tests/autopilot/webbrowser_app/emulators/browser.py 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webbrowser_app/emulators/browser.py 2016-04-08 17:06:15.000000000 +0000 @@ -183,8 +183,8 @@ objectName="downloadFileButton") self.pointing_device.click_object(button) - def get_bottom_edge_hint(self): - return self.select_single("QQuickImage", objectName="bottomEdgeHint") + def get_bottom_edge_handle(self): + return self.select_single(objectName="bottomEdgeHandle") def get_bottom_edge_bar(self): return self.select_single(objectName="bottomEdgeBar", visible=True) diff -Nru webbrowser-app-0.23+16.04.20160405/tests/autopilot/webbrowser_app/tests/__init__.py webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webbrowser_app/tests/__init__.py --- webbrowser-app-0.23+16.04.20160405/tests/autopilot/webbrowser_app/tests/__init__.py 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webbrowser_app/tests/__init__.py 2016-04-08 17:06:15.000000000 +0000 @@ -122,9 +122,9 @@ def drag_bottom_edge_upwards(self, fraction): self.assertThat(model(), NotEquals('Desktop')) - hint = self.main_window.get_bottom_edge_hint() - x = hint.globalRect.x + hint.globalRect.width // 2 - y0 = hint.globalRect.y + hint.globalRect.height // 2 + handleRect = self.main_window.get_bottom_edge_handle().globalRect + x = handleRect.x + handleRect.width // 2 + y0 = handleRect.y + handleRect.height // 2 y1 = y0 - int(self.main_window.height * fraction) self.pointing_device.drag(x, y0, x, y1) diff -Nru webbrowser-app-0.23+16.04.20160405/tests/autopilot/webbrowser_app/tests/test_keyboard.py webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webbrowser_app/tests/test_keyboard.py --- webbrowser-app-0.23+16.04.20160405/tests/autopilot/webbrowser_app/tests/test_keyboard.py 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webbrowser_app/tests/test_keyboard.py 2016-04-08 17:06:26.000000000 +0000 @@ -103,7 +103,7 @@ self.check_tab_number(2) self.main_window.press_key('Ctrl+Page_Down') self.check_tab_number(0) - self.main_window.press_key('Shift+Ctrl+Tab') + self.main_window.press_key('Ctrl+Shift+Tab') if self.main_window.wide: self.check_tab_number(2) else: @@ -493,3 +493,24 @@ self.main_window.press_key('Ctrl+w') self.assert_number_webviews_eventually(1) + + def test_addressbar_cleared_when_opening_new_tab(self): + # Verify that when opening a new tab while the address bar was focused, + # the address bar is cleared. + self.main_window.press_key('Ctrl+l') + self.address_bar.activeFocus.wait_for(True) + self.assertThat(self.address_bar.text, Eventually(Equals(self.url))) + self.main_window.press_key('Ctrl+t') + self.address_bar.activeFocus.wait_for(True) + self.assertThat(self.address_bar.text, Eventually(Equals(""))) + + def test_addressbar_cleared_when_switching_between_new_tabs(self): + # Verify that when opening a new tab while a new tab was already open + # with text input in the address bar, the address bar is cleared. + self.main_window.press_key('Ctrl+t') + self.address_bar.activeFocus.wait_for(True) + self.assertThat(self.address_bar.text, Eventually(Equals(""))) + self.address_bar.write("abc") + self.main_window.press_key('Ctrl+t') + self.address_bar.activeFocus.wait_for(True) + self.assertThat(self.address_bar.text, Eventually(Equals(""))) diff -Nru webbrowser-app-0.23+16.04.20160405/tests/autopilot/webbrowser_app/tests/test_private.py webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webbrowser_app/tests/test_private.py --- webbrowser-app-0.23+16.04.20160405/tests/autopilot/webbrowser_app/tests/test_private.py 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/tests/autopilot/webbrowser_app/tests/test_private.py 2016-04-08 17:06:26.000000000 +0000 @@ -16,6 +16,7 @@ from testtools.matchers import Equals, NotEquals from autopilot.matchers import Eventually +from autopilot.platform import model from webbrowser_app.tests import StartOpenRemotePageTestCaseBase @@ -30,7 +31,7 @@ self.assert_number_incognito_webviews_eventually(1) self.assertTrue(self.main_window.is_new_private_tab_view_visible()) self.assertThat(address_bar.activeFocus, - Eventually(Equals(self.main_window.wide))) + Eventually(Equals(model() == 'Desktop'))) self.assertThat(address_bar.text, Eventually(Equals(""))) self.main_window.leave_private_mode() diff -Nru webbrowser-app-0.23+16.04.20160405/tests/unittests/qml/WebbrowserTestCase.qml webbrowser-app-0.23+16.04.20160408.1/tests/unittests/qml/WebbrowserTestCase.qml --- webbrowser-app-0.23+16.04.20160405/tests/unittests/qml/WebbrowserTestCase.qml 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/tests/unittests/qml/WebbrowserTestCase.qml 2016-04-08 17:05:41.000000000 +0000 @@ -55,10 +55,7 @@ } function swipeToDeleteAndConfirm(listitem) { - flick(listitem, - listitem.width / 10, listitem.height / 2, listitem.width / 2, 0, - // work around https://launchpad.net/bugs/1526940 by specifying a non-null delay - -1, -1, Qt.LeftButton, Qt.NoModifiers, 1) + flick(listitem, listitem.width / 10, listitem.height / 2, listitem.width / 2, 0) var confirm = findChild(listitem, "actionbutton_leadingAction.delete") clickItem(confirm) } diff -Nru webbrowser-app-0.23+16.04.20160405/tests/unittests/tabs-model/tst_TabsModelTests.cpp webbrowser-app-0.23+16.04.20160408.1/tests/unittests/tabs-model/tst_TabsModelTests.cpp --- webbrowser-app-0.23+16.04.20160405/tests/unittests/tabs-model/tst_TabsModelTests.cpp 2016-04-05 15:42:30.000000000 +0000 +++ webbrowser-app-0.23+16.04.20160408.1/tests/unittests/tabs-model/tst_TabsModelTests.cpp 2016-04-08 17:06:42.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2013-2015 Canonical Ltd. + * Copyright 2013-2016 Canonical Ltd. * * This file is part of webbrowser-app. * @@ -33,11 +33,11 @@ Q_OBJECT private: + QQmlEngine engine; TabsModel* model; QQuickItem* createTab() { - QQmlEngine engine; QQmlComponent component(&engine); QByteArray data("import QtQuick 2.4\nItem {\nproperty url url\n" "property string title\nproperty url icon\n}");