Commit Graph

16895 Commits

Author SHA1 Message Date
Florian Bruhin
5218d35385 Also style h2 in styled.html 2018-09-18 08:53:13 +02:00
Florian Bruhin
f2e91cc82e Add warnings for QtWebKit and old Qt
See #3839, #4039
2018-09-18 08:53:11 +02:00
Florian Bruhin
d759846189 Remove old qute_backend_warning 2018-09-18 08:52:50 +02:00
Florian Bruhin
4d0a776599 Upgrade tox 2018-09-17 22:47:56 +02:00
Florian Bruhin
86aef26686 Downgrade and pin pytest 2018-09-17 22:47:44 +02:00
Florian Bruhin
7cf76c622f Delete old pylint-master requirement files 2018-09-17 22:46:38 +02:00
Florian Bruhin
ce532654cb Clean up _open_special_pages() 2018-09-17 22:05:07 +02:00
Florian Bruhin
8211183567 Work around Travis CI crash
test_caret.py crashes on Travis with this stack:

    ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
    ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
    ?? () from /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
    QSGBatchRenderer::Renderer::renderBatches() () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QSGBatchRenderer::Renderer::render() () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QSGRenderer::renderScene(QSGBindable const&) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QSGRenderer::renderScene(unsigned int) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QSGDefaultRenderContext::renderNextFrame(QSGRenderer*, unsigned int) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QQuickWindowPrivate::renderSceneGraph(QSize const&) () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    QQuickRenderControl::render() () from .../site-packages/PyQt5/Qt/lib/libQt5Quick.so.5
    ?? () from .../site-packages/PyQt5/Qt/lib/libQt5QuickWidgets.so.5
    ?? () from .../site-packages/PyQt5/Qt/lib/libQt5QuickWidgets.so.5
    QObject::event(QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    QWidget::event(QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5
    QQuickWidget::event(QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5QuickWidgets.so.5
    ?? () from .../site-packages/PyQt5/Qt/lib/libQt5WebEngineWidgets.so.5
    QApplicationPrivate::notify_helper(QObject*, QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5
    QApplication::notify(QObject*, QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Widgets.so.5
    sipQApplication::notify(QObject*, QEvent*) () from .../site-packages/PyQt5/QtWidgets.so
    QCoreApplication::notifyInternal2(QObject*, QEvent*) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    QTimerInfoList::activateTimers() () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    ?? () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
    QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
    QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from .../site-packages/PyQt5/Qt/lib/libQt5Core.so.5
2018-09-17 20:56:34 +02:00
Florian Bruhin
7858beee06 Fix lint 2018-09-17 20:33:37 +02:00
pyup-bot
566483561e Update pytest-cov from 2.5.1 to 2.6.0 2018-09-17 19:47:23 +02:00
pyup-bot
8c9dae301b Update pytest from 3.6.4 to 3.8.0 2018-09-17 19:47:21 +02:00
pyup-bot
73d4913292 Update hypothesis from 3.70.3 to 3.71.8 2018-09-17 19:47:20 +02:00
pyup-bot
5ae74d5889 Update pyinstaller from 3.3.1 to 3.4 2018-09-17 19:47:18 +02:00
pyup-bot
6a1577e74a Update setuptools from 40.2.0 to 40.3.0 2018-09-17 19:47:16 +02:00
Florian Bruhin
91df81f5ab Refactor configinit.qt_args 2018-09-17 19:40:18 +02:00
Florian Bruhin
17c7663ad0 Make content.headers.referer work on QtWebEngine 2018-09-17 19:40:18 +02:00
Ellis
9c8a299a60 Removed unused variable and updated url function call 2018-09-17 13:21:54 -04:00
Ellis
80463cf8d8 Reworded configdata to fit with previously used descriptions 2018-09-17 12:49:07 -04:00
Ellis
ca0c892cbc Fixed passing UrlPattern Object into itself 2018-09-17 12:40:56 -04:00
Florian Bruhin
bd21686e0d Add webrtc_ip_handling_policy setting
This exposes all possible values, but before
https://codereview.qt-project.org/#/c/240121/ we won't be able to change those
at runtime (or enable URL patterns, which thankfully weren't enabled for the
old setting).

In theory, it'd be possible to handle the "public-interface-only" value via
QWebEngineSettings without requiring a restart, but it isn't worth the trouble.

Closes #4201
2018-09-17 18:39:41 +02:00
Florian Bruhin
6fe09c12da Add a setting for Chromium's low-end device mode
See #4039
See #2377
2018-09-17 18:39:41 +02:00
Ellis
8e42683f41 Changed QUrlPattern to UrlPattern 2018-09-17 12:27:45 -04:00
Ellis
c42a7dff0e Changed QUrl to QUrlPattern 2018-09-17 12:05:46 -04:00
Ellis
15b00cea6a Merge branch 'master' of https://github.com/qutebrowser/qutebrowser 2018-09-17 11:59:10 -04:00
Ellis
92b56b3d38 Changed configdata to use QUrl for adblock whitelisting 2018-09-17 11:57:20 -04:00
Florian Bruhin
574d7c6a11 Add settings for process models
See #4039, #2377
Fixes #4040
2018-09-17 17:22:51 +02:00
Florian Bruhin
27d0d148b8 Split up _asciidoc_fallback_path from qute_help 2018-09-17 10:29:00 +02:00
Florian Bruhin
be0d6ef3d2 Try more possible asciidoc paths for qute://help fallback 2018-09-17 09:51:15 +02:00
Ellis
1384e14bf1 Removed unused import statement 2018-09-16 20:36:00 -04:00
Ellis
c47dd4d7de Merge branch 'master' of https://github.com/exw4938/qutebrowser 2018-09-16 19:45:55 -04:00
Ellis
3f8958054b Fixed is_whitelisted_host to use QUrl fixes #4179 2018-09-16 19:41:49 -04:00
exw4938
1961980b02
Added extra comment for clarity 2018-09-16 19:20:33 -04:00
Ellis
770a95c101 Changed is_whitelisted_host to use URL Patterns fixes #4179 2018-09-16 19:12:49 -04:00
Florian Bruhin
02f47b519c Add gitattributes for changelog 2018-09-15 20:49:19 +02:00
Florian Bruhin
e105edebf5 Wait for follow_selected_done 2018-09-15 20:46:11 +02:00
Ryan Roden-Corrent
4f733333c3
Remove unused imports in test_completiondelegate. 2018-09-15 14:45:18 -04:00
Florian Bruhin
f817e5d271 Fix typo 2018-09-15 20:41:56 +02:00
Florian Bruhin
abff44def6 Get rid of end-of-doc-workaround in caret browsing
In Qt < 5.10 (and also sometimes on Windows), we get extra spaces or newlines
when moving to the end of the document. However, this only happens *sometimes*,
and manual testing confirms that with the current workaround, we actually lose
the last char in the selection.

I'm not sure what's happening there, but instead of making things worse with
the workaround, let's just be a bit less strict with the checking there and
accept both variants... This seems like some Chromium bug we can't do much
about.
2018-09-15 20:39:35 +02:00
Ryan Roden-Corrent
102c6b99dd
Don't highlight html escapes in completion.
Resolves #4199.

To avoid accidentally highlighting characters that were introduced by
html escaping the text before feeding it to setHtml, we can't just
escape the whole string before adding the highlighting. Instead, we need
to break the string up on the pattern, format and escape the individual
parts, then join them back together.

re.escape includes empty strings if there is a match at the start/end,
which ensures that matches always land on odd indices:

https://docs.python.org/3/library/re.html#re.split

> If there are capturing groups in the separator and it matches at the
> start of the string, the result will start with an empty string. The
> same holds for the end of the string
2018-09-15 14:06:28 -04:00
Ryan Roden-Corrent
4f99af5876
Don't escape quotes in completion text.
Resolves the example case in #4199, but not the larger problem. We don't
need to escape quotes as we don't put the string in an attribute value.
From the docs at
https://docs.python.org/3/library/html.html#html.escape:

> If the optional flag quote is true, the characters (") and (') are also
> translated; this helps for inclusion in an HTML attribute value
> delimited by quotes, as in <a href="...">.

Escaping quotes means we end up with a literal &#x27; in the completion
view wherever there is a quote in the source text.

However, problem in #4199, where unexpected parts of the text are
highlighted, can also happen with '<', '>', and '&', which still must be
escaped.
2018-09-15 13:39:49 -04:00
Ryan Roden-Corrent
28c8e5682a
Unit test CompletionItemDelegate.paint.
There were no unit tests for this whole module. It is difficult to test
due to all the private logic and Qt dependencies, but with a lot of
mocking we can at least validate some of the text handling.

This is a setup to start testing the solution to #4199.

I picked '{' and '}' as placeholders in the test data because they draw
the eye to the 'highlighted' part, and vim even highlights them with
python syntax highlighting. It could be confusing though, as they look
like format strings but are not used that way.
2018-09-15 13:34:07 -04:00
Florian Bruhin
e47bf7a137 Remove duplicate test 2018-09-15 15:49:48 +02:00
Florian Bruhin
f14b37a3c4 Use os.pardir 2018-09-15 15:48:40 +02:00
Florian Bruhin
59413810bf Clean up emitting of follow_selected_done 2018-09-15 15:48:40 +02:00
zaowen
bdc41db601 Adblock import handles local directories and paths
Fixes #464
* Handles local Directories
* Handles local paths without file://
2018-09-15 02:22:44 -06:00
Florian Bruhin
9edbcfb828 Share setup between webkit_tab and webengine_tab 2018-09-14 23:42:20 +02:00
Florian Bruhin
d74daf9294 Fix lint 2018-09-14 22:52:40 +02:00
Florian Bruhin
5ea8e766f5 Run all :follow-selected tests with/without JS 2018-09-14 22:49:18 +02:00
Florian Bruhin
b5af448196 Fix test_follow_selected_without_a_selection on QtWebKit 2018-09-14 22:46:31 +02:00
Florian Bruhin
4ae78d9bb2 Revert "Revert "Make sure we wait until follow_selected is done""
This reverts commit 200c11625f.
2018-09-14 22:40:47 +02:00