Commit Graph

2711 Commits

Author SHA1 Message Date
Florian Bruhin 961a9390da Remove the ua-slack site specific quirk
Closes #8510
2025-04-08 20:19:34 +02:00
Florian Bruhin ef2ceccd29 Qt 6.9: Work around QtWebEngine not handling <permission> element
See #8539
2025-04-07 21:58:45 +02:00
Florian Bruhin 21b2d63f4d doc: Remove dead matrix bridge link 2025-04-06 14:35:58 +02:00
Florian Bruhin c165d1a0da Update changelog 2025-03-31 13:40:22 +02:00
Florian Bruhin b6d5a5cf14 Fix and simplify JS quirks tests 2025-03-25 14:23:48 +01:00
Florian Bruhin c4d8502872 Add site-specific quirk for Digitec/Galaxus madness 2025-03-25 13:04:26 +01:00
Florian Bruhin 59be37007d Polyfill URL.parse for PDF.js v5 modern build 2025-03-21 10:42:55 +01:00
toofar 18db4cc937 changelog entries for bitwarden userscript
Will it be cherry picked to the release branch? Should I have made a new
section for the 3.5.0 release? We'll see!
2025-03-19 20:24:10 +13:00
Harm te Molder b183e6a39a Add Solarized theme 2025-03-12 15:52:18 +01:00
Florian Bruhin 7ad4bb70fe Shorten Chromium version in UA by default
Fixes #8426
2025-03-12 15:25:55 +01:00
Florian Bruhin fdfa9109ff doc: Adjust Fedora freeworld install instructions 2025-02-18 11:56:29 +01:00
Florian Bruhin 7bd941cda0 Make duplicate notification IDs non-fatal
The notification.Error there is unhandled otherwise.
2025-01-30 12:59:43 +01:00
Jun Chen e63781d49b docs: update contributing guide with new issue tracker link 2025-01-29 22:38:59 +01:00
Florian Bruhin c5395c23f7 Update changelog 2025-01-09 11:51:45 +01:00
qutebrowser bot 5c899e304f Release v3.4.0 2024-12-14 20:51:45 +00:00
Florian Bruhin 5a153d76ea Use/recommend libegl1 without -mesa
libegl1-mesa was a "transactional dummy package" as early as Ubuntu 20.04, and
got removed in 22.04.

See https://packages.ubuntu.com/search?keywords=libegl1-mesa&searchon=names&suite=all&section=all
2024-12-14 21:50:10 +01:00
Florian Bruhin 2546c0746d Update changelog 2024-12-14 21:08:01 +01:00
Florian Bruhin 9e70ffeaad Switch to legacy PDF.js build
The normal PDF.js build only officially supports the latest Chromium, so things
might break every once in a while with QtWebEngine (e.g. #8199, #7335).

Let's instead bundle and recommend the legacy build.

Closes #8332
Closes #7721 (reworded)
Also see #7135
2024-12-10 11:47:39 +01:00
Florian Bruhin 946ec0ab25 py313: Update docs
See #8205
2024-12-09 16:15:01 +01:00
Florian Bruhin 321898eb54 Update changelog 2024-12-09 14:45:41 +01:00
Florian Bruhin 6c9fd35bfa Update changelog 2024-12-06 20:49:14 +01:00
Florian Bruhin e15d266309 Merge branch 'xhr-accept-language'
# Conflicts:
#	doc/changelog.asciidoc
2024-12-05 15:08:28 +01:00
Florian Bruhin df75956cf9 Update docs 2024-12-04 20:51:58 +01:00
Florian Bruhin a1d89a83b0 Merge remote-tracking branch 'origin/pr/8348' 2024-12-04 20:40:19 +01:00
Florian Bruhin 0144a314ad Respect Accept-Language set via XHR
Similarly to #5998, XHR requests should be able to set their custom
Accept-Language values - and for some odd reason, stuff breaks on websites
sometimes when that's not respected.

There's no way for qutebrowser to know if a given header value is already set in
a request (i.e. whether we're adding or overriding). Thus we only really have
two options here:

1) Don't set any shared.custom_headers() for XHR requests at all.
2) Special-case Accept-Language here, because the issue usually is triggered by
the global override, but that already gets set just fine via QWebEngineProfile
anyways.

Given that 2) is the thing causing trouble in the wild and it's unclear what the
desired behavior for 1) is (e.g. for the DNT header), let's go for 2) here.
2024-11-27 17:48:03 +01:00
Florian Bruhin 49e67c4dc9 Fix up changelog
See #7625
2024-11-07 14:58:47 +01:00
toofar 7535207fd3 Merge remote-tracking branch 'upstream/main' into feat/68_permissions_askeverytime 2024-10-29 10:22:44 +13:00
toofar 28890f6fbb Change `content.javascript.clipboard` default to `ask`
Now that we support prompting for clipboard access, change the default
for this setting to match all the other settings that have an "ask"
value.
2024-10-28 15:26:25 +13:00
Florian Bruhin a138ab8978 Fix some broken links 2024-10-22 18:17:08 +02:00
Florian Bruhin af835c26ad Update changelog 2024-10-15 12:00:25 +02:00
Florian Bruhin ffe7d00a62 Merge branch 'drop-py38' 2024-10-15 11:58:54 +02:00
Florian Bruhin ff5d4d3564 Avoid passing a parent to QProcess
With the upgrade to MarkupSafe 3.0, something funny happened when trying to pass
the GUIProcess object to jinja after launching a userscript:

    [...]
    File "[...]/qutebrowser/browser/qutescheme.py", line 291, in qute_process
        src = jinja.render('process.html', title=f'Process {pid}', proc=proc)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "[...]/qutebrowser/utils/jinja.py", line 123, in render
        return environment.get_template(template).render(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [...]
    File "html/process.html", line 11, in block 'content'
    File "[...]/lib/python3.11/site-packages/markupsafe/__init__.py", line 42, in escape
        if hasattr(s, "__html__"):
           ^^^^^^^^^^^^^^^^^^^^^^
    RuntimeError: wrapped C/C++ object of type GUIProcess has been deleted

This can be reproduced with:

    qutebrowser --temp-basedir ':cmd-later 0 spawn -u -o /bin/echo test'

We pass the `GUIProcess` to the Jinja template as `proc`, which then formats it as
`{{ proc }}`` (to stringify it). For some reason, with the newest MarkupSafe/Jinja
versions, this now triggers the `if hasattr(s, "__html__")` check in MarkupSafe
(which has been around for a while). That then presumably causes PyQt to try and
access the underlying C++ object for `GUIProcess``, but that has already been
deleted.

But why is it deleted in the first place, if we keep track of even completed
processes data ever since we added `:process` in a3adba81c? It looks like the Qt
parent-child relationship is the culprit here: When we pass a parent to the
`GUIProcess`` from the userscript runner, it will get deleted as soon as said
runner is cleaned up (which happens after the userscript has finished).

We probably never noticed this before because we only accessed data from the
Python wrapper and not from the C++ side, but it still seems like a good idea
to avoid passing a parent for a long-lived object (with time-based cleanup) in
the first place.
2024-10-15 11:55:04 +02:00
Florian Bruhin 088b5973eb Update mimetype overrides
See https://github.com/python/cpython/commits/main/Lib/mimetypes.py
2024-10-15 11:55:04 +02:00
Florian Bruhin 463bde5c8e Update changelog 2024-10-15 10:33:53 +02:00
Florian Bruhin eb67b20417 Update docs for Python 3.8 drop 2024-10-13 18:24:44 +02:00
Florian Bruhin bd3774dfc8 Drop Python 3.8 from tox/CI 2024-10-13 18:24:44 +02:00
Florian Bruhin cc73134ead Add tenative v3.4.0 changelog 2024-10-12 21:50:07 +02:00
qutebrowser bot eacdca5a36 Release v3.3.1
(cherry picked from commit fc0d7e08bc)
2024-10-12 19:40:58 +00:00
Florian Bruhin 94dce5f1d4 Update release checklist 2024-10-12 21:38:20 +02:00
Florian Bruhin 7d6ea4b58b Fix up changelog 2024-10-12 21:37:17 +02:00
Florian Bruhin 5a8964dc48 Update changelog 2024-10-12 21:31:27 +02:00
Florian Bruhin 28480f394b Update the Firefox UA for quirks
See #5182
2024-10-12 21:31:27 +02:00
qutebrowser bot 7d1d6459e0 Release v3.3.0 2024-10-12 19:23:16 +00:00
toofar 3bc30e748d Merge pull request #8243 from feat/e2e_screenshots 2024-10-05 11:30:57 +13:00
Sviatoslav Sydorenko 0b6db05499
📝 Mention `kerberos` USE-flag on Gentoo
This flag is vital for the allow-list configuration to be picked up.
It should be set globally and `dev-qt/qtwebengine` should be
recompiled after it's enabled.

Ref #8313.
2024-09-30 15:37:00 +02:00
toofar 451cc6fd56 Refer to mkvenv script by full path in install docs
Might help with people copying and pasting commands. I don't think the
script installs itself in bin/ in the virtualenv it creates?

Closes: #8263
2024-08-18 13:23:02 +12:00
toofar 622b98df12 update changelog for e2e test screenshots 2024-08-18 12:43:40 +12:00
Florian Bruhin b9441cad45 Fix crash when the renderer process terminates for an unknown reason
With PyQt 6, this gets represented as
QWebEnginePage.RenderProcessTerminationStatus(-1)
which is != -1, thus leading to a KeyError.

Updating to a RendererProcessTerminationStatus
enum value works fine on both PyQt5 and PyQt6.
2024-08-04 21:00:50 +02:00
toofar c3f34a8a39 update docs and changelog for URL match patterns link 2024-07-27 11:20:17 +12:00
toofar 152571c9cd Merge pull request #8268 from greenfoo/update_match_patterns_link
Update link to chrome match patterns documentation
2024-07-27 11:13:16 +12:00
Fernando Ramos d65489da91 Update link to match patterns documentation 2024-07-21 21:53:18 +02:00
Florian Bruhin 564293fb6e Update pakjoy setting description 2024-07-12 16:33:14 +02:00
owl d9b9349656
Add setting to disable Google Hangouts extension
Fixes #8257
2024-07-12 12:36:50 +02:00
Florian Bruhin b78fc5765a ci: Drop macOS 11
Will be dropped on GitHub Actions tomorrow:
https://github.blog/changelog/2024-05-20-actions-upcoming-changes-to-github-hosted-macos-runners/

For unit tests, we now run them on macOS 13 instead, thus testing on all three
macOS versions we currently support.

For releases, this forces us to now support macOS 12 as the oldest supported
version and drop macOS 11 support. Thus, we should not have a v3.2.2 release.

Not backporting this commit so CI fails there rather than silently bumping up
requirements.
2024-06-27 22:04:40 +02:00
Florian Bruhin f377fd36d9 Fix up changelog
Cherry-picking 21ee2d093a resulted in an accidental v3.3.0 section in the changelog.
2024-06-25 11:19:55 +02:00
qutebrowser bot f9cfef973a Release v3.2.1
(cherry picked from commit 8cb4556245)
2024-06-25 09:07:53 +00:00
Florian Bruhin 547530e33c Move apple silicon releases to v3.2.1 2024-06-25 10:40:46 +02:00
Florian Bruhin 307245c8cf Update changelog 2024-06-25 10:06:27 +02:00
toofar d0422a982f Tips for contributors to run the webkit backend
My virtualenv I used to run webkit has rotted long ago and I don't remember
how I set it up. There is a PyQtWebKit project on PyPI but I don't know
who that's published by.

So I figured I would write some notes for myself on using the docker container
used for CI instead. I chose to mount the current directory (which is
presumably a qutebrowser checkout!) directly into the container instead of
cloning it so I could have quicker feedback between making code changes and
running tests.

Then there's a couple of things that stem from that. Since the user in the
container is different from the one in the host we have to move some things
that are normally written to the current directory to be written elsewhere.
There are other ways to approach this (eg you can add `-u $(id -u)` to the
docker command line, although that makes things a bit confusing in the
container) but arguably it's good for the container not to be able to write to
the host, hence making that volume read only.

The TOX_WORK_DIR trick is from
[here](https://github.com/tox-dev/tox/issues/20), apart from with
`{toxinidir}` in it too because the pyroma env was failing with just
`.tox`, saying the pyroma binary needed to be in the allowlist, possibly
it was doing full path matching without normalizing.

The hypothesis folks
[here](https://github.com/HypothesisWorks/hypothesis/issues/2367#issuecomment-595524571)
say if you want to override the examples DB location with an env var to
do it yourself. It's actually only a warning from hypothesis, it says it
falls back to an in-memory DB, but I guess the tests run with
warnings-are-errors. You can also pass `database=None` to make
hypothesis skip example storage altogether.

I'm using tox to run commands in a virtualenv with the right stuff in it
because, uh, because I was copying the CI workflow actually. I just found out
about the `exec` subcommand to override the `commands` defined for the env,
neat! One point of awkwardness about that is that since we are using the
PyQt from the OS we need any virtualenv we use to have access to the OS
packages, which isn't the default for virtualenvs created by tox. The
text envs use the link_pyqt script for that but if you are using this
container and the first thing you do is run `tox exec` then that
wouldn't have been run. So I'm setting `VIRTUALENV_SYSTEM_SITE_PACKAGES`
to tell tox to always make the system packages available in the
virtualenvs it manages.

I did try using the mkvenv script instead of tox but it complained when
trying to install the current directory in editable mode because
setup.py tries to write to a git-commit-id file.
2024-06-23 20:12:38 +12:00
toofar c57a280ef0 update docs for url:yank addition 2024-06-23 10:17:21 +12:00
toofar fcd68efd3c update changelog for 7879 and 7950
Move the entry about stripping query params up to the next minor release
and move it into the "changed" section, instead of "fixed".
2024-06-22 16:34:38 +12:00
toofar bab8596a68 Merge pull request #7879 from michaelfm1211/main
Move URL to yankable string conversion to urlutils
2024-06-22 16:30:35 +12:00
toofar 167d7ac87d update changelog for qute-pass idna 2024-06-16 11:24:23 +12:00
Florian Bruhin 27164d0d6e Build separate Apple Silicon release
With GitHub Actions now providing macOS 14 runners with M1 chips, we can
build a separate Apple Silicon release there and upload it.

Universal wheels are currently not possible, see #8229 for details.

Closes #6478
2024-06-11 23:01:47 +02:00
Florian Bruhin 1e1af23d34 Fix earlyinit with no Qt available
We need to wait with init_qtlog until after we know we have Qt available.

Closes #8220
2024-06-04 22:32:10 +02:00
qutebrowser bot ae7d7fb426 Release v3.2.0 2024-06-03 14:42:27 +00:00
Florian Bruhin 56f14fba2d Fix security patch version in changelog 2024-06-01 13:34:30 +02:00
Florian Bruhin d3dc1bf4c1 Update changelog 2024-05-29 08:45:28 +02:00
toofar e86ef0b2fd update changlog entry for pdf.js fix 2024-05-25 09:42:02 +12:00
toofar 1f2a0016b7 put windows IPC fix changelog in correct release [ci skip] 2024-05-25 09:40:44 +12:00
toofar 68a8d618d6 update changelog for flaky windows qtimer issue 2024-05-25 09:34:01 +12:00
toofar 04b0d84bda update changelog for None selection model fix 2024-05-19 14:34:23 +12:00
Florian Bruhin a7a7c434e2 Fix handling of missing QtWebEngine resources
I was getting crash reports from someone about this. Not sure what's going wrong
there (hence the additional information in the exception).

What's clear however is that we're raising ParseError, but only handling that
when actually parsing. The code calling copy_/_find_webengine_resources only
handles OSError. So let's raise a FileNotFoundError instead.
2024-05-10 18:41:50 +02:00
Evan Chen 350f94222d
reading comprehension failure
more coffee required
2024-05-09 13:35:13 -04:00
Evan Chen 310c865f29
Fix some spelling errors 2024-05-09 10:58:04 -04:00
Florian Bruhin edba6f18cb Update changelog 2024-05-01 00:30:41 +02:00
Florian Bruhin dfcfc686ce Support setting dark mode at runtime and with URL patterns
See #3636, #5542, #7743
2024-04-30 23:31:58 +02:00
Florian Bruhin 0fec3c7fb2 Update changelog 2024-04-30 17:15:22 +02:00
Florian Bruhin b0002ac71f Preload broken qutebrowser logo resource
When qutebrowser is running but its installation has been deleted/moved, it
fails in somewhat mysterious but predictable ways. This is e.g. the case
currently, when people upgrade their Archlinux packages and upgrade from Python
3.11 to 3.12. When doing that with qutebrowser open, on the next page load, it
will:

- Have a crashed renderer process, because (assumingly) the process executable
  is gone on disk.
- Which then causes us trying to render an error page, but that fails due to
  broken_qutebrowser_logo.png being gone from disk.
- The FileNotFoundError then causes jinja2 to import jinja2.debug at runtime,
  but that *also* fails because the jinja2 package is gone.

We work around this by loading the PNG into RAM early, and then using the cached
version instead. This amends b4a2352833 which did
the same with HTML/JS resources, but never for this PNG, which (looking at crash
logs) seems to be a somewhat common breakage.

Alternatives I've considered:

- Catching the FileNotFoundError and not showing an error page at all.
- Generating a PNG with an explanatory text via QPainter and returning that.

However, with the renderer process crash happening in the first place for
unknown reasons, it's unclear if the error page ever gets actually displayed...
Let's roll with this for now, and if this causes a repeating renderer process
crash, fix that separately (also see #5108).
2024-04-30 17:03:11 +02:00
toofar 80931acab0
Merge pull request #8139 from qutebrowser/feat/7187_chromium_security_patch_in_version
Show chromium security patch version in :version
2024-04-20 19:25:42 +12:00
Florian Bruhin 91be21aede Avoid quitting when closing KDE file dialog
See https://bugreports.qt.io/browse/QTBUG-124386

Fixes #8143
2024-04-16 11:10:16 +02:00
toofar afe6d4a5f1 update changelog for #8162 2024-04-13 16:43:37 +12:00
Florian Bruhin 3d86d7876a Add role="switch" to default hints.selectors
See https://www.reddit.com/r/qutebrowser/comments/1bomb3h/closing_popups_within_a_webpage_and_toggling/
2024-03-27 23:58:36 +01:00
Florian Bruhin 982b8bdcec Fix input.insert_mode.auto_load race / test_auto_load flakiness
Fixes #8145, see #5390.

As long as we don't have a solution to get notified about focus happening
(#2471 possibly?), it looks like there is no better way to get notified
about this, so a delay will need to do for now.
2024-03-27 12:34:30 +01:00
toofar 52106c383b Show chromium security patch version in :version
Webengine added a getter for their chromium patch level back in Qt 6.3,
since they backport security fixes from chromium in the periods between
doing major chromium feature upgrades.

It's pulled from a hardcoded string in the webengine source
`src/core/web_engine_context.cpp` that's manually updated when they
backport something.

The "(plus any distribution patches)" bit in there is because it was
pointed out that some distributions backport their own security patches
or even use webengine from a branch when the hardcoded string only gets
updated at release time, despite patches being backported in the
meantime.

Closes: https://github.com/qutebrowser/qutebrowser/issues/7187
2024-03-23 11:51:35 +13:00
Florian Bruhin 93b8438ebc Update doc heading for Windows
See #8136
2024-03-22 16:03:06 +01:00
toofar 6050017809 update changelog for SIGHUP handling 2024-02-24 23:23:42 +13:00
Florian Bruhin fedea10187 Fix consistency of 'dark mode' spelling
Thanks to absinthium
2024-01-17 11:25:23 +01:00
Florian Bruhin 13f6cfa715 Reapply "Update changelog for 7955"
This reverts commit 6a149901fb.
2024-01-12 18:53:22 +01:00
Florian Bruhin 6a149901fb Revert "Update changelog for 7955"
This reverts commit dbd0bfbe8e.

See previous commit
2024-01-11 17:31:11 +01:00
toofar dbd0bfbe8e Update changelog for 7955 2023-12-21 12:31:31 +13:00
toofar fbb3e10ce1 Add placeholder changelog entries for next two releases
I would like to make merging PRs lower friction. One aspect of that for
me is having to think about where to add the changelog info, whether it
should go in an existing section, whether I should create a new section,
what the format changelog is supposed to be in. These questions are a
bit coupled with the decision of whether to backport a change or not.

Those aren't hard questions but I don't usually have a long stretch of
time for open source work. So making it so I don't have to make those
decisions at merge time makes it easier for me to fit that work into my
day. Previously it seemed to me that the norm was to only have a future
changelog entry for the next patch release. Occasionally I would merge
stuff and add it to the patch release changelog entry and then think
about how I would have made getting any security fixes out harder or how
it would have to be corrected at backport time. So this is kind of a
pre-commitment that yes, we are going to be merging stuff to main that
won't make it to the next release.

A lot, but not all, of the above rambling will also be mitigated by
adopting a fragment based changelog management system (#7101), because
that means that more of the stuff we have to worry about when merging is
only in the context of the PR. Eg just describe that the change does,
don't worry too much about where that description is going to end up.

Other follow up stuff we could do if norms are established or need
re-enforcing:

* update contributor docs to describe more of the branching strategy as
  it applies to merging
* update contributor docs to describe backporting steps and philosophy
* link changelog entries to milestones?
2023-12-12 09:19:53 +13:00
qutebrowser bot a9f6ad9731 Release v3.1.0 2023-12-08 15:30:58 +00:00
Florian Bruhin 4928153227 Upgrade release Python to 3.12 2023-12-08 15:44:18 +01:00
Florian Bruhin 6aa19eb90f Explicitly handle focus before hiding UI elements
Almost 7 years ago, it was observed that hiding the status bar causes some
websites being scrolled to the top: #2236.

Back then, it never really was clear why this happens. However, with the v3.0.0
release, we had a regression causing the same thing to happen when leaving
prompt mode: #7885.

Thanks to "git bisect", the culprit was found to be 8e152aa, "Don't give
keyboard focus to tab bar", which was a fix for #7820. However, it still wasn't
clear why this phenomenon happens.

What made things clearer to me was a combination of debugging and an old comment
by pevu: https://github.com/qutebrowser/qutebrowser/issues/2236#issuecomment-337882102

> Chromium-browser has the same issue. When you open lipsum.com, scroll down,
> then focus the location bar (url box), then press Tab, it will jump to the
> top of the page and focus the first link. This doesn't happen when you
> switch focus using the mouse.
>
> It seems to be an issue of how the view containing the website is focused
> when all qutebrowser ui elements disappear.

And indeed, tabbing into the web contents from the UI elements via the tab key
in Chromium causes the website to start at the top, presumably as an
accessibility feature?

Essentially, this is also what happens in qutebrowser when an UI element is
hidden while it still has focus: In QWidget::hide() (or, rather,
QWidgetPrivate::hide_helper()), Qt moves the focus to the next widget by
calling focusPrevNextChild(true):
https://github.com/qt/qtbase/blob/v6.6.1/src/widgets/kernel/qwidget.cpp#L8259-L8271

And apparently, focusPrevNextChild() basically does the same thing as pressing
the tab key, to the point that there is some code in Qt Declarative actually
making tab keypresses out of it (which I'm still not sure is related, or maybe
just the cause of #4579):
https://github.com/qt/qtdeclarative/blob/v6.6.1/src/quickwidgets/qquickwidget.cpp#L1415-L1429

Some debugging confirms that this is exactly what happening:

1) We hide the status bar (or prompt) which has keyboard focus
2) Qt focuses the web view, which triggers the Chromium feature (?) scrolling it
   to the very top.
3) Only then, in TabbedBrowser.on_mod_left(), we noticed that the command or
   prompt mode was left, and reassign focus to the web view properly.

In step 2), before this change, Qt happened to focus the tab bar (before we set
the focus manually to the web contents), and thus this didn't happen.
Not sure why it didn't focus the tab bar when we hid the status bar (maybe
because how our widget hierarchy works with TabbedBrowser?).

Python stacktrace of hiding prompt:

    Traceback (most recent call first):
    <built-in method hide of DownloadFilenamePrompt object at remote 0x7fffb8bc65f0>
    File ".../qutebrowser/mainwindow/prompt.py", line 204, in _on_mode_left
        self.show_prompts.emit(None)
    File ".../qutebrowser/keyinput/modeman.py", line 434, in leave
        self.left.emit(mode, self.mode, self._win_id)
    File ".../qutebrowser/keyinput/modeman.py", line 445, in mode_leave
        self.leave(self.mode, 'leave current')

C++ stacktrace, with the focus change presumably being passed of to Chromium
here: https://github.com/qt/qtwebengine/blob/dev/src/core/render_widget_host_view_qt_delegate_client.cpp#L714

    #0  QtWebEngineCore::RenderWidgetHostViewQtDelegateClient::handleFocusEvent(QFocusEvent*) () at /usr/src/debug/qt6-webengine/qtwebengine-everywhere-src-6.6.0/src/core/render_widget_host_view_qt_delegate_client.cpp:708
    #1  QtWebEngineCore::RenderWidgetHostViewQtDelegateClient::handleFocusEvent(QFocusEvent*) () at /usr/src/debug/qt6-webengine/qtwebengine-everywhere-src-6.6.0/src/core/render_widget_host_view_qt_delegate_client.cpp:705
    #2  0x00007fffe5fea70c in QtWebEngineCore::RenderWidgetHostViewQtDelegateClient::forwardEvent(QEvent*) () at /usr/src/debug/qt6-webengine/qtwebengine-everywhere-src-6.6.0/src/core/render_widget_host_view_qt_delegate_client.cpp:300
    #3  0x00007fffe4dd5c79 in QQuickItem::event(QEvent*) (this=0x555556b6cd20, ev=0x7fffffffa320) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.0/src/quick/items/qquickitem.cpp:8871
    #4  0x00007ffff1f7318b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555556b6cd20, e=0x7fffffffa320)
        at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:3290
    #5  0x00007ffff295e4a7 in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #6  0x00007ffff59626d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555556b6cd20, event=0x7fffffffa320) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1118
    #7  0x00007ffff596271d in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1536
    #8  0x00007fffe4f33f15 in QQuickDeliveryAgentPrivate::setFocusInScope(QQuickItem*, QQuickItem*, Qt::FocusReason, QFlags<QQuickDeliveryAgentPrivate::FocusOption>)
        (this=<optimized out>, scope=<optimized out>, item=<optimized out>, reason=<optimized out>, options=...) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.0/src/quick/util/qquickdeliveryagent.cpp:439
    #9  0x00007fffe4dd348a in QQuickItem::setFocus(bool, Qt::FocusReason) (this=0x555556b724d0, focus=<optimized out>, reason=Qt::TabFocusReason) at /usr/include/qt6/QtCore/qflags.h:73
    #10 0x00007fffe4e7239b in QQuickWindow::focusInEvent(QFocusEvent*) (this=<optimized out>, ev=<optimized out>) at /usr/src/debug/qt6-declarative/qtdeclarative-everywhere-src-6.6.0/src/quick/items/qquickwindow.cpp:231
    #11 0x00007ffff1fc3a05 in QWidget::event(QEvent*) (this=0x555556457b50, event=0x7fffffffa770) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:9111
    #12 0x00007ffff1f7318b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555556457b50, e=0x7fffffffa770)
        at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:3290
    #13 0x00007ffff295e4a7 in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #14 0x00007ffff59626d8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555556457b50, event=0x7fffffffa770) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1118
    #15 0x00007ffff596271d in QCoreApplication::sendEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/corelib/kernel/qcoreapplication.cpp:1536
    #16 0x00007ffff1f7f1b2 in QApplicationPrivate::setFocusWidget(QWidget*, Qt::FocusReason) (focus=0x555556457b50, reason=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qapplication.cpp:1538
    #17 0x00007ffff1fca29d in QWidget::setFocus(Qt::FocusReason) (this=0x555556b1ceb0, reason=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:6580
    #18 0x00007ffff1fb4f1b in QWidget::focusNextPrevChild(bool) (this=<optimized out>, next=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:6844
    #19 0x00007ffff298d0ac in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #20 0x00007ffff298d0ac in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #21 0x00007ffff298d0ac in  () at /usr/lib/python3.11/site-packages/PyQt6/QtWidgets.abi3.so
    #22 0x00007ffff1fbdb76 in QWidgetPrivate::hide_helper() (this=this@entry=0x55555646a360) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:8271
    #23 0x00007ffff1fbf158 in QWidgetPrivate::setVisible(bool) (this=0x55555646a360, visible=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.0/src/widgets/kernel/qwidget.cpp:8447
    [...]

We fix this problem by explicitly handling focus before hiding the UI elements.
This is done with a new TabbedBrowser.on_release_focus() slot, which is bound to
signals emitted just before things are hidden: The existing Command.hide_cmd()
for the status bar, and a new release_focus() signal for prompts.

Additionally, we make sure to not double-handle hiding in the statusbar
code when it's already handled separately for comamnd mode.

Unfortunately, no tests for this, as application window focus is required to
reproduce the issue. In theory, a test in scroll.feature could be added though,
which loads simple.html, scrolls down, shows/hides a prompt or the status bar,
and then checks the vertical scroll position is != 0.

Fixes #2236
Fixes #7885
2023-12-07 21:30:37 +01:00
Florian Bruhin c698091f55 Avoid calling DownloadItem.origin() if unneeded
See #7854
2023-12-05 14:31:58 +01:00
Florian Bruhin 9d8c263e9a Extend pakjoy to Qt 6.5.0/.1/.2 with dark mode
See #7837
2023-12-05 13:46:02 +01:00
Florian Bruhin 21c7699eac Add content.javascript.legacy_touch_events setting
Closes #7814
2023-12-04 16:44:56 +01:00
Florian Bruhin 4d3314cad8 Upgrade changelog and changelog URLs 2023-12-04 15:00:06 +01:00
Florian Bruhin 21869d149a Support QWebEngineSettings.WebAttribute.ReadingFromCanvasEnabled
See #7646
2023-12-04 14:59:08 +01:00