Commit Graph

6683 Commits

Author SHA1 Message Date
Florian Bruhin
4d64bcc852 Make version.opengl_vendor() work with an existing context
This makes it possible to use it in :debug-console
2017-06-04 23:05:23 +02:00
Florian Bruhin
a858611bb9 Don't make errors in version.opengl_vendor() fatal
Fixes #2694
2017-06-04 22:55:39 +02:00
Florian Bruhin
722c117d54 Better handling of OpenSSL 1.1
Fixes #2690
2017-06-02 21:52:53 +02:00
Florian Bruhin
a90429fe6e Update needed dependencies
Fixes #2683
2017-06-01 19:30:32 +02:00
Florian Bruhin
a690d242a4 Update webengine dependency message 2017-06-01 14:03:46 +02:00
Florian Bruhin
587861d899 Check for OpenGL ES later
It looks like we still got False on AppVeyor with "versionFunctions: Not
supported on OpenGL ES". Hopefully this helps.
2017-05-31 11:44:34 +02:00
Florian Bruhin
4cec9adce6 Fix lint 2017-05-31 09:44:17 +02:00
Florian Bruhin
912cea6e7d Improve version.opengl_vendor()
On Windows with OpenGL ES we can't use versionFunctions, so we just return None
early.

Also, this fixes some lint and adds a smoke test.
2017-05-30 19:23:27 +02:00
Florian Bruhin
b8a32c577f Merge branch 'nouveau' 2017-05-30 17:36:58 +02:00
Florian Bruhin
62b44c5338 Fix lint 2017-05-30 17:07:31 +02:00
Florian Bruhin
67755e6f6c Add error message for QtWebEngine and Nouveau
See #2368
2017-05-30 16:47:39 +02:00
Florian Bruhin
048aec1aa6 Revert "Reorganize earlyinit checks"
This reverts commit 6f3f9ede01a6b30b105d5110a48cfea592e8db52.
2017-05-30 15:53:29 +02:00
Florian Bruhin
d0461eece3 Reorganize earlyinit checks
We first do all checks we can without knowing the backend, before getting that.
This is because we need to do some more stuff in get_backend now.
2017-05-30 15:53:29 +02:00
Florian Bruhin
1c6fd6f725 Add a backend warning when using QtWebKit 2017-05-30 08:42:37 +02:00
Florian Bruhin
4cb82af11e Add QUTE_FAKE_OS_RELEASE envvar 2017-05-30 07:37:10 +02:00
Florian Bruhin
ef504e5b25 Allow None for WebKitElement.value
This fixes an exception when trying to run :open-editor with a comment field
with QtWebKit:

    16:37:51 DEBUG    webelem    webelem:is_editable:238 Checking if element is editable: <qutebrowser.browser.webkit.webkitelem.WebKitElement html='<div id="writer9997095275-writer" class="writer selectable no-lub put-art-here ui-droppable empty" style="min-height: 146px; width: 1169px;" contenteditable="true"></div>'>
    16:37:51 ERROR    misc       crashsignal:exception_hook:205 Uncaught exception
    Traceback (most recent call last):
      File "/home/florian/proj/qutebrowser/git/qutebrowser/app.py", line 882, in eventFilter
        return handler(event)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/app.py", line 842, in _handle_key_event
        return man.eventFilter(event)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/keyinput/modeman.py", line 337, in eventFilter
        return self._eventFilter_keypress(event)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/keyinput/modeman.py", line 168, in _eventFilter_keypress
        handled = parser.handle(event)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/keyinput/basekeyparser.py", line 307, in handle
        handled = self._handle_special_key(e)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/keyinput/basekeyparser.py", line 136, in _handle_special_key
        self.execute(cmdstr, self.Type.special, count)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/keyinput/keyparser.py", line 44, in execute
        self._commandrunner.run(cmdstr, count)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/commands/runners.py", line 275, in run
        result.cmd.run(self._win_id, args, count=count)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/commands/command.py", line 525, in run
        self.handler(*posargs, **kwargs)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/commands.py", line 1600, in open_editor
        tab.elements.find_focused(self._open_editor_cb)
      File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/webkit/webkittab.py", line 589, in find_focused
        callback(webkitelem.WebKitElement(elem, tab=self._tab))
      File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/commands.py", line 1580, in _open_editor_cb
        text = elem.value()
      File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/webkit/webkitelem.py", line 116, in value
        assert isinstance(val, (int, float, str)), val
    AssertionError: None
2017-05-29 16:56:36 +02:00
Florian Bruhin
7186dcb98f Send crash reports to private pastebin
Fixes #481
2017-05-29 09:20:10 +02:00
Florian Bruhin
b32223acc7 Only inherit private mode when window is set
Otherwise, everything calling _open in a private window (like :quickmark-load)
will open a new window.
2017-05-29 06:37:28 +02:00
Florian Bruhin
8bd6974042 Open a window with an empty session
With general -> save-session on and only private windows open, we can easily get
a session file with "windows: []" in it. If we loaded such a file, we got no
windows at all when qutebrowser started.

Fixes #2664
2017-05-28 11:15:51 +02:00
Florian Bruhin
beb731c04c Move signal connections around 2017-05-28 10:54:16 +02:00
Florian Bruhin
06e754a632 Track HTML fullscreen per-tab
We now automatically get out of fullscreen when switching away from a
fullscreened tab. This also means we can't get into a situation where we can't
leave fullscreen anymore.

Fixes #2379.
2017-05-28 10:51:14 +02:00
Florian Bruhin
a18ebd52a9 Rename TabWidget methods 2017-05-26 18:39:35 +02:00
Florian Bruhin
e96f085f8d Merge commit '38ca583084e89de0da35cb1b626d21b051ea2c70' 2017-05-23 17:43:01 +02:00
Florian Bruhin
af1e1d9239 Merge commit 'c814ced7b35968cfdeb6284cc79168bfffed7c85' 2017-05-23 17:18:55 +02:00
Florian Bruhin
c32c01ffc0 Merge commit '419793c0b9ff4f293babea7623dcaf4787bbaa35' 2017-05-22 07:55:44 +02:00
Jay Kamat
419793c0b9
Misc cleanup and documentation update 2017-05-21 22:42:51 -07:00
Jay Kamat
00f001729b
Fix undo with pinned tabs
Add tests for undo with a pinned tab
Add tests for clone with a pinned tab
2017-05-21 21:03:33 -07:00
Jay Kamat
2a961c3951
Clean up pinned status to a centralized location
- Add support for :tab-clone with pinned tabs

Now tabbed_browser.set_tab_pinned can be called independently.
2017-05-21 19:49:10 -07:00
Florian Bruhin
aa8e6c8d17 Add parsed distribution to version info
Fixes #2369
2017-05-20 23:26:00 +02:00
Florian Bruhin
fe145b66c1 Add a version.distribution()
See #2369
2017-05-20 23:26:00 +02:00
Florian Bruhin
f66c1a0e44 Merge commit '3d9729839d6d9b5ee5d38afdf6ddf410dfca2027' into abbradar/pac-fix 2017-05-19 08:36:39 +02:00
Florian Bruhin
c4fb2bc609 Fix URL/renderer crash tests with Qt 5.9
The behavior in Qt changed there (in a good way), so we need to adjust the tests
accordingly.

Fixes #2514
2017-05-19 08:10:17 +02:00
Nikolay Amiantov
3d9729839d Fix crash on PAC evaluation error 2017-05-18 16:54:49 +03:00
Florian Bruhin
00a7a0cee6 Reorganize pylint config
This removes various stuff we don't need anymoe, and also re-enables and fixes
the import order check.
2017-05-17 20:20:12 +02:00
Florian Bruhin
12520bf4ba Install PyQt from PyPI for pylint
This means we can be sure to have QtWebEngine available and won't have QtWebKit.
2017-05-17 19:08:59 +02:00
Florian Bruhin
608ac89f06 Fix lint 2017-05-17 14:32:13 +02:00
Florian Bruhin
9898d80625 Remove legacy cx_Freeze code
This also removes frozen tests for now. They should be readded at some point...
2017-05-17 11:31:14 +02:00
Florian Bruhin
a48ea597d0 Set websettings on each profile's setting object
Turns out QWebEngineSettings.globalSettings() only sets things on the default
profile. We now get everything from the default profile settings, but set it on
both the default and the private profile.

Fixes #2638

(cherry picked from commit b11a4388cd10b6ff2fd917fca689ebdc50d581ae)
2017-05-17 06:31:51 +02:00
Jay Kamat
5e3c68530a
Regenerate documentation 2017-05-16 21:03:33 -07:00
Florian Bruhin
766a1ebb6d Remove wrong private browsing assertion
This tried to assert that we never create a DiskCache object when private
browsing is turned on. However, when initializing, we still create a global
DiskCache, so this will hit when qutebrowser is started with private browsing
turned on via the config.

We could just not create the DiskCache at all when started in private browsing
mode, however we might still need it later when opening a non-private window.
2017-05-16 11:33:52 +02:00
Florian Bruhin
27aa40428e Also make DownloadManager NAM private if private browsing is on
There's only one global DownloadManager with its own NAM (for downloads not
associated with a page). We can't really decide whether that should be private
or not, so as a best-effort approximation we simply make it private if private
browsing was turned on when starting qutebrowser.
2017-05-16 11:32:35 +02:00
Florian Bruhin
89dc8185b9 Fix lint 2017-05-16 09:08:59 +02:00
Florian Bruhin
1fcce6d87c Change how error page retries work
A simple reload won't work when e.g. the renderer process crashed, so let's try
this instead.

Also, searchFor seemed to be unused.
2017-05-16 07:51:37 +02:00
Florian Bruhin
a4021e8e7a Show error page for renderer process crashes on 5.9
Fixes #2291
2017-05-16 07:50:26 +02:00
Florian Bruhin
bdf56e63dd Fix long line 2017-05-16 07:31:02 +02:00
Florian Bruhin
d0dd1644af Set user agent correctly on QtWebEngine 2017-05-16 06:46:45 +02:00
Florian Bruhin
086139110d Merge branch 'new-private-browsing' 2017-05-16 06:32:15 +02:00
Florian Bruhin
adb924a758 Use -p for :save-session --with-private 2017-05-16 06:28:21 +02:00
Florian Bruhin
658abf7b2b Fix coverage on old Qt versions 2017-05-15 13:39:49 +02:00
Florian Bruhin
e13a5c0f17 Use a list for stylesheet flags
If we simply use sorted() on a dict, we define insert before private-command,
which means the statusbar isn't going to be green when in insert mode while
private browsing.
2017-05-15 11:07:43 +02:00
Florian Bruhin
3cdcc34d1d Update private-browsing option description 2017-05-15 11:07:43 +02:00
Florian Bruhin
c4307c9f03 Fix lint 2017-05-15 11:07:43 +02:00
Florian Bruhin
f6fc2666ce Generate stylesheet for statusbar 2017-05-15 11:07:43 +02:00
Florian Bruhin
73ca884d24 Add a setting for private command mode color
This also refactors how color properties are handled in StatusBar.
2017-05-15 11:07:43 +02:00
Florian Bruhin
3c3f695af4 Fix things pointed out in reviews 2017-05-15 11:07:43 +02:00
Florian Bruhin
6ee382ef30 Sort windows when saving sessions
This should help with flaky tests when the window order changes
2017-05-15 11:02:29 +02:00
Florian Bruhin
8993667479 Remove unused imports 2017-05-15 11:02:29 +02:00
Florian Bruhin
eda95d7926 Simplify window/private distinction in commands.py 2017-05-15 11:02:29 +02:00
Florian Bruhin
cde36f34b0 Remove QtWebKit-NG warnings
The next release will support private browsing, and we can't easily check the
version somehow.
2017-05-15 11:02:29 +02:00
Florian Bruhin
9805b43c85 Handle private browsing in sessions 2017-05-15 11:02:29 +02:00
Florian Bruhin
f907b6b6b0 Have an isolated command history for private windows 2017-05-15 11:02:26 +02:00
Florian Bruhin
dd675c4e8d Set title for :view-source pages 2017-05-15 09:16:24 +02:00
Florian Bruhin
5b1d35bef9 Don't add data: URLs to history 2017-05-15 09:04:16 +02:00
Florian Bruhin
920dde4a68 Don't set an URL for :view-source tabs
Otherwise the page URL gets added to the history again with QtWebKit.
2017-05-15 09:03:45 +02:00
Jay Kamat
17169812be
Misc cleanup and fixes 2017-05-14 00:21:51 -07:00
Matthias Lisin
c814ced7b3 Add Android UA 2017-05-13 15:05:54 +02:00
Anton Grensjö
47f391d38b
Set explicit=False for :navigate --tab
Related to #2624
2017-05-13 04:16:49 +02:00
Jay Kamat
b526c9a2a9
Try to fix a pylint error 2017-05-12 18:38:06 -07:00
Jay Kamat
068e47e22c
Fix a few style issues 2017-05-12 16:56:07 -07:00
Florian Bruhin
273749cce8 Don't set explicit=True for :tab-clone/:view-source
Fixes #2624
2017-05-12 22:27:24 +02:00
Jay Kamat
2ae1bfc033
Keep pinned tabs in place rather than moving them. 2017-05-12 13:09:22 -07:00
Jay Kamat
66dfb1b1c9
Fix a bug with titles not being refreshed when pinning tabs 2017-05-12 09:53:25 -07:00
Florian Bruhin
17fdda6a5e Check for href attribute in WebElement.is_link
Fixes #2619
2017-05-12 12:59:25 +02:00
Florian Bruhin
9e2aa65c02 Remove webelem.Group.prevnext
Apart from checking for buttons with an href attribute (which made no sense at
all and should never return any element) this was identical to
webelem.Group.links.
2017-05-12 09:41:12 +02:00
Florian Bruhin
203a5dff74 Get rid of webelem.FILTERS
There's actually no good reason to filter javascript links as we might want to
click them (or copy their URL) just like any other link - this fixes #2404.

With that being gone, we don't need FILTERS at all anymore, as we can check for
existence of the href attribute in the CSS selector instead.
2017-05-12 09:41:12 +02:00
Jay Kamat
21455cf0e7
Clean up pinned tab alert logic
should be a lot more reusable now
2017-05-11 15:37:52 -07:00
Jay Kamat
4c28487fd0
Warn user if pinned tab is closed via tab-only 2017-05-11 14:30:45 -07:00
Jay Kamat
3317834b36
Fix a bug where pinned tabs were occasionally miscounted
Example case: :tab-only. This should cover other cases, but currently those
cases (such as :tab-only) do NOT have a warning message when popping up.
2017-05-11 13:28:26 -07:00
Jay Kamat
725bafea54
Merge branch 'master' into jay/pintab 2017-05-10 23:51:33 -07:00
Florian Bruhin
c6e31391de Fix most tests/lint 2017-05-10 09:19:24 +02:00
Florian Bruhin
f4d3f97cb7 Implement private browsing for QtWebEngine 2017-05-10 09:17:54 +02:00
Florian Bruhin
1c50377c0a Initial work on new private browsing 2017-05-10 07:00:21 +02:00
Florian Bruhin
b91d4ee9c2 Clean up :debug-webaction 2017-05-09 22:02:30 +02:00
Florian Bruhin
822623f2ed Finally update copyrights... 2017-05-09 21:37:03 +02:00
Florian Bruhin
905032924a Remove search_displayed initialization in subclasses
We set this in BrowserTab anyways, and the value in WebKitTab was wrong.
2017-05-09 17:58:28 +02:00
Florian Bruhin
4b5e528d05 Add AbstractTab.key_press 2017-05-09 17:56:07 +02:00
Florian Bruhin
76fa126133 Simplify debug string 2017-05-09 17:55:51 +02:00
Florian Bruhin
e3eda28d88 Update docstrings 2017-05-09 17:52:13 +02:00
Jay Kamat
e10d636ca0
Fix a few small issues
- Remove an unused warnings
- Reverse if statement arguments to simplify logic
2017-05-09 08:08:05 -07:00
Jay Kamat
a3d41c0467
Refactor search method of AbstractBrowserTab into a field 2017-05-09 00:24:13 -07:00
Jay Kamat
d1aac9e9e9
Add docstrings to key_press methods 2017-05-08 23:43:21 -07:00
Jay Kamat
5bdd291d28
Refactor key_press into _repeated_key_press
Also split off generic key pressing ability from WebKitScroller to WebKitTab
2017-05-08 23:11:50 -07:00
Jay Kamat
63cffaf558
Refactor _key_press from WebEngineScroller to WebEngineTab 2017-05-08 22:49:14 -07:00
Jay Kamat
c9953b9f0d
Add support for follow_selected via fake-clicks 2017-05-08 22:31:29 -07:00
Jay Kamat
e07a1045a8
Add is_link method to webelem 2017-05-08 22:00:11 -07:00
Florian Bruhin
9db92de2d5 Add a no cover pragma for certificate error hashing 2017-05-09 06:15:21 +02:00
Florian Bruhin
90b0af97ce Improve serialization crash check
It now works correctly with view-source URLs and is disabled on Qt 5.9.

Fixes #2289
See #2458
2017-05-03 23:15:17 +02:00
Florian Bruhin
ea2d5e97e2 Disable serialization crash check on Qt 5.9 2017-05-03 21:31:09 +02:00
Florian Bruhin
ebf3d208f6 Adjust Qt 5.8.1 check
There's never going to be a 5.8.1
2017-05-03 21:25:00 +02:00
Florian Bruhin
a320aa5ef7 Disable renderer process crash workaround on Qt 5.9 2017-05-03 21:24:25 +02:00