Merge from main repo master, resolved conflict in webenginetab.py
This commit is contained in:
commit
4966a70709
@ -36,6 +36,21 @@ Changed
|
|||||||
- There's now completion for commands taking a variable count of arguments
|
- There's now completion for commands taking a variable count of arguments
|
||||||
(like `:config-cycle`).
|
(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.
|
||||||
|
|
||||||
|
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
|
v1.3.0
|
||||||
------
|
------
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
attrs==18.1.0
|
attrs==18.1.0
|
||||||
flake8==3.5.0
|
flake8==3.5.0
|
||||||
flake8-bugbear==18.2.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-comprehensions==1.4.1
|
||||||
flake8-copyright==0.2.0
|
flake8-copyright==0.2.0
|
||||||
flake8-debugger==3.1.0
|
flake8-debugger==3.1.0
|
||||||
|
@ -5,4 +5,4 @@ packaging==17.1
|
|||||||
pyparsing==2.2.0
|
pyparsing==2.2.0
|
||||||
setuptools==39.1.0
|
setuptools==39.1.0
|
||||||
six==1.11.0
|
six==1.11.0
|
||||||
wheel==0.31.0
|
wheel==0.31.1
|
||||||
|
@ -9,7 +9,7 @@ isort==4.3.4
|
|||||||
lazy-object-proxy==1.3.1
|
lazy-object-proxy==1.3.1
|
||||||
mccabe==0.6.1
|
mccabe==0.6.1
|
||||||
-e git+https://github.com/PyCQA/pylint.git#egg=pylint
|
-e git+https://github.com/PyCQA/pylint.git#egg=pylint
|
||||||
python-dateutil==2.7.2
|
python-dateutil==2.7.3
|
||||||
./scripts/dev/pylint_checkers
|
./scripts/dev/pylint_checkers
|
||||||
requests==2.18.4
|
requests==2.18.4
|
||||||
six==1.11.0
|
six==1.11.0
|
||||||
|
@ -9,7 +9,7 @@ isort==4.3.4
|
|||||||
lazy-object-proxy==1.3.1
|
lazy-object-proxy==1.3.1
|
||||||
mccabe==0.6.1
|
mccabe==0.6.1
|
||||||
pylint==1.8.4
|
pylint==1.8.4
|
||||||
python-dateutil==2.7.2
|
python-dateutil==2.7.3
|
||||||
./scripts/dev/pylint_checkers
|
./scripts/dev/pylint_checkers
|
||||||
requests==2.18.4
|
requests==2.18.4
|
||||||
six==1.11.0
|
six==1.11.0
|
||||||
|
@ -11,7 +11,7 @@ fields==5.0.0
|
|||||||
Flask==1.0.2
|
Flask==1.0.2
|
||||||
glob2==0.6
|
glob2==0.6
|
||||||
hunter==2.0.2
|
hunter==2.0.2
|
||||||
hypothesis==3.56.5
|
hypothesis==3.56.9
|
||||||
itsdangerous==0.24
|
itsdangerous==0.24
|
||||||
# Jinja2==2.10
|
# Jinja2==2.10
|
||||||
Mako==1.0.7
|
Mako==1.0.7
|
||||||
|
@ -1062,6 +1062,21 @@ class WebEngineTab(browsertab.AbstractTab):
|
|||||||
def _on_navigation_request(self, navigation):
|
def _on_navigation_request(self, navigation):
|
||||||
super()._on_navigation_request(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 navigation.url == QUrl('qute://print'):
|
if navigation.url == QUrl('qute://print'):
|
||||||
command_dispatcher = objreg.get('command-dispatcher',
|
command_dispatcher = objreg.get('command-dispatcher',
|
||||||
scope='window',
|
scope='window',
|
||||||
@ -1072,20 +1087,27 @@ class WebEngineTab(browsertab.AbstractTab):
|
|||||||
if not navigation.accepted or not navigation.is_main_frame:
|
if not navigation.accepted or not navigation.is_main_frame:
|
||||||
return
|
return
|
||||||
|
|
||||||
needs_reload = {
|
settings_needing_reload = {
|
||||||
'content.plugins',
|
'content.plugins',
|
||||||
'content.javascript.enabled',
|
'content.javascript.enabled',
|
||||||
'content.javascript.can_access_clipboard',
|
'content.javascript.can_access_clipboard',
|
||||||
'content.javascript.can_access_clipboard',
|
|
||||||
'content.print_element_backgrounds',
|
'content.print_element_backgrounds',
|
||||||
'input.spatial_navigation',
|
'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)
|
changed = self.settings.update_for_url(navigation.url)
|
||||||
if (changed & needs_reload and navigation.navigation_type !=
|
reload_needed = changed & settings_needing_reload
|
||||||
navigation.Type.link_clicked):
|
|
||||||
|
# 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
|
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-66656
|
||||||
self._reload_url = navigation.url
|
self._reload_url = navigation.url
|
||||||
|
|
||||||
|
@ -399,6 +399,7 @@ def version():
|
|||||||
lines += [
|
lines += [
|
||||||
'Frozen: {}'.format(hasattr(sys, 'frozen')),
|
'Frozen: {}'.format(hasattr(sys, 'frozen')),
|
||||||
"Imported from {}".format(importpath),
|
"Imported from {}".format(importpath),
|
||||||
|
"Using Python from {}".format(sys.executable),
|
||||||
"Qt library executable path: {}, data path: {}".format(
|
"Qt library executable path: {}, data path: {}".format(
|
||||||
QLibraryInfo.location(QLibraryInfo.LibraryExecutablesPath),
|
QLibraryInfo.location(QLibraryInfo.LibraryExecutablesPath),
|
||||||
QLibraryInfo.location(QLibraryInfo.DataPath)
|
QLibraryInfo.location(QLibraryInfo.DataPath)
|
||||||
|
@ -874,6 +874,7 @@ def test_version_output(params, stubs, monkeypatch):
|
|||||||
'_git_str': lambda: ('GIT COMMIT' if params.git_commit else None),
|
'_git_str': lambda: ('GIT COMMIT' if params.git_commit else None),
|
||||||
'platform.python_implementation': lambda: 'PYTHON IMPLEMENTATION',
|
'platform.python_implementation': lambda: 'PYTHON IMPLEMENTATION',
|
||||||
'platform.python_version': lambda: 'PYTHON VERSION',
|
'platform.python_version': lambda: 'PYTHON VERSION',
|
||||||
|
'sys.executable': 'EXECUTABLE PATH',
|
||||||
'PYQT_VERSION_STR': 'PYQT VERSION',
|
'PYQT_VERSION_STR': 'PYQT VERSION',
|
||||||
'earlyinit.qt_version': lambda: 'QT VERSION',
|
'earlyinit.qt_version': lambda: 'QT VERSION',
|
||||||
'_module_versions': lambda: ['MODULE VERSION 1', 'MODULE VERSION 2'],
|
'_module_versions': lambda: ['MODULE VERSION 1', 'MODULE VERSION 2'],
|
||||||
@ -897,6 +898,7 @@ def test_version_output(params, stubs, monkeypatch):
|
|||||||
'qt': 'QT VERSION',
|
'qt': 'QT VERSION',
|
||||||
'frozen': str(params.frozen),
|
'frozen': str(params.frozen),
|
||||||
'import_path': import_path,
|
'import_path': import_path,
|
||||||
|
'python_path': 'EXECUTABLE PATH',
|
||||||
}
|
}
|
||||||
|
|
||||||
if params.with_webkit:
|
if params.with_webkit:
|
||||||
@ -951,6 +953,7 @@ def test_version_output(params, stubs, monkeypatch):
|
|||||||
Platform: PLATFORM, ARCHITECTURE{linuxdist}
|
Platform: PLATFORM, ARCHITECTURE{linuxdist}
|
||||||
Frozen: {frozen}
|
Frozen: {frozen}
|
||||||
Imported from {import_path}
|
Imported from {import_path}
|
||||||
|
Using Python from {python_path}
|
||||||
Qt library executable path: QT PATH, data path: QT PATH
|
Qt library executable path: QT PATH, data path: QT PATH
|
||||||
{osinfo}
|
{osinfo}
|
||||||
Paths:
|
Paths:
|
||||||
|
Loading…
Reference in New Issue
Block a user