From 0c674c71100e77a1596e6767749b7dbd9809233c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 14 May 2018 18:48:14 +0200 Subject: [PATCH 01/11] Update flake8-builtins from 1.3.1 to 1.4.1 --- misc/requirements/requirements-flake8.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt index a29b2293c..cbe996ce4 100644 --- a/misc/requirements/requirements-flake8.txt +++ b/misc/requirements/requirements-flake8.txt @@ -3,7 +3,7 @@ attrs==18.1.0 flake8==3.5.0 flake8-bugbear==18.2.0 -flake8-builtins==1.3.1 # rq.filter: != 1.4.0 +flake8-builtins==1.4.1 # rq.filter: != 1.4.0 flake8-comprehensions==1.4.1 flake8-copyright==0.2.0 flake8-debugger==3.1.0 From b0f83615b69875b81d0ea5c0f1d1ebfed0d9c204 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 14 May 2018 18:48:15 +0200 Subject: [PATCH 02/11] Update wheel from 0.31.0 to 0.31.1 --- misc/requirements/requirements-pip.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/requirements/requirements-pip.txt b/misc/requirements/requirements-pip.txt index 60f24f057..34dc41d4d 100644 --- a/misc/requirements/requirements-pip.txt +++ b/misc/requirements/requirements-pip.txt @@ -5,4 +5,4 @@ packaging==17.1 pyparsing==2.2.0 setuptools==39.1.0 six==1.11.0 -wheel==0.31.0 +wheel==0.31.1 From 553a91c012fbdefc9beb00514ce6563eb379f4c5 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 14 May 2018 18:48:17 +0200 Subject: [PATCH 03/11] Update python-dateutil from 2.7.2 to 2.7.3 --- misc/requirements/requirements-pylint-master.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/requirements/requirements-pylint-master.txt b/misc/requirements/requirements-pylint-master.txt index 391526ad0..878f1390f 100644 --- a/misc/requirements/requirements-pylint-master.txt +++ b/misc/requirements/requirements-pylint-master.txt @@ -9,7 +9,7 @@ isort==4.3.4 lazy-object-proxy==1.3.1 mccabe==0.6.1 -e git+https://github.com/PyCQA/pylint.git#egg=pylint -python-dateutil==2.7.2 +python-dateutil==2.7.3 ./scripts/dev/pylint_checkers requests==2.18.4 six==1.11.0 From b0105b01578366d671ef70b032b69de4d9deae86 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 14 May 2018 18:48:18 +0200 Subject: [PATCH 04/11] Update python-dateutil from 2.7.2 to 2.7.3 --- misc/requirements/requirements-pylint.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt index 997a6edb6..28add7741 100644 --- a/misc/requirements/requirements-pylint.txt +++ b/misc/requirements/requirements-pylint.txt @@ -9,7 +9,7 @@ isort==4.3.4 lazy-object-proxy==1.3.1 mccabe==0.6.1 pylint==1.8.4 -python-dateutil==2.7.2 +python-dateutil==2.7.3 ./scripts/dev/pylint_checkers requests==2.18.4 six==1.11.0 From 6784356d9de61a609f2eb8336ae84f13438a0a8b Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 14 May 2018 18:48:20 +0200 Subject: [PATCH 05/11] Update hypothesis from 3.56.5 to 3.56.9 --- misc/requirements/requirements-tests.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index 2d3fb1020..cddf48309 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -11,7 +11,7 @@ fields==5.0.0 Flask==1.0.2 glob2==0.6 hunter==2.0.2 -hypothesis==3.56.5 +hypothesis==3.56.9 itsdangerous==0.24 # Jinja2==2.10 Mako==1.0.7 From 6eadff4a1047e72765e2082cc460442ffd81adee Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 14 May 2018 22:13:15 +0200 Subject: [PATCH 06/11] Add Python executable to :version --- qutebrowser/utils/version.py | 1 + tests/unit/utils/test_version.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index 86973a3de..47e054bec 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -399,6 +399,7 @@ def version(): lines += [ 'Frozen: {}'.format(hasattr(sys, 'frozen')), "Imported from {}".format(importpath), + "Using Python from {}".format(sys.executable), "Qt library executable path: {}, data path: {}".format( QLibraryInfo.location(QLibraryInfo.LibraryExecutablesPath), QLibraryInfo.location(QLibraryInfo.DataPath) diff --git a/tests/unit/utils/test_version.py b/tests/unit/utils/test_version.py index fe45fec97..683fba02e 100644 --- a/tests/unit/utils/test_version.py +++ b/tests/unit/utils/test_version.py @@ -874,6 +874,7 @@ def test_version_output(params, stubs, monkeypatch): '_git_str': lambda: ('GIT COMMIT' if params.git_commit else None), 'platform.python_implementation': lambda: 'PYTHON IMPLEMENTATION', 'platform.python_version': lambda: 'PYTHON VERSION', + 'sys.executable': 'EXECUTABLE PATH', 'PYQT_VERSION_STR': 'PYQT VERSION', 'earlyinit.qt_version': lambda: 'QT VERSION', '_module_versions': lambda: ['MODULE VERSION 1', 'MODULE VERSION 2'], @@ -897,6 +898,7 @@ def test_version_output(params, stubs, monkeypatch): 'qt': 'QT VERSION', 'frozen': str(params.frozen), 'import_path': import_path, + 'python_path': 'EXECUTABLE PATH', } if params.with_webkit: @@ -951,6 +953,7 @@ def test_version_output(params, stubs, monkeypatch): Platform: PLATFORM, ARCHITECTURE{linuxdist} Frozen: {frozen} Imported from {import_path} + Using Python from {python_path} Qt library executable path: QT PATH, data path: QT PATH {osinfo} Paths: From 44d26f77a5007177a4a7df4c811b0b2cf084dbc6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 17 May 2018 14:21:14 +0200 Subject: [PATCH 07/11] Add workaround for the "split page" Qt bug (QTBUG-68224) Fixes #3920 --- qutebrowser/browser/webengine/webenginetab.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index fb04dc120..672675b9e 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -1057,6 +1057,22 @@ class WebEngineTab(browsertab.AbstractTab): @pyqtSlot(usertypes.NavigationRequest) def _on_navigation_request(self, navigation): super()._on_navigation_request(navigation) + + if qtutils.version_check('5.11.0', exact=True, compiled=False): + # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-68224 + layout = self._widget.layout() + count = layout.count() + if count > 1: + for i in range(count): + item = layout.itemAt(i) + if item is None: + continue + widget = item.widget() + if widget is not self._widget.focusProxy(): + log.webview.debug("Removing widget {} (QTBUG-68224)" + .format(widget)) + layout.removeWidget(widget) + if not navigation.accepted or not navigation.is_main_frame: return From d8569a36f92b950a8dbeae18e483c2b61fa5e764 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 17 May 2018 14:24:29 +0200 Subject: [PATCH 08/11] Update changelog --- doc/changelog.asciidoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 3c6c796c7..3f7a3abc7 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -36,6 +36,15 @@ Changed - There's now completion for commands taking a variable count of arguments (like `:config-cycle`). + +v1.3.1 (unreleased) +------------------- + +Added +~~~~~ + +- Work around a bug in Qt 5.11 where only the top/bottom half of the window is used. + v1.3.0 ------ From 6ccd69dad200682f7f4ace9d093a444c14825499 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 17 May 2018 15:51:14 +0200 Subject: [PATCH 09/11] Fix reload for JavaScript support on Qt 5.11 --- qutebrowser/browser/webengine/webenginetab.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index 672675b9e..c451305f0 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -1076,7 +1076,7 @@ class WebEngineTab(browsertab.AbstractTab): if not navigation.accepted or not navigation.is_main_frame: return - needs_reload = { + settings_needing_reload = { 'content.plugins', 'content.javascript.enabled', 'content.javascript.can_access_clipboard', @@ -1085,11 +1085,20 @@ class WebEngineTab(browsertab.AbstractTab): 'input.spatial_navigation', 'input.spatial_navigation', } - assert needs_reload.issubset(configdata.DATA) + assert settings_needing_reload.issubset(configdata.DATA) changed = self.settings.update_for_url(navigation.url) - if (changed & needs_reload and navigation.navigation_type != - navigation.Type.link_clicked): + reload_needed = changed & settings_needing_reload + + # On Qt < 5.11, we don't don't need a reload when type == link_clicked. + # On Qt 5.11.0, we always need a reload. + # TODO on Qt > 5.11.0, we hopefully never need a reload: + # https://codereview.qt-project.org/#/c/229525/1 + if not qtutils.version_check('5.11.0', exact=True, compiled=False): + if navigation.navigation_type != navigation.Type.link_clicked: + reload_needed = False + + if reload_needed: # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-66656 self._reload_url = navigation.url From dacca0d2ed8f05c5bf632aa022536f29ad177deb Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 17 May 2018 15:52:22 +0200 Subject: [PATCH 10/11] Remove double settings --- qutebrowser/browser/webengine/webenginetab.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index c451305f0..1eba686c9 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -1080,10 +1080,8 @@ class WebEngineTab(browsertab.AbstractTab): 'content.plugins', 'content.javascript.enabled', 'content.javascript.can_access_clipboard', - 'content.javascript.can_access_clipboard', 'content.print_element_backgrounds', 'input.spatial_navigation', - 'input.spatial_navigation', } assert settings_needing_reload.issubset(configdata.DATA) From d208c48532bba60c5bc3dd1dc4056adf7c100582 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 17 May 2018 17:40:09 +0200 Subject: [PATCH 11/11] Update changelog --- doc/changelog.asciidoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index 3f7a3abc7..417e3e450 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -45,6 +45,12 @@ Added - Work around a bug in Qt 5.11 where only the top/bottom half of the window is used. +Fixed +~~~~~ + +- Work around an issue in Qt 5.11 where e.g. activating JavaScript per-domain + needed a manual relaod in some cases. + v1.3.0 ------