Samuel Mannehed [Thu, 16 Feb 2017 09:43:32 +0000 (10:43 +0100)]
Remove Util.getEventPosition()
It mostly dealt with scrolling which we don't use. It also made mistakes
in some cases. Remove it and compute the coordinates directly in the
calling code.
Pierre Ossman [Tue, 7 Feb 2017 15:09:10 +0000 (16:09 +0100)]
Tweak spinner appearence
Change the look of the "busy" spinner a bit. It's mostly used for
connection stuff, so give it a more data flow feel. Also bling it
up a bit with some fading. Perty sells. :)
Pierre Ossman [Fri, 3 Feb 2017 16:11:39 +0000 (17:11 +0100)]
Don't delay WebSocket flushing
The native WebSocket is in a much better position to do queue
management than us. We also failed to check the return value and
set up a timer, causing stalls.
This gets us in sync with websockify as of 40238b00.
Pierre Ossman [Fri, 3 Feb 2017 12:17:43 +0000 (13:17 +0100)]
Scroll correct element
The element we want scrolling around is noVNC_screen, not the entire
window. This also allows us to compute the screen size without
fiddling the scrollbars on and off.
Pierre Ossman [Fri, 3 Feb 2017 10:43:17 +0000 (11:43 +0100)]
Center canvas (again)
The previous attempt could leave parts of the canvas outside the
document, making it impossible to reach. Use a safer method as
recommended by Mozilla.
Samuel Mannehed [Mon, 23 Jan 2017 11:20:45 +0000 (12:20 +0100)]
Save settings immediately
Retire the old settingsApply. This also allows UI logic to check the
state of things using the settings instead of having to look at the
values of HTML elements (we couldn't be sure if the changes were
applied yet or not).
Pierre Ossman [Wed, 18 Jan 2017 14:59:31 +0000 (15:59 +0100)]
Fix global error handler
It stopped working when we switched to textContent as it relies
on being able to add new HTML elements. Do things properly by
adding new elements via createElement().
Solly Ross [Thu, 12 Jan 2017 16:43:35 +0000 (11:43 -0500)]
Use textContent instead of innerHTML
Previously, setting `innerHTML` was used to display the statuses. These
could include content communicated from the remote VNC server, allowing
the remove VNC server to inject HTML into the noVNC page.
This commit switches all uses of `innerHTML` to use `textContent`, which
is not vulnerable to the HTML injection.
Samuel Mannehed [Mon, 9 Jan 2017 11:49:10 +0000 (12:49 +0100)]
Fix rfb._cleanup() (#743)
We don't have to check for _display or context here since this is a
private function which is never called under such circumstances. This
solves problems caused by display.get_context() which was previously
removed in e549ae074fcea9febde32c0fa260a64c15cc1b8e.
Pierre Ossman [Mon, 14 Nov 2016 16:17:05 +0000 (17:17 +0100)]
Clean up z index ordering
We have enough layers now that we need to have some system for this.
E.g. make sure that dialogs during connect show up in front of the
blocking transition layer.
Pierre Ossman [Sun, 30 Oct 2016 20:36:54 +0000 (21:36 +0100)]
Remove alternative style sheets
Anyone with basic knowledge of CSS will easily figure out how to
customise the appearance of the UI, so remove the burden of having
to maintain these extra style sheets.
Pierre Ossman [Tue, 25 Oct 2016 14:58:21 +0000 (16:58 +0200)]
Use double buffering for the display
Do all rendering to a hidden canvas and then copy over the finished
frame to the visible canvas once everything is done. This simplifies
things and solves some bugs as we can retain a copy of the entire
frame buffer.
Pierre Ossman [Mon, 24 Oct 2016 15:37:21 +0000 (17:37 +0200)]
Run performance tests at full speed
setTimeout() is subject to delays, possible massive ones. As such it
is rather useless for performance sensitive code. Use the non-standard
setImmediate() API instead, emulating it on postMessage() when it
isn't available.
Pierre Ossman [Tue, 29 Nov 2016 15:06:20 +0000 (16:06 +0100)]
Skip language tests on broken browsers
The hacks needed to run these tests require proper handling of
properties. Unfortunately IE and old versions of Chrome mess up,
so just skip the tests there.
Samuel Mannehed [Mon, 28 Nov 2016 15:11:47 +0000 (16:11 +0100)]
Fix translation util tests
We have to temporarily replace window.navigator due to the fact that
its property languages is read-only. The tests for the translation
utilities require different values of this property. The failing tests
were added in merge of PR #718 (in commit f5bf2d84ef1bae02dfaff068de7565664a00fba3).
Samuel Mannehed [Mon, 28 Nov 2016 11:36:29 +0000 (12:36 +0100)]
Clear UI.connected state variable right away
Keeping it set for the disconnecting state was causing an issue where
the controlbar could be hidden without any way to open it, when a
session disconnects too quickly.
Samuel Mannehed [Wed, 9 Nov 2016 14:54:10 +0000 (15:54 +0100)]
Allow specifying details when calling RFB._fail()
RFB's _fail function logs the error, disconnects the session and sets
disconnect_reason. The disconnect_reason is upon disconnection sent to
the user interface. It is thus not suitable for including error details
that aren't user friendly. The idea is that you will look in the
browser console for a full log with details of the error.
Samuel Mannehed [Tue, 8 Nov 2016 17:18:19 +0000 (18:18 +0100)]
Don't wait for websocket closes on failure
RFB._fail() can be called at any time in any state, it is not certain
that we will get a close event on the socket since the socket might not
be open. This caused us to hit the disconnect timeout in such cases.