Samuel Mannehed [Fri, 2 Feb 2024 15:51:21 +0000 (16:51 +0100)]
Make non-HTTPS message more harsh
As browsers are placing more and more new functionality as
secure-context only, we need to prepare users for more problems. I find
it likely that we will disable non-HTTPS connections in the future.
Pierre Ossman [Tue, 23 Jan 2024 11:51:35 +0000 (12:51 +0100)]
Handle broken Oculus browser keyboard events
It sets KeyboardEvent.key to "Unidentified" for all non-character keys,
which means we must ignore it and use the legacy handling to figure out
the key pressed.
Pierre Ossman [Fri, 19 Jan 2024 14:58:48 +0000 (15:58 +0100)]
Increase test timeout for Chrome on Windows
There is some bug in Chrome 119+ on some systems, where it takes
forever for the first readback from a canvas, timing out the first
test that does this.
Work around the issue by increasing the timeout on that platform until
Chrome manages to resolve the issue.
Pierre Ossman [Wed, 17 Jan 2024 15:19:16 +0000 (16:19 +0100)]
Don't include ES6 module versions in npm package
The npm package is supposed to be for CommonJS usage, so only package
that to avoid confusion. This has become an issue now that nodejs
supports ES6 modules, where users are accidentally trying to import the
wrong files and get errors.
Pierre Ossman [Tue, 5 Dec 2023 10:30:30 +0000 (11:30 +0100)]
Handle immediate connection errors
The browser might throw an exception right away if there is something it
doesn't like with our connect attempt. E.g. using a non-TLS WebSocket
from a TLS web page.
Otto van Houten [Wed, 26 Jul 2023 12:38:31 +0000 (14:38 +0200)]
Add QEMU Led Pseudo encoding support
Previously, num-lock and caps-lock syncing was performed on a best effort basis by qemu.
Now, the syncing is performed by no-vnc instead. This allows the led state syncing to work
in cases where it previously couldn't, since no-vnc has with this extension knowledge of both
the remote and local capslock and numlock status, which QEMU doesn't have.
Pierre Ossman [Thu, 7 Sep 2023 12:59:36 +0000 (14:59 +0200)]
Correctly handle legacy security rejections
The code comment of this code was entirely incorrect, but the commit
message for 5671072 when it was added was correct. I.e. there is a
result, but not a reason.
Adjust the unit tests to make sure this doesn't regress again.
Samuel Mannehed [Wed, 2 Nov 2022 09:23:36 +0000 (10:23 +0100)]
Don't crash if we can't use localStorage
Our settings are not a fatal requirement, we can fall back on the
default values if they can't be accessed. A scenario where we've seen
this happen is when cookies are disabled in the browser. It seems
localStorage is disabled along with cookies in these settings.
So, lets log a message about the failure and otherwise silently
continue in this case.
Pierre Ossman [Tue, 16 May 2023 17:06:10 +0000 (19:06 +0200)]
Always return copy of data from socket
We don't know how long the caller will hang on to this data, so we need
to be safe by default and assume it will kept indefinitely. That means
we can't return a reference to the internal buffer, as that will get
overwritten with future messages.
We want to avoid unnecessary copying in performance critical code,
though. So allow code to explicitly ask for a shared buffer, assuming
they know the data needs to be consumed immediately.
Pierre Ossman [Mon, 15 May 2023 10:57:59 +0000 (12:57 +0200)]
Reduce kept state in JPEG decoder
We don't have to keep track of this much data between rects, so
restructure things to make it more simple. This allows the JPEG parsing
code to be a pure function which only depends on the input.
Pierre Ossman [Sat, 3 Jun 2023 13:36:29 +0000 (15:36 +0200)]
Check that decoders consume all data
This is extra important in the tests where we expect no changes to the
display, as otherwise we can't tell the difference between success and a
decoder that is simply waiting for more data.
Pierre Ossman [Tue, 16 May 2023 13:04:13 +0000 (15:04 +0200)]
Fix Plain authentication test checks
We should have constants local for the test function when doing
comparisons or we might have false positives because we compare with
buggy values in the code under test.
Pierre Ossman [Tue, 16 May 2023 14:45:36 +0000 (16:45 +0200)]
Test credentials using normal API
Avoid poking around in the internals and instead test things using the
official methods and events. This should give us more realistic and
robust tests.
Fragments were already respected for setting parameters, via a different
function. Thus it is unclear what that commit tried to fix. It also
complicated things by mixing the document location with the window
location.
The comment changes are useful, though, so those are kept.
Pierre Ossman [Thu, 6 Apr 2023 09:06:06 +0000 (11:06 +0200)]
Avoid running tests on l10n singleton
We want tests to be independent, so we cannot have them modify a shared
state, such as the l10n singleton. Make sure each test instantiates its
own object instead.
Pierre Ossman [Wed, 5 Apr 2023 10:46:17 +0000 (12:46 +0200)]
Special case English translation fallback
We should not be listing this in LINGUAS as that gives the impression
that English has en explicit translation. Instead, it is a special case
that the code needs to be explicitly aware of.
This reverts 9a06058 in favour of a more robust fix.