Commit Graph

15077 Commits

Author SHA1 Message Date
Florian Bruhin
54713f57e5 Merge remote-tracking branch 'origin/pr/3624' 2018-02-25 21:09:56 +01:00
Florian Bruhin
a98466336e Update changelog 2018-02-25 19:58:23 +01:00
Florian Bruhin
52b5492c6a Merge branch 'per-url' 2018-02-25 19:44:51 +01:00
Florian Bruhin
ba88fc43e0 Stabilize error page test 2018-02-25 19:40:38 +01:00
Florian Bruhin
abf4d10d5b Add a test for :set -p with a pattern 2018-02-25 19:33:27 +01:00
Florian Bruhin
4c147b77c1 Add a test for the error page workaround 2018-02-25 16:35:02 +01:00
Florian Bruhin
a32d74e983 Fix lint 2018-02-25 16:08:15 +01:00
Florian Bruhin
d44ff5ba01 Don't load the URL immediately on :undo
On some pages like Qt's Gerrit, Indiegogo or Telegram Web, this caused a crash
with QtWebEngine and Qt 5.10.1 in
QtWebEngineCore::WebContentsAdapter::webContents().

I'm not sure what causes the crash exactly, but I'm guessing it's some kind of
race condition between loading the URL initially and deserializing the history,
which both ends up loading the URL.

Since restoring the history means we end up on the given URL anyways, let's just
not open the URL beforehand, which seems to fix this.

Fixes #3619.
2018-02-25 15:55:20 +01:00
Florian Bruhin
97e00ba4b5 Only reload after setting changes when needed
Apparently, things work fine with Type.link_clicked even if we don't emit
predicted_navigation there...
2018-02-25 15:17:03 +01:00
Florian Bruhin
eade305965 Add a predicted_navigation signal
This is emitted when we know that we're going to visit some URL, but Qt doesn't
know yet. This way, we can change the settings early, and since we know which
settings have actually changed, prevent a change needing a reload in
_on_navigation_request.
2018-02-25 15:04:04 +01:00
Florian Bruhin
65a62b67a5 Go back to using tab.openurl on config changes
This seems to work most reliably at the moment...
2018-02-25 14:45:30 +01:00
Florian Bruhin
638e880604 Improve workaround for missing error pages 2018-02-25 14:45:30 +01:00
Florian Bruhin
bfb3a6594f Try using tab.reload() on setting changes instead 2018-02-25 14:45:19 +01:00
Florian Bruhin
08bc55995b First attempt at reloading pages after setting changes 2018-02-25 14:45:09 +01:00
Jay Kamat
820ffed07f
Remove test blacklists for 5.10 2018-02-23 18:06:57 -05:00
Florian Bruhin
2c96446bb9 Track which settings changed for a URL
This is currently only used so only changed settings are logged, but will used
for more in the next commit.
2018-02-23 18:11:33 +01:00
Florian Bruhin
75b65e2f11 Simplify attribute handling in Web(Kit|Engine)Settings
Let's just have lists in _ATTRIBUTES for WebEngineSettings as well, that allows
us to share some more code.
2018-02-23 17:59:12 +01:00
Florian Bruhin
fc6a0dbe64 Show a simple error page on loading errors without JS
We can't tell what exactly the error is, but it's surely better than nothing.
2018-02-23 17:29:17 +01:00
Florian Bruhin
98b2b67b8b Add tests for per-URL JavaScript settings 2018-02-23 15:08:07 +01:00
Florian Bruhin
3956f81e73 Refactor websettings
This refactors the whole web(kit|engine|) settings mess a bit so there's a
Web(Kit|Engine)Settings object for (non-static) settings set on a
QWeb(Engine)Settings object in Qt. Everything else is set on module-level a bit
less declaratively.

The whole inheritance mess is gone, and we can now also construct a
Web(Kit|Engine)Settings object for a given tab.

Fixes #2701
2018-02-23 09:51:28 +01:00
Florian Bruhin
49ead32f13 Update urlmatch tests for Chromium changes
See:
0ab1294c92%5E%21/
https://bugs.chromium.org/p/chromium/issues/detail?id=812543
2018-02-23 06:31:49 +01:00
Jay Kamat
7ecbae765d
Use baseNode over anchorNode in follow-selected
baseNode isn't documented anywhere that I can find, but it seems to be
getting us what anchorNode used to get us.
2018-02-22 16:42:58 -05:00
Florian Bruhin
eb4c806ddb Add URL pattern to settings output 2018-02-22 08:07:54 +01:00
Florian Bruhin
5c4277aac8 Add some default keybindings for toggling scripts
Those follow the following pattern:

1) "t" for 'toggle"
2) "s" for "scripts", upper-casing ("S") to make the toggle permanent
3) "h" for host, "H" for host with subdomains, "u" for the exact URL
2018-02-22 08:07:54 +01:00
Florian Bruhin
ada15510a7 Update changelog 2018-02-21 11:07:55 +01:00
Florian Bruhin
81c17627f7 Merge remote-tracking branch 'origin/pr/3617' 2018-02-21 11:06:52 +01:00
Florian Bruhin
d2e996a3b3 Merge remote-tracking branch 'origin/pr/3610' 2018-02-21 11:06:05 +01:00
Florian Bruhin
d2182edc7a Merge remote-tracking branch 'origin/pr/3603' 2018-02-21 11:03:37 +01:00
Florian Bruhin
ca26d97589 Merge remote-tracking branch 'origin/pr/3599' 2018-02-21 11:02:51 +01:00
Florian Bruhin
13bd4dd05d Clean up version.pastebin_url in pbclient fixture 2018-02-21 10:49:42 +01:00
Florian Bruhin
2fbc7b4e1d Merge remote-tracking branch 'origin/pr/3594' 2018-02-21 10:15:27 +01:00
Florian Bruhin
8b09003bd1 Merge remote-tracking branch 'origin/pr/3592' 2018-02-21 10:13:26 +01:00
Florian Bruhin
ecfd4a77a0 Merge remote-tracking branch 'origin/pr/3562' 2018-02-21 10:11:40 +01:00
Florian Bruhin
cfeeb7460b Add docstrings to ConfigAPI 2018-02-21 09:14:49 +01:00
Florian Bruhin
ea6a5de374 Update FIXMEs 2018-02-20 23:28:11 +01:00
Florian Bruhin
0d4e20c395 Whitelist config options which support URL patterns 2018-02-20 23:26:22 +01:00
Florian Bruhin
6c5876a494 Fix tests broken by urlmatch trailing slash change 2018-02-20 23:08:09 +01:00
Florian Bruhin
5fbd488fdf Only change settings for main-frame navigations 2018-02-20 22:45:29 +01:00
Florian Bruhin
18848315f5 urlmatch: Make it possible to leave off trailing slash 2018-02-20 22:45:16 +01:00
Florian Bruhin
17b235b523 Add error handling for parsing patterns from YAML 2018-02-20 22:29:21 +01:00
Florian Bruhin
46aeb25e7e Fix lint 2018-02-20 20:55:42 +01:00
Florian Bruhin
439d51875f Add config.pattern() 2018-02-20 20:54:26 +01:00
Florian Bruhin
de38566c11 Update configuring.asciidoc with per-domain settings 2018-02-20 18:43:51 +01:00
Florian Bruhin
3ade923edb Add basic pattern support for config.py 2018-02-20 18:43:42 +01:00
Florian Bruhin
a3dfec20c1 Rename --url to --pattern 2018-02-20 17:56:47 +01:00
Florian Bruhin
f8b1e7739d Update docs 2018-02-20 17:56:47 +01:00
Florian Bruhin
9685445559 Fix issues with Python 3.5 2018-02-20 17:56:47 +01:00
Florian Bruhin
e482c76874 YamlConfig: Refuse to read a newer config version 2018-02-20 17:08:28 +01:00
Florian Bruhin
03114ccf51 Migrate YAML config files in old format 2018-02-20 16:14:06 +01:00
Florian Bruhin
b3d788fead Add YamlConfig._pop_object 2018-02-20 15:46:05 +01:00