Commit Graph

9156 Commits

Author SHA1 Message Date
Florian Bruhin
65caf40b06 Remove unneeded import 2018-08-31 11:47:18 +02:00
Florian Bruhin
a13607674f Elide URLs at the end and not in the middle
With a URL like http://www.example.com/long/path/end, an elision like
http://www.example.com/…/path/end would be nicest, but using ElideMiddle means
we can end up with something like http://www.example.…/path/end, which can
possibly trick a user during a phishing attempt.

Instead, let's just always elide at the end, so we end up with
http://www.example.com/long/…. That makes sure the scheme/hostname (which are
most important) are visible as long as possible.

Fixes #4170.
2018-08-30 07:46:01 +02:00
Florian Bruhin
8459afb76e Recognize "Command"/"Cmd" in keybindings 2018-08-28 18:57:47 +02:00
Florian Bruhin
1a7efd92d7 Merge remote-tracking branch 'origin/pr/4140' 2018-08-27 10:06:04 +02:00
Florian Bruhin
bfec5c9f7f
Merge pull request #4153 from vilhalmer/set-desktop-entry-name
Set desktop file name
2018-08-27 09:31:00 +02:00
Florian Bruhin
1dd857a51a Implement MouseLock permission
Closes #3287
2018-08-24 23:31:04 +02:00
vilhalmer
8ac9c72412
Set desktop file name 2018-08-21 21:38:26 -04:00
Jimmy
b192164f2e Don't alphabetically sort tab completion.
`ListCategory` sorts its completion by default, we are already building
the categories in the right order so don't need that.

The test tests the case of where you have 11 tabs and if the model was
sorted the tabs with index 10 and 11 would be sorted before the one with
index 2.

The `random.sample` bit for the tab url and title is to also make sure
the model isn't being sorted on those columns, whithout haveng to write
and all ten lines.
2018-08-19 16:42:36 +12:00
lufte
9c4337c359 Fix "Unnecessary generator - rewrite as a list comprehension." 2018-08-17 18:06:23 -03:00
lufte
fd70d6d2d8 Some memory improvements with generators 2018-08-17 01:00:32 -03:00
lufte
68b9dff747 Perform attribute updates on a record's clone 2018-08-17 00:59:14 -03:00
Florian Bruhin
de8fd25f43 Change key to leave passthrough mode to Shift-Escape
We changed this a while ago in a2f62238f1
already, but Ctrl-V was kind of cumbersome as well, as it conflicted with
pasting.

Shift-Escape is closer to the default leave-mode binding (Escape), and also
unlikely to conflict as it's used for the task manager in Chrome.
2018-08-15 18:34:26 +02:00
Jay Kamat
b962c5c4d9
Merge pull request #4118 from DerJesko/master
Tests for ipv6 support in urlmatch
2018-08-13 14:33:53 -07:00
wishfort36
0e3e41a5e8 Handle nitpicks 2018-08-13 07:50:54 +02:00
wishfort36
b05738dd6c Keep $QUTE_COUNT unset if a count is not given 2018-08-12 22:39:32 +02:00
wishfort36
359eefe1ab Expose $QUTE_COUNT to userscripts 2018-08-12 21:21:01 +02:00
Florian Bruhin
58dffafb1e Merge remote-tracking branch 'origin/pr/4126' 2018-08-12 20:24:56 +02:00
Florian Bruhin
2a1afd5255 Add more detailed info to _chromium_version docs 2018-08-11 22:18:52 +02:00
Jesko
0d78533480 remove useless config option 2018-08-11 19:43:11 +02:00
farlusiva
8e2307c546 Docstring things, change test
- Update the docstring for repeat
 - Remove the blank line after the docstring
 - Update the docstring with scripts/dev/src2asciidoc.py
 - Simplify the test
2018-08-11 19:32:41 +02:00
wishfort36
f27195d360 Have 'times' multiply with [count] by default 2018-08-11 18:31:17 +02:00
wishfort36
961fa07fb0 Core functionality 2018-08-11 17:59:45 +02:00
Jesko
a676cca6c5 changing the texts of the errors 2018-08-10 20:49:20 +02:00
Jesko
b74b069153 removing useless brackets 2018-08-10 19:14:48 +02:00
Florian Bruhin
73ab356756
Merge pull request #4105 from davidv171/master
Show warning when using --backend with a running instance
2018-08-10 06:53:01 +02:00
Florian Bruhin
e927fecbbc Make content.webrtc_public_interfaces_only work on Qt 5.11
69abc9a1a1 added the argument for Qt 5.9, but
didn't add the QWebEngineSetting for Qt >= 5.11.

See #3010, #2163.
2018-08-08 20:48:33 +02:00
Jesko
972b3ae960 changing suggested flaws 2018-08-08 18:30:12 +02:00
Jesko
484a22f111 now declining more wrong ipv6 addresses and cleaning up code 2018-08-08 17:53:14 +02:00
Jesko
4ce5d99b24 match minimizes ipv6 urls 2018-08-08 16:55:43 +02:00
Florian Bruhin
831d3e4044 Add gD keybinding for :tab-give (detach a tab) 2018-08-08 14:23:03 +02:00
Florian Bruhin
7ed71592e0 Handle OSError when creating download directory
Fixes #2570
2018-08-07 16:42:59 +02:00
Florian Bruhin
1cb547a8de Use exist_ok=True for os.path.makedirs
See #2570
2018-08-07 16:42:59 +02:00
Florian Bruhin
b617f1e03c Remove old pylint disable comments 2018-08-06 19:55:27 +02:00
Florian Bruhin
50823b9415 eslint: Disable require-unicode-regexp
See https://eslint.org/docs/rules/require-unicode-regexp
It would be useful to have, but Chromium 49 coming with Qt 5.7 doesn't support
it (Chromium 56 in Qt 5.9 would)...

Also see #3839
2018-08-04 13:43:00 +02:00
David
c692649ad1 Improved the style of the message 2018-08-04 01:12:39 +02:00
David
56caae9c47 Fixed the lack of whitespace between words 2018-08-04 01:09:15 +02:00
David
068ac0df82 Make the line shorter and span over 2 lines 2018-08-04 01:06:38 +02:00
David
1888423332 Added a warning when a second instance is being launched with a backend flag 2018-08-02 22:03:10 +02:00
Florian Bruhin
6b044d4aff Fix indent 2018-07-28 14:47:01 +02:00
Florian Bruhin
ee06ba0140 Handle invalid URLs in acceptNavigationRequest in the tab API 2018-07-28 11:54:58 +02:00
Florian Bruhin
7ac7ccc296 Ignore invalid URLs in acceptNavigationRequest 2018-07-28 09:18:50 +02:00
Florian Bruhin
d830dd69a4 Add workaround comment 2018-07-24 16:04:28 +02:00
Florian Bruhin
90d7ab84b0 Merge remote-tracking branch 'origin/pr/4072' 2018-07-24 16:03:54 +02:00
Florian Bruhin
f69cd2259e Don't require user interaction for clicking qute:// links
See #4090, #4073
2018-07-24 15:44:27 +02:00
Florian Bruhin
e70d796dad Merge remote-tracking branch 'origin/pr/4090' 2018-07-24 15:41:40 +02:00
Florian Bruhin
6c353a140f Bump up yaml_load deadline on CI 2018-07-23 21:32:09 +02:00
Jay Kamat
31d318ee0a
Add catch and error handling for errors in follow_selected click 2018-07-21 13:58:41 -07:00
Jay Kamat
2b8068f6da
Move audible strings into class variables 2018-07-21 12:50:45 -07:00
Florian Bruhin
3b6c4d4b85 Remove unneeded log prefix
We see the function anyways
2018-07-19 00:31:40 +02:00
Florian Bruhin
7d695d40b9 Add a QUTE_FAKE_OPENGL_VENDOR envvar 2018-07-19 00:31:23 +02:00
Florian Bruhin
8a748741ba Fix checks for Nouveau workaround 2018-07-19 00:28:12 +02:00
Florian Bruhin
a72eee8e39 Enable XSS auditing by default
Qt disables this by default, but Chromium does have it enabled.

I also submitted a change to Qt to hopefully enable it by default there
starting with Qt 5.12: https://codereview.qt-project.org/#/c/198354/15

This also removes the claim of having a (big) performance impact, as Chromium's
XSS design doc says the opposite:
https://www.chromium.org/developers/design-documents/xss-auditor
2018-07-17 12:01:17 +02:00
Florian Bruhin
b8c70e5986 Rewrite type comments again 2018-07-16 22:35:40 +02:00
Florian Bruhin
2d65f25a04 Remove unnecessary object inheritance 2018-07-16 14:44:31 +02:00
Florian Bruhin
e4a772c61c Fix try-except-raise for pylint 2.0
See https://github.com/PyCQA/pylint/issues/2302
2018-07-16 14:44:07 +02:00
Florian Bruhin
e0f3285f05 Fix bad-indentation issues for pylint 2.0
See https://github.com/PyCQA/pylint/issues/2301
2018-07-16 14:41:18 +02:00
Florian Bruhin
e50b6912a7 Fix pylint 2.0 useless-return cases
See https://github.com/PyCQA/pylint/issues/2300
2018-07-16 14:33:11 +02:00
Florian Bruhin
b1d508a3af Rewrite pseudo "type:" comments for pylint 2.0
See https://github.com/PyCQA/pylint/issues/2299
2018-07-16 14:15:00 +02:00
Florian Bruhin
9298f3d055 Refactor print handling and fix window.print
On Qt 5.7.1, window.print() caused a CommandError which wasn't handled as the
command was called from accept_navigation_request.

Instead, we now show the dialog in AbstractPrinting and use that directly.
2018-07-16 08:16:18 +02:00
Hendrik R
b1a060fb71 Process all events before issuing an alert
Fixes #2603

The call to processEvents fixes an apparent race condition with some window
managers, e.g. i3. QT seems to be thinking, that the window is not marked as
urgent and toggles it twice, so synchronizing before issuing the alert makes QT
behave correctly.

This change should not change the behaviour on other systems only correct the
fault reported in #2603.
2018-07-15 14:31:03 +02:00
Florian Bruhin
d1a25b6c3f Release v1.4.1 2018-07-11 17:17:51 +02:00
Florian Bruhin
43e58ac865 CVE-2018-10895: Fix CSRF issues with qute://settings/set URL
In ffc29ee043 (part of v1.0.0), a
qute://settings/set URL was added to change settings.

Contrary to what I apparently believed at the time, it *is* possible for
websites to access `qute://*` URLs (i.e., neither QtWebKit nor QtWebEngine
prohibit such requests, other than the usual cross-origin rules).

In other words, this means a website can e.g. have an `<img>` tag which loads a
`qute://settings/set` URL, which then sets `editor.command` to a bash script.
The result of that is arbitrary code execution.

Fixes #4060
See #2332
2018-07-11 17:05:23 +02:00
Florian Bruhin
b9e3d3cab9 Add workaround for chrome-extension:// URLs
Fixes #4049
2018-07-09 12:29:35 +02:00
Florian Bruhin
274b66ec46 Strip trailing newlines from pastebin URL 2018-07-08 22:09:56 +02:00
Markus Ongyerth
40b2d03688 make the host_blocker aware of patterns
Add an additional argument to is_blocked for the current url, and enable
the host_blocking.enabled property to be set per domain.
This allows to bypass host blocking for specific domains
2018-07-08 16:17:24 +02:00
Florian Bruhin
0a31e19eda Handle download errors when the reply is already gone
Fixes #1270
2018-07-03 17:16:02 +02:00
Florian Bruhin
0f037fb415 Release v1.4.0 2018-07-03 15:44:44 +02:00
Florian Bruhin
8cf22c85e0 Merge remote-tracking branch 'origin/pr/4019' 2018-07-03 13:52:24 +02:00
Florian Bruhin
d861c097b1 Support new dead keys added in Qt 5.11 properly
See https://codereview.qt-project.org/#/c/207231/
2018-07-02 22:32:59 +02:00
Florian Bruhin
ad19833e34 Revert "Add workaround for PyQt 5.11 headerDataChanged bug"
PyQt 5.11.1 has already been released, with the bug fixed.

This reverts commit 291763a55643342a6f977ce2a12dcc6f4badbe8a.
2018-07-02 22:32:59 +02:00
Florian Bruhin
eca08f064b Add workaround for PyQt 5.11 headerDataChanged bug
https://www.riverbankcomputing.com/pipermail/pyqt/2018-June/040445.html
2018-07-02 22:32:59 +02:00
Florian Bruhin
c3455d9082 Add a wrapper around sip
Starting with PyQt 5.11, the sip module now is bundled with PyQt as PyQt.sip.
Having a qutebrowser.qt also helps with #3625, see #995
2018-07-02 22:32:59 +02:00
Florian Bruhin
a7af5195d1 Set title when showing PDF.js error page
Fixes #3894
2018-06-28 11:22:44 +02:00
Florian Bruhin
e9c78b29ed Ignore Python 3.7 collections.abc warning
Related issues/PRs:
https://github.com/yaml/pyyaml/pull/181
https://github.com/pypa/setuptools/issues/1401
https://github.com/pallets/markupsafe/pull/98
https://github.com/yaml/pyyaml/pull/181
https://github.com/pallets/jinja/pull/867
2018-06-27 16:01:21 +02:00
Florian Bruhin
2f612aa6df Update comment 2018-06-26 15:54:56 +02:00
Florian Bruhin
8519aa940f Decorate slots properly 2018-06-26 10:40:13 +02:00
Florian Bruhin
ea4ee6f00b Use the url_changed signal in the tab API 2018-06-26 10:39:33 +02:00
Florian Bruhin
1536843f33 Only get greasemonkey object once 2018-06-26 10:39:04 +02:00
Florian Bruhin
61da5d0c7c Merge remote-tracking branch 'origin/pr/4017' 2018-06-26 10:37:17 +02:00
Florian Bruhin
85a9f6a08a Fix lint 2018-06-26 10:23:48 +02:00
Jimmy
c43d173197 greasemonkey: s/userscripts/greasemonkey_scripts/
No need to confuse developers as well as users.
2018-06-26 16:42:31 +12:00
Jimmy
ee2c765859 greasemonkey: check _widget is not deleted
Just for good luck.

No crash has been reported here but it is a common pattern for functions
called from signals.
2018-06-26 16:42:31 +12:00
Jimmy
6f1232e621 greasemonkey: move 5.7.1 injection method into _WebEngineScripts
Moves the 5.8 check to `_WebEngineScripts.init()`.

Changes `_inject_userscripts` to allow for the two code paths. With
5.7.1 we need to specify the injection point and not clear all scripts
for each call, since we have to call it three times.

Change the 5.8+ hook to call a new method which passes all the scripts
into `_inject_userscripts` so that doesn't have to have a fallback
conditional inside it because thats an inversion of responsibility!

Pulling the remove scripts part into a seperate function and making it
the callers responsibilty to call that first would tidy it up a little
more but meh.

I was worried about just doing `_widget.page().urlChanged.connect()`
once at tab init, where before it was connected at page init, because I
was under the impression that the child page can be replaced at any
time, eg when navigating to a new origin. But under manual testing I
didn't see that at all. Maybe I was mistaken or maybe that only started
in a later Qt version.
2018-06-26 16:42:31 +12:00
Jimmy
324966cfe7 greasemonkey: also support qute-js-world on 5.7.1
A straight copy from webengintab.

Yes I know I shouldn't be importing a private thing from webenginetab,
I'm working on refactoring now.
2018-06-26 15:00:35 +12:00
Jimmy
521268a1f7 Update comment. 2018-06-26 15:00:35 +12:00
Jimmy
54ca9b34e5 greasemonkey: enable running in isolated js worlds
QtWebEngine (via chromium) has the ability to run injected scripts in
isolated "worlds". What is isolated is just the javascript environment,
so variables and functions defined by the page and the script won't
clobber each other, or be able to interact (including variables saved to
the global `window` object). The DOM is still accessible from "isolated"
scripts.

This is NOT a security measure. You cannot put untrusted scripts in one
of these isolated worlds and expect it to not be able to do whatever
page js can do, it is just for namespacing convenience. See
https://stackoverflow.com/questions/9515704/insert-code-into-the-page-context-using-a-content-script
for some examples of how to inject scripts into the page scope using DOM
elements.

Now you can specify the world ID in a `@qute-js-world` directive like:

```
// ==UserScript==
// @name         Do thing
// @match        *://some.site/*
// @qute-js-world 1234
// ==/UserScript==
document.body.innerHTML = "<strong>overwritten</strong>"
```

The QtWebEngine docs say worldid is a `quint32` so you can put whatever
number (positive, whole, real) you want there. I have chosen to allow
the `qutebrowser.utils.usertypes` enum as aliases for IDs that are
predefined in
`qutebrowser.browser.webengine.webenginetab._JS_WORLD_MAP`. So you can
pass `main`, `application`, `user` or `jseval` in there too. `main` (0)
is the default one and is the only one in which JS disabled when
`content.javascript.enabled` is set to `false`. All others are still
enabled.

I'm not sure whether using any of those already-named worlds makes
sense, apart from `main`. We could stop people from using them I
suppose. Another option is to allow people to pass in `*` as a value to
have scripts put into their own little worlds, probably backed by a
counter in the GreaseMonkeyManager class.

Chrome docs: https://developer.chrome.com/extensions/content_scripts#execution-environment
Webengine docs: https://doc.qt.io/qt-5/qwebenginescript.html#details
2018-06-26 15:00:35 +12:00
Florian Bruhin
876aa5a9b1 Fix lint 2018-06-25 22:51:55 +02:00
Florian Bruhin
81b3ef937e Move handling of certificate errors to webenginetab 2018-06-25 21:04:32 +02:00
Florian Bruhin
8a4bba11ed Disable certificate workaround on Qt >= 5.9
Fixes #4020
2018-06-25 20:35:48 +02:00
Jay Kamat
da0a6305df
Fix crash when tab is closed after a per-domain forced reload 2018-06-25 12:45:17 -04:00
Florian Bruhin
6c9e23af4a eslint: Turn off max-lines-per-function 2018-06-25 08:14:02 +02:00
Florian Bruhin
f2f481d991 Support URL patterns for permissions and ssl_strict
See #3636
2018-06-24 21:38:37 +02:00
Florian Bruhin
f5e69b2174 Show inspector after creating it 2018-06-24 19:57:52 +02:00
Florian Bruhin
e6e844b039 Support URL patterns for content.headers settings
See #3636
2018-06-24 19:54:24 +02:00
Jay Kamat
454c532668
Fix behavior when toggling stacking behavior in a single tab 2018-06-23 12:33:35 -04:00
Florian Bruhin
a02c25dfb1 Don't escape URLs for qute://history
We only use the URL to set a 'href' attribute, which does not need escaping.

See #4011
Fixes #4012
2018-06-23 14:27:07 +02:00
Florian Bruhin
d2254ca48b Release v1.3.3
(cherry picked from commit ad9b50601c82f66646088e9ebdd66613eb2e93e2)
2018-06-21 23:32:56 +02:00
Florian Bruhin
0864ad4069 Fix shadowing of 'html' name 2018-06-21 22:28:27 +02:00
Florian Bruhin
5a7869f2fe Fix XSS issue on qute://history
Fixes #4011
2018-06-21 21:20:19 +02:00
Florian Bruhin
62d8b5b574 Don't depend on PyQt5.QtQuickWidgets to get RWHV
Some distributions (at least FreeBSD) don't package that module, so let's not
rely on it.
2018-06-21 17:14:29 +02:00
Florian Bruhin
c87757a913 Revert "Properly add QtQuickWidgets dependency"
Looks like FreeBSD doesn't have QtQuickWidgets packaged at all, so let's do the
same without requiring it...

This reverts commit e5405f0ae9.
2018-06-21 16:35:29 +02:00
Florian Bruhin
9f5ca475c9 Don't try to set focus if prev_focus is None 2018-06-21 01:44:15 +02:00
Florian Bruhin
e7a300865c Fix lint 2018-06-21 01:43:09 +02:00
Florian Bruhin
e5405f0ae9 Properly add QtQuickWidgets dependency 2018-06-21 00:21:52 +02:00
Jay Kamat
0e7bbccd71
Fix stacking tabs setting with new_tab prev 2018-06-19 12:10:21 -04:00
Jay Kamat
1919029858
Add setting for controlling stacking of new tabs 2018-06-18 18:09:13 -04:00
Florian Bruhin
3399f2df96 Always clear searches between page loads
Looks like this wasn't properly fixed in Qt for some reason.
Fixes #3693
See #2728 and bef372e5f5
2018-06-17 21:03:44 +02:00
Florian Bruhin
2029f52fdc Show cause when ~/.netrc can't be read 2018-06-17 20:53:29 +02:00
Florian Bruhin
663d1a4d2f Read dictionaries from /usr/share/qt on Qt >= 5.10
Fixes #3759
Supersedes #3762
See #2939, #4003
2018-06-17 20:27:52 +02:00
Philip
0a9806daf3 Fixed crash which could occur if user adds nonexistent category to url.open_categories_shown 2018-06-17 10:42:45 +02:00
Philip
a2b1e041d6 Implemented use of the order of url.open_categories_shown in the :open dialogue.
Reworded the description of this option to match.
2018-06-17 10:29:57 +02:00
Philip
a62aeb4abe Added support for searchengines listing in :open dialogue. Added settings for selecting what categories are shown in the :open dialogue. 2018-06-17 05:33:53 +02:00
Florian Bruhin
7654467f36 Remove unused import 2018-06-14 17:43:20 +02:00
Florian Bruhin
07cf2f5b60 Unconditionally restore mode after prompt 2018-06-14 16:09:30 +02:00
Florian Bruhin
4dddc07753 Make sure modeman.enter(KeyMode.normal) does something sensible 2018-06-14 16:09:26 +02:00
Florian Bruhin
1335fccba1 Merge remote-tracking branch 'origin/pr/3590' into tab-mode 2018-06-14 15:40:58 +02:00
Florian Bruhin
e4e982c0a7 Remove unused variable 2018-06-14 14:58:07 +02:00
Florian Bruhin
868cd115be Remove old focus handling code 2018-06-14 14:58:07 +02:00
Florian Bruhin
cec63ea449 Merge remote-tracking branch 'origin/pr/3906' 2018-06-14 14:49:30 +02:00
Jay Kamat
e5b6552568
Clean up and simplify some logic 2018-06-13 15:37:32 -07:00
Florian Bruhin
a0adee55c9 Quit hard on ignored exceptions
We can't realistically shut down cleanly because we most likely haven't init'ed
properly yet.

Fixes #3993
2018-06-13 21:13:39 +02:00
Florian Bruhin
cb2881e0d7 Use info loglevel for :debug-cache-stats
Closes #3994
2018-06-13 19:10:01 +02:00
Florian Bruhin
1541088e76 Use -webkit-filter on old Qt 2018-06-12 17:01:34 +02:00
Florian Bruhin
c37134861e Use ES6 template strings 2018-06-12 16:49:54 +02:00
Florian Bruhin
772654bcae Use calculated background color for newer Qt versions 2018-06-12 16:46:03 +02:00
Florian Bruhin
68a7387b6b Merge remote-tracking branch 'origin/pr/3940' 2018-06-12 16:32:05 +02:00
Florian Bruhin
a1a5885367 Set parents for tab sub-objects 2018-06-12 14:09:06 +02:00
Florian Bruhin
a6db700886 Fix HTML5 fullscreen 2018-06-12 13:44:47 +02:00
Slackhead
088c7b235d fix for qt 5.7.1 2018-06-12 11:22:41 +01:00
Florian Bruhin
6faff11243 Improve error messages with backend conditionals 2018-06-12 11:10:03 +02:00
Florian Bruhin
3b0c8e46a3 Add an initial cookie filter for Qt 5.11
See #3010
2018-06-12 09:36:05 +02:00
Slackhead
35a1e118f8 combine style nodes 2018-06-12 04:25:13 +01:00
Florian Bruhin
093f07f552 Add content.canvas_reading setting
See #2377
Closes #2235
2018-06-11 23:28:04 +02:00
Florian Bruhin
ad7e080827 Fix lint 2018-06-11 21:47:38 +02:00
Florian Bruhin
67c67db230 Handle multiple visible children when finding lost focusProxy
When we click a QTBUG link (to open in a new tab) from Qt's codereview, we get
two RWHV objects which both are visible.

Experimenting with .setEnabled(False) it looks like it's (hopefully always...)
the last one which is the one to use.
2018-06-11 21:43:27 +02:00
Florian Bruhin
c328d54ebe Add a lost-focusproxy debug flag 2018-06-11 21:27:08 +02:00
Florian Bruhin
a6b314ae91 Don't connect Qt 5.11 signals on PyQt 5.10
Apparently the signal attributes already exist with PyQt 5.10 (*sigh*) but PyQt
doesn't know what to do with the arguments, causing this to happen:

TypeError: unable to convert a C++ 'QWebEngineRegisterProtocolHandlerRequest'
instance to a Python object
2018-06-11 21:21:41 +02:00
Florian Bruhin
d42934af08 Turn off FocusOnNavigationEnabled on Qt 5.9
This way we get the same behavior with Qt 5.9 and 5.10 at least, leaving only
5.7 if we pretend that 5.8 never existed.
2018-06-11 20:28:00 +02:00
Florian Bruhin
141afff0c6 Add a content.desktop_capture setting
See #2939
2018-06-11 20:18:57 +02:00
Florian Bruhin
69abc9a1a1 Add a content.webrtc_public_interfaces_only option
See #3010
Fixes #2163
2018-06-11 19:44:45 +02:00
Florian Bruhin
3bf89bcea4 Add content.autoplay option
See #3010
Closes #1643
2018-06-11 19:32:34 +02:00
Florian Bruhin
c5b7ed350e Make it possible to provide a converter for websettings 2018-06-11 19:14:31 +02:00
Florian Bruhin
263d298449 Remove the content.developer_extras setting 2018-06-11 18:09:24 +02:00
Florian Bruhin
e5fbb9f68a Remove pyqtSlot annotations for new types 2018-06-11 18:09:24 +02:00
Florian Bruhin
54011782c8 webenginetab: Move scripts to separate object 2018-06-11 18:09:24 +02:00
Florian Bruhin
b3749df009 webenginetab: Move permissions to separate object 2018-06-11 18:09:18 +02:00
Florian Bruhin
4186577928 Add support for navigator.registerProtocolHandler
See #3010
2018-06-11 18:09:18 +02:00
Florian Bruhin
c020160f75 Add support for navigator.webkitPersistentStorage.requestQuota
See #3010
2018-06-11 18:09:18 +02:00
Florian Bruhin
4ea957b68b Allow Qt 5.11 for backends in configdata.yml 2018-06-11 18:09:18 +02:00
Florian Bruhin
05e73872b6 Add blocking=True to shared.feature_permission 2018-06-11 16:37:53 +02:00
Florian Bruhin
be95d6f505 Remove moved audio API 2018-06-11 16:07:32 +02:00
Florian Bruhin
b954fd4b15 Move _on_feature_permission_requested to WebEngineTab 2018-06-11 16:06:58 +02:00
Florian Bruhin
8964845c18 Remove unused import 2018-06-11 15:30:01 +02:00
Florian Bruhin
c7f57bc111 Tell pylint to shut up about a shadowed argument 2018-06-11 15:29:35 +02:00
Florian Bruhin
f052eff038 Stop using view-source: scheme for Pygments-highlighted URLs
Doing so causes QtWebEngine to load its own view-source: page even if we supply
custom data.

Instead we pass the original page's URL (to not regress #2948).

This partially reverts #3521 and reintroduces TabData.viewing_source.

However, on QtWebEngine we can still ":view-source --pygments" and then
":view-source" (with or without "--pygments") again, because the bit gets
cleaned in _on_load_started.

See #3654.
2018-06-11 15:18:00 +02:00
Florian Bruhin
6e23a6b958 Merge remote-tracking branch 'origin/pr/3654' 2018-06-11 14:56:32 +02:00
Florian Bruhin
cbd9e36e0f Fix typo 2018-06-11 14:13:11 +02:00
Florian Bruhin
b63e06561d Only consider visible render widgets for lost focusProxy
Otherwise, when commenting out the focusProxy way above, and using "foo !npm"
with DuckDuckGo, we get two children (one visible, one invisible).
2018-06-11 14:00:02 +02:00
Florian Bruhin
49b6a512c2 Add missing docstring 2018-06-11 13:17:14 +02:00
Florian Bruhin
2934f4a1ca Merge remote-tracking branch 'origin/pr/3973' 2018-06-11 12:34:18 +02:00
Florian Bruhin
8376278961 Update docs 2018-06-11 12:14:24 +02:00
Florian Bruhin
a1fcdbcfd1 Move muted/audible API to own ".audio" object 2018-06-11 12:12:37 +02:00
Florian Bruhin
1c8d470bd7 Merge remote-tracking branch 'origin/pr/3908' 2018-06-11 12:06:09 +02:00
Florian Bruhin
3999802c71 Add missing 'return' 2018-06-11 11:35:35 +02:00
Florian Bruhin
cf8dbd8bfd Move pressing Enter into a method 2018-06-11 11:35:16 +02:00
Florian Bruhin
7f69920158 Merge remote-tracking branch 'origin/pr/3947' 2018-06-11 11:29:14 +02:00
Jimmy
addd2e74ce Allow negating categories in --logfilter
Sometimes I want to see all the logs _except_ for the sql stuff and
"marked cookies as dirty". with this you should be able to pass
`--logfilter \!sql,save`.
2018-06-11 21:26:54 +12:00
Florian Bruhin
f034abe6a1 Handle showing/hiding of the inspector properly 2018-06-11 11:07:14 +02:00
Florian Bruhin
1ba2e3e24b Implement Qt 5.11 devtools support
See #3010
2018-06-11 11:07:14 +02:00
Jay Kamat
315ed519ee
Use ctrl-enter in all cases 2018-06-10 16:27:56 -07:00
Florian Bruhin
c4add62301 Merge remote-tracking branch 'origin/pr/3825' 2018-06-10 17:30:44 +02:00
Florian Bruhin
3bffe1ccf8 Release v1.3.2 2018-06-10 15:59:50 +02:00
Jay Kamat
11d8df0e3e
Simplify logic and resolve style issues 2018-06-09 16:45:42 -07:00
Jay Kamat
de127497a2
Press enter to follow links instead of using js
This codepath may trigger a crash which was fixed by
0e75f3272d.
However, this commit does not make it more likely to happen, and this
patch was backported into arch (at least).

In the future, we may be able to use <enter> on qtwebkit with js,
without triggering this crash
2018-06-09 15:42:44 -07:00
Florian Bruhin
7fdeeb25b7 Merge remote-tracking branch 'origin/pr/3793' 2018-06-09 22:59:52 +02:00
Florian Bruhin
96739d0013 Merge remote-tracking branch 'origin/pr/3864' 2018-06-09 21:29:15 +02:00
Florian Bruhin
dcb1191f93 Remove the deprecated :tab-detach 2018-06-09 21:25:09 +02:00
Slackhead
c3771ca2b2 double quoted and className corrected 2018-06-09 19:45:48 +01:00
Florian Bruhin
313cc42d8a Link to code.qt.io instead of GitHub for _chromium_version 2018-06-09 20:26:12 +02:00
Florian Bruhin
7ce7176475 Fix lint 2018-06-09 20:20:08 +02:00
Florian Bruhin
1b48b67443 Rename reporter.escape_quits to input.escape_quits_reporter 2018-06-09 20:19:32 +02:00
Florian Bruhin
486a92a710 Merge remote-tracking branch 'origin/pr/3944' 2018-06-09 20:18:25 +02:00
Florian Bruhin
b0325e17b7 Add a YamlConfig._migrate_bool helper 2018-06-09 19:57:11 +02:00
Florian Bruhin
7949335a2b Remove unused import 2018-06-09 19:51:05 +02:00
Florian Bruhin
6e954a1596 Allow to force software rendering with wayland on Qt 5.11
Closes #2932 (hopefully for the last time)
2018-06-09 16:50:48 +02:00
Florian Bruhin
88f2873a79 Allow more values for the qt.force_software_rendering setting 2018-06-09 16:21:10 +02:00
Jay Kamat
5d38d28fee
Fix incorrect usage of tab_id 2018-06-08 20:59:25 -07:00
Florian Bruhin
d32d541ac0 Further simplify getting focusProxy children 2018-06-08 17:10:47 +02:00
Florian Bruhin
cc497bf2ea Improve RWHV typecheck for focusProxy 2018-06-08 15:13:48 +02:00
Florian Bruhin
9725d9ce33 Exclude QMenu when trying to find the missing focusProxy 2018-06-08 14:55:34 +02:00
Florian Bruhin
1531961aeb Show children in focusProxy workaround 2018-06-08 14:40:59 +02:00
Florian Bruhin
91b4106dcf Fix check for reloads on Qt < 5.11
This was broken in 6ccd69dad2
2018-06-08 08:53:10 +02:00
Florian Bruhin
4614ad5063 Remove unused import 2018-06-07 18:01:29 +02:00
Florian Bruhin
d541634a7c Avoid hacks for changing per-domain settings on Qt 5.11.1 2018-06-07 17:51:21 +02:00
Florian Bruhin
b1506274c5 Implement a better workaround for chrome-error:// URLs
It looks like chrome-error://chromewebdata/ triggers another invalid scheme
load which is why the endless loop happens. When we install a custom scheme
handler for chrome-error:// we can at least show an error page.
2018-06-07 16:03:25 +02:00
Florian Bruhin
89f4333df1 Make sure external schemes are clickable via hints
This issue was probably introduced in 545539f28d
- with JavaScript, we can't "click" on an external link.

There might be a better solution using
QWebEngineSettings::setUnknownUrlSchemePolicy(QWebEngineSettings::AllowAllUnknownUrlSchemes)
temporarily when using hints with PyQt 5.11.

Fixes #2833
2018-06-07 14:33:49 +02:00
Florian Bruhin
0c0d204fd4 Add a workaround for chrome-error:// loops on Qt 5.11
See #3661
2018-06-07 13:49:33 +02:00
Florian Bruhin
0e9159e8e8 Revert "Fix Qt 5.11 issues with clicking invalid links"
This reverts commit 1956590df84a72c7f9a516e805d01529291fccf8.

Turns out the actual issue wasn't due to *invalid* links - it's with links
which have an unknown scheme.

There's still a change in behavior between Qt 5.10 and 5.11 though: Invalid
links are apparently not passed to acceptNavigationRequest (sometimes?) so we
don't show an error message. Instead, we just load about:blank. However,
Chromium does that too and we can't handle a real click easily, so let's just
ignore that one.

See #3661
2018-06-07 13:49:13 +02:00
Florian Bruhin
3d53d0d2c5 Fix Qt 5.11 issues with clicking invalid links
See #3661
2018-06-07 13:48:04 +02:00
Florian Bruhin
456fdc55cc Only set PseudoLayout with Qt 5.11 2018-06-06 20:26:12 +02:00
Florian Bruhin
7e31897dcc Fix lint 2018-06-06 20:26:12 +02:00
Florian Bruhin
5147fc832c Handle resizing via PseudoLayout
This fixes the scenario where we just get a grey view when opening a link in a
tab from DuckDuckGo.
2018-06-06 20:26:12 +02:00
Florian Bruhin
ec6c5ebb69 Try harder to get the RenderWidgetHostViewQt 2018-06-06 20:26:12 +02:00
Florian Bruhin
34d054e8a5 Revert "Use WrapperLayout instead of PseudoLayout"
This reverts commit 6cc920472ee4170b257a0b588687b175162e83df.

Since self._widget can go stale in the layout, we need to somehow solve this differently...
2018-06-06 20:26:12 +02:00
Florian Bruhin
e0213e7447 Use WrapperLayout instead of PseudoLayout 2018-06-06 20:26:12 +02:00
Florian Bruhin
cee88cd7ca Initial proof of concept for pseudo layout
Fixes #3920 - hopefully properly this time...
2018-06-06 20:26:12 +02:00
Florian Bruhin
982a42d453 Unbind Ctrl-Shift-Tab by default 2018-06-05 11:33:34 +02:00
Slackhead
7858bb97d1 Change default bg colour to #000 2018-05-31 06:33:48 +01:00
Slackhead
8c1080de97 Change filter value to 85% to really darken it 2018-05-31 05:58:05 +01:00
Slackhead
d37b2713cf Change min-width to 0.2em 2018-05-31 05:45:43 +01:00
Slackhead
41a092cd80 Tweak style/animation 2018-05-31 04:50:41 +01:00
Slackhead
0fcbc209bb Add animation stopper/starter 2018-05-31 04:50:41 +01:00
Slackhead
1578a4836c Add fallback colours if inherit fails 2018-05-31 04:50:41 +01:00
Slackhead
f34d1b6ce1 Remove inherit styles 2018-05-31 04:50:41 +01:00
Slackhead
4cc2b919fa Change caret style 2018-05-31 04:50:41 +01:00
Florian Bruhin
b3c95c1668 Release v1.3.1
(cherry picked from commit ac29c579ff6a5d54c97513280fd1d8d187304160)
2018-05-29 11:15:15 +02:00
Jay Kamat
28fce9a7cb
Add support for opening background tabs in 5.11
Adding more workarounds to 442bdd4a4f153c9c5b728, *sigh*
2018-05-26 13:52:57 -07:00
Jay Kamat
3392d82f50
Merge branch 'master' of https://github.com/qutebrowser/qutebrowser into jay/tab-bg-focus 2018-05-26 13:52:12 -07:00
Jay Kamat
c33a887b2d
Add support for following tab selected elements to :follow-selected 2018-05-25 12:39:36 -07:00
Jay Kamat
cd56b97e7d
Add an option to disable escape in the report dialog 2018-05-24 11:50:27 -07:00
Florian Bruhin
12e0edbcd0 Fix lint 2018-05-24 08:47:31 +02:00
Jay Kamat
40e391e199
Prevent closing :report dialog when pressing <escape> 2018-05-23 21:25:43 -07:00
Florian Bruhin
17cfb0d39c Add some more logging for #3920 2018-05-23 21:31:18 +02:00
Florian Bruhin
7162f15348 Use functools instead of a lambda for QTimer
It reads nicer, and this is also speculative fix for #3896 as PyQt5 is
hopefully better at disconnecting partial-objects from dead objects than it is
with lambdas.
2018-05-23 09:44:44 +02:00
Jay Kamat
74ea696a5c
Merge branch 'master' of https://github.com/qutebrowser/qutebrowser into jay/tab-bg-focus 2018-05-22 23:17:52 -07:00
Jay Kamat
2f76ef1e53
Revert "Only apply workaround for QTBUG-68076 on non-background tabs"
This reverts commit 77c8575a88.
2018-05-22 23:17:43 -07:00
Florian Bruhin
29ad252278 Handle ² keypress correctly
Turns out str.isdigit() also handles ² as a digit, but int('²') causes a
ValueError.

Here we use `string.digits` instead, which is '0123456789'.

Fixes #3743
2018-05-22 12:25:45 +02:00
Florian Bruhin
71ad8bdb47 Properly work around Qt 5.11 keyboard focus issues
Please let this be the last attempt... :D

Fixes #3939
Supersedes #3921
Reverts ae295a7f65
See #3661

This should not regress #3872. Might affect #3834 in some way.
2018-05-22 09:36:14 +02:00
Florian Bruhin
89f019b710 Remove unneeded "except ... as e:" assignments 2018-05-21 20:03:18 +02:00
Jimmy
47446baf29 s/obj/target/
Would a bit of consistency in variable names be too much to ask?
2018-05-21 21:23:38 +12:00
Jimmy
d162e01422 Greasemonkey: remove extra window scope IIFE
Also change the block scoped `window` declaration to be const because it
seemed like a good idea. The real window seems to just silently ignore
attempts to overwrite it.
2018-05-20 18:42:40 +12:00
Jimmy
b0d1a137da Greasemonkey: Don't attempt scope isolation on webkit
Since the JSCore used by WebKit 602.1 doesn't fully support Proxy and I
can't think of a way to provide isolation otherwise just revert to the
old behaviour in that case. I am checking for the specific WebKit
version because I'm pretty sure that version just happened to be
released when Proxy support was only partially done, any later release
will presumably have a newer JSCore where it works.

There I changed the indentation of a block in the jinja template which
will have inflated the diff.

I added mocking of `objects.backend` to the `webview` and
`webenginewebview` fixtures, I am pretty sure they are mutually
exclusive so don't expect any issues from that.

Because of the feature detection being at template compile time I had to
tweak the test setup to be done via a fixture instead of the setupClass
functionality that I was using before.
2018-05-20 18:42:40 +12:00
Jimmy
13249329f7 Greasemonkey: skip window scoping test on webkit
The implementation of Proxy in JSCore used by current QtWebkit (webkit
602.1) doesn't support the `set()` handler for whatever reason. So
instead of testing for a specific behaviour that we can't ensure on that
version let's just skip the tests and handle user complaints with
sympathy.
2018-05-20 18:42:40 +12:00
Jimmy
19242b6cb2 Greasemonkey: fix scoping function decleration.
Apparently making a function like `function foo() {};` in block scope is
illegal. It should be named via assignment.

Switched to an IIFE anyway because it doesn't need a name.
2018-05-20 18:42:40 +12:00
Jimmy
23bfe6daa2 Greasemonkey: fix window proxy for new attributes
Previously scripts were failing to find attributes that they assigned to
window and then tried to use from the global scope. Eg

    window.newthing = function() {...};
    newthing(...);  // newthing is not defined error

This wasn't the case for things that already existed in the global scope
and were just being overwritten.

This change just overrides the `Proxy.has()` function which seems to fix
it. Probably the `while` implementation was failing to pick up new
attributes because of the lack.

I also tweaked some comments and variable names and const-ness to be a
little more production ready.
2018-05-20 18:42:40 +12:00
Jimmy
ab50ad735b Greasemonkey: isolates scripts' writes to window
Since the global namespace of javascript in the browser is accessible
there where issues with scripts clobbering things that the page expected
to be attributes of window pages clobbering things that userscripts
saved to `window`. The latter was occuring with OneeChan. OneeChan was
setting `window.$` to a function that took a css selector and the 4chan
catalog script was setting `window.$` to some object. Since OneeChan was
set to run at document-start this broke OneeChan, switching it to
document-end broke scripts on 4chan.

I used OneeChan and 4chan-X on 4chan as the test case for this and
TamperMonkey as a guide for what is the correct way to handle scoping. I
didn't manage to pick apart just how TamperMonkey does what it does (I
think it might just be the environment that Chrome provides extensions
actually) but I got close to the same behaviour.

TamperMonkey provides a `window` object that appears to be what the
global window looked like before the webpage modified it. The global
scope though does have the pages modifications accessible. If the script
assigns something to an attribute `window` it can see that attribute in
the global scope. This implementation differs from that one in that, to
the scipt, `window` and the global scope always look the same, and that
is the same as the global scope looks in the environment provided by
TamperMonkey.

I am using the ES6 `Proxy` feature to allow the `window` object to look
like the actual (unsafe) one while allowing writing to it that doesn't
clobber the unsafe one. I am then using the ES4 `with` function to make
attributes of that window (proxy) object visible in the scope chain.
There may be other ways to do this without using `with` by using nested
functions and setting `this` creatively. There are notes around
alleging `with` to be various states of uncool[1].

I also ran into an issue where a userscript calling
`window.addEventListener(...)` would fail with `TypeError: Illegal
Execution` which is apparently due to `this` not being set correctly. I
looked at the functions which threw that error and those that didn't and
am using whether they have a `prototype` attribute or not to tell
whether I need to bind them with `window` as `this`. I am not sure how
correct that is but it worked for all the cases I ran into.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with
2018-05-20 18:42:40 +12:00
Jay Kamat
77c8575a88
Only apply workaround for QTBUG-68076 on non-background tabs
Previously, we would focus webviews even if they were in the
background to work around https://bugreports.qt.io/browse/QTBUG-68076.
This adjusts that to only occur when needed.
2018-05-18 10:46:53 -07:00
Joakim Särehag
4966a70709 Merge from main repo master, resolved conflict in webenginetab.py 2018-05-18 13:59:25 +02:00
Florian Bruhin
dacca0d2ed Remove double settings 2018-05-17 15:54:26 +02:00
Florian Bruhin
6ccd69dad2 Fix reload for JavaScript support on Qt 5.11 2018-05-17 15:54:17 +02:00
Florian Bruhin
44d26f77a5 Add workaround for the "split page" Qt bug (QTBUG-68224)
Fixes #3920
2018-05-17 14:21:14 +02:00
Florian Bruhin
6eadff4a10 Add Python executable to :version 2018-05-14 22:13:15 +02:00
Jay Kamat
71d55e9213
Refocus command prompt after a new tab is opened when in command mode 2018-05-11 08:49:13 -07:00
Jay Kamat
95093b82c9
Refocus webview after spawning a background tab 2018-05-10 10:15:01 -07:00
Jay Kamat
538b4fafdb
Revert "Restore focus to webview after clicking tab-bg"
This reverts commit 262cea8e75.
2018-05-10 09:30:28 -07:00
Jay Kamat
563afb277d
Fix style issues 2018-05-10 08:04:48 -07:00
Jay Kamat
4bb048cb6a
Fix mocked tests 2018-05-09 21:41:59 -07:00
Jay Kamat
ae04da7b78
Upgrade indicator to show recentlyAudible status 2018-05-09 18:57:53 -07:00
Jay Kamat
7a297e2e3f
Add support for muting tabs 2018-05-09 18:28:05 -07:00
Jay Kamat
262cea8e75
Restore focus to webview after clicking tab-bg 2018-05-09 11:05:07 -07:00
Joakim Särehag
dc7f39514d pull request #3864, reverted webview changes, fixed regression 2018-05-09 18:28:52 +02:00
Joakim Särehag
72c2962908 removed trailing whitespace 2018-05-09 15:52:22 +02:00
Joakim Särehag
cbf95d76bd Merge branch 'master' of https://github.com/qutebrowser/qutebrowser 2018-05-09 14:37:27 +02:00
Joakim Särehag
0e756d2f68 changes to pull request 3864, window.print for webengine 2018-05-09 14:36:03 +02:00
Florian Bruhin
48c44e1b4d Fix and update docs 2018-05-08 15:22:49 +02:00
Florian Bruhin
8531f89ca3 Merge remote-tracking branch 'origin/pr/3789' 2018-05-08 11:45:20 +02:00
Florian Bruhin
89a1c43b4c Merge remote-tracking branch 'origin/pr/3790' 2018-05-08 11:43:30 +02:00
Florian Bruhin
b718c8b43a Merge remote-tracking branch 'origin/pr/3899' 2018-05-08 11:40:43 +02:00
Jay Kamat
906da44d70
Simplify visited link clearing by looping over connections 2018-05-07 14:10:20 -07:00
Jay Kamat
ca48f9f100
Clear url from visitedLinks if a single url is deleted 2018-05-07 13:48:38 -07:00
Jay Kamat
d0b2360745
Clear visited links db when running :history-clear on webengine 2018-05-07 13:35:41 -07:00
Pol Van Aubel
f1b481dcc7 Short options for --debug and --debug-flags 2018-05-07 22:35:32 +02:00
Pol Van Aubel
431a52da6c Short options for --basedir and --temp-basedir 2018-05-07 22:10:08 +02:00
Florian Bruhin
b9fc068af5 Add a log-requests debug-flag 2018-05-07 10:23:56 +02:00
Florian Bruhin
7762017f00 Release v1.3.0 2018-05-03 19:25:04 +02:00
Florian Bruhin
adf2f9860d Disable spellcheck when it's unneeded.
Fixes #3753
2018-05-03 17:58:56 +02:00
Florian Bruhin
f0f1a4a1d1 Merge remote-tracking branch 'origin/pr/3702' 2018-05-03 17:56:03 +02:00
Florian Bruhin
ae295a7f65 Call setFocus() when navigating
See #3661:
https://github.com/qutebrowser/qutebrowser/issues/3661#issuecomment-386308601
This doesn't seem to fully fix this, but at least the top four failed tests
there...

This should not regress #3872. Might affect #3834 in some way.
2018-05-03 17:43:19 +02:00
Jay Kamat
2663feea2f
Add :hint inputs --first as a default binding to gi 2018-05-03 11:37:31 -04:00
Florian Bruhin
68794cc2e2 Revert "Always set FocusOnNavigationEnabled"
This reverts commit fa41af63b6.

See #3661
Fixes #3872
2018-05-03 15:25:41 +02:00
Florian Bruhin
acdf0a1c60 Call _handle_search before leaving the mode 2018-05-03 15:23:45 +02:00
Florian Bruhin
626abd3c83 Fix lint 2018-05-03 15:18:21 +02:00
Florian Bruhin
979b7cfaba Add a stop-gap solution for AssertionError when retrying downloads
See #3847
2018-05-03 14:52:10 +02:00
Florian Bruhin
2b6b4e82a7 Handle event_target() being None
As a stop-gap solution for #3888
2018-05-03 14:45:55 +02:00
Florian Bruhin
6eb8284fe0 Refactor handling search in command.py 2018-05-03 14:04:56 +02:00
Florian Bruhin
49bdcd5a97 Merge remote-tracking branch 'origin/pr/3796' 2018-05-03 13:58:26 +02:00
Florian Bruhin
106e591a36 Refactor matching of Greasemonkey scripts 2018-05-03 13:53:10 +02:00
Florian Bruhin
4932cc4d24 Merge remote-tracking branch 'origin/pr/3804' 2018-05-03 13:33:08 +02:00
Jimmy
19554ba4a1 Update PyPI api URL.
Flask 1.0 is out, pip made breaking changes, warehouse is a thing, new
requests soon. So
much fun in python world lately.
2018-05-02 23:08:51 +12:00
toofar
d16d9e403a Make HTTPClient follow redirects by default.
Closes #3875

The autoupdator, which uses `qutebrowser.misc.httpclient` has been failing recently because the URL that it hits to check version information is now serving a 301 moved permanently. By default QNetworkRequest doesn't follow redirects so it was getting back a (non-json, despite the request) body pointing to the new location, instead or version information. This changes fixes that by changing HTTPClient to use a QNetworkRequest subclass which follows redirects by default.

It lookes like HTTPClient is currently only used in autoupdate.py, version.py, and crashdialog.py so I don't expect any breakage.

5.6-5.8 Only had a boolean setting available which allows redirects, but not from the https scheme to http, 5.9 introduces a more nuanced setting. I have tested locally on 5.7.1 and 5.10.
2018-05-02 23:08:51 +12:00
Joakim Särehag
199eac2db8 window.print() support for WebEngine 2018-04-24 14:05:53 +02:00
Florian Bruhin
fa41af63b6 Always set FocusOnNavigationEnabled
This fixes some focus issues after Qt 5.11 changes. There might be better ways
to solve them, but for now, this will work.

See https://codereview.qt-project.org/#/c/221408/10 and #3661:
https://github.com/qutebrowser/qutebrowser/issues/3661#issuecomment-375969315

Might also negatively affect #3834 as it essentially reintroduces QTBUG-52999 on
any Qt version: https://bugreports.qt.io/browse/QTBUG-52999

Might be reverted at a later date, but for now, I want an easy way to make tests
work on Qt 5.11 to spot further issues.
2018-04-23 16:57:10 +02:00
Florian Bruhin
bc9a8dd63f Handle focusProxy being None
This fixes running with Qt 5.11

See https://codereview.qt-project.org/#/c/221408/10 and #3661:
https://github.com/qutebrowser/qutebrowser/issues/3661#issuecomment-375969315
2018-04-23 16:52:53 +02:00
Florian Bruhin
6640768860 Enable libGL workaround on any system where it's available
Fixes #3772
2018-04-23 11:20:56 +02:00
Michal Siedlaczek
c94ea5f8d4 Merge remote-tracking branch 'upstream/master' into filter-dict-names
Merging to investigate failed tests that seem unrelated to the PR.
2018-04-21 13:29:18 -04:00
Jay Kamat
1d2dd5bf55
Use CommandDispatcher directly for / searches 2018-04-19 21:16:33 -04:00
rr-
537aa22d64 Change clipboard mocking 2018-04-18 11:00:05 +02:00
Jay Kamat
cbb246fd0b
Update tests for new implementation 2018-04-16 23:28:32 -04:00
Jay Kamat
646e92707a
Call search command directly instead of using arguments 2018-04-16 23:15:56 -04:00
Florian Bruhin
4a93389356 Merge remote-tracking branch 'origin/pr/3813' 2018-04-16 17:04:53 +02:00
rr-
563d9bd097 Fix crash in non-rapid link yanking 2018-04-16 08:52:06 +02:00
Jimmy
c5334fb683 Greasemonkey: use UrlPatterns for match directives
The greasemonkey `@match` directive is used to match urls against
chromium url patterns (as opposed to `@include` which treats its
argument as a glob expression). I was using fnmatch for both here
because I am lazy and knew someone else was going to implement chromium
url patterns for me eventually. Now it is done and I should switch to
using them instead. The most common failing case that this will fix is
something matching on `*://*.domain.com/*` because it wouldn't match
the url with no subdomain.

This codepath is only used on webengine 5.7.1 and webkit backends.
2018-04-14 10:31:20 +12:00
Jay Kamat
0829511221
Merge pull request #3803 from toofar/fix/greasemonkey_includes_fallback
Greasemonkey: fix default include value
2018-04-13 18:26:46 -04:00
Jay Kamat
3f9099613b
Merge pull request #3807 from slackhead/tabs.mute_messages
Add option to mute the Last Tab/First Tab messages when tabs.wrap is false
2018-04-13 12:11:45 -04:00
rr-
d705e600e2 Simplify num in hinting to first_run 2018-04-13 11:03:39 +02:00
Jay Kamat
77fa0730c8
Merge pull request #3802 from jgkamat/jay/tab-take-completion
Fix win_id 0 always being included in :tab-take completion
2018-04-10 16:24:48 -04:00
rr-
46e4aeb3e9 Don't hardcode newline 2018-04-10 08:45:23 +02:00
rr-
945bc44550 Support rapid hinting mode in yanking 2018-04-09 17:20:35 +02:00
Slackhead
62aa9bdbb3 Added debug() logging for next/prev-tab and test scenarios 2018-04-09 02:03:02 +01:00
Slackhead
b7964d9baf Remove first/last tab messages 2018-04-08 10:31:12 +01:00