Commit Graph

924 Commits

Author SHA1 Message Date
samhed 529c64e103 Re-arrange global UI variables 2016-04-25 16:35:49 +02:00
Solly Ross 8b0a0f6637 Merge pull request #602 from oneru/typo-fix
Adds missed line from PR 597
2016-04-13 15:02:48 -04:00
Jonathan Bennett 3c9558444c Adds missed line from PR 597 2016-04-13 12:53:37 -05:00
Solly Ross bf0ce0ba3c Merge pull request #597 from oneru/master
Handle missing leading slash in elem.pathname
2016-04-12 17:32:43 -04:00
Jonathan Bennett c8294760b1 Handle missing leading slash in elem.pathname
IE11 with compat mode turned off has been observed displaying this behavior.  This commit checks for and corrects this broken behavior.

Fixes #591
2016-04-12 11:00:28 -05:00
Solly Ross b403cb92fb Merge pull request #582 from kanaka/bug/render-queue-corruption
Make sure to copy arrays when using render queue
2016-02-24 16:52:55 -05:00
Solly Ross 7bc383e8b6 Make sure to copy arrays when using render queue
This commit ensures that input arrays are copied to new storage when
they are pushed onto the render queue.  This ensures that they are
not overwritten before they are eventually used.

Fixes #571
2016-02-24 16:29:34 -05:00
Solly Ross 670dbddb54 Merge pull request #568 from kanaka/refactor/remove-refs-to-jsunzip
Cleanup/fixup unused code

Remove jsunzip, remove unused vars, fix vnc_perf.html
2016-01-06 16:01:50 -05:00
Solly Ross 317042f8db Merge branch 'feature/token-in-url'
Injects token into the path element if it's passed to
the noVNC page.

Closes #537
Fixes #536
2016-01-06 15:57:04 -05:00
Miguel Xavier Penha Neto c55f05f619 Pass token into the path variable
If a token is already present in the path, the new variable
is ignored.  In order to properly manipulate the path,
a new method, `WebUtil.injectParamIfMissing` was introduced.

Fixes #536

[@directxman12: fix up path manipulation logic]
2016-01-06 15:56:28 -05:00
Solly Ross 28646d978f Merge pull request #547 from pigshell/hashargs
Add hash fragment as an optional method to supply config variables.

Closes #544
2016-01-06 14:22:24 -05:00
Solly Ross 4ee55e0126 Fixed vnc_perf.html
This commit updates vnc_perf.html so that it works with the current
version of noVNC.  It also introduces a utility to convert noVNC session
recordings recorded in base64-mode to binary-mode recordings, since noVNC
no longer supports base64-mode.

Fixes #479.
2016-01-06 13:32:05 -05:00
Solly Ross 464944844f Remove unused variables in the TIGHT server init
This commit removes some unused variables in the TIGHT server init
section of the server init handler, replacing them with documenting
comments and calls to rQskipBytes.

Fixes #440.
2016-01-06 11:18:47 -05:00
Solly Ross 0252c7f766 Remove remaining references to jsunzip.js
This commit removes remaining references to jsunzip.js,
which is no longer actually used in noVNC.

Closes #436.
2016-01-06 11:10:26 -05:00
Solly Ross 7e4475fa92 Merge pull request #565 from kanaka/bug/dynamic-rq-resize
Resize Receive Queue to Fit Incoming Messages
2016-01-05 14:28:01 -05:00
Solly Ross 40037b6a29 On-Demand Dynamic Receive Queue Resizing
This commit causes the receive queue to dynamically
resize to fit incoming messages.

Fixes #557
2015-12-22 16:05:33 -05:00
Solly Ross c8f14d175b Disable copyWithin Use in Websock.js
the `copyWithin` function of typed arrays has performance issues
in some versions of Chromium, and doesn't doesn't have enough
of a performance impact to justify leaving it enabled.
2015-12-22 13:51:30 -05:00
Joel Martin b2a813dc73 Merge pull request #555 from maditnerd/patch-1
Small typo in launch.sh
2015-11-23 22:32:31 -05:00
Sarrailh Rémi 54e835eeac Small typo in launch.sh 2015-11-23 13:08:05 +01:00
Ganesh Varadarajan 494b407a0a Add hash fragment as an optional method to supply config variables.
Any config variable like host, port, password, token may be
specified either in the query string (like now), or in the URL hash
fragment. In case a given variable is present in both, the value in the
fragment takes precedence. Supplying variables in the fragment avoids
leaking them to the web server hosting the noVNC viewer HTML.
2015-10-23 18:54:08 +05:30
Solly 6a90803feb Merge pull request #543 from DvdGiessen/fix/vnc_sendpassword_auth
Fixes VNC standard auth using onPasswordRequired callback
2015-10-16 11:08:04 -04:00
Daniël van de Giessen 3e3df4dbb1 Added return to correctly wait for password input before proceeding. Fixes #542 2015-10-16 16:46:10 +02:00
Solly a0e7ab43dc Merge pull request #532 from kanaka/bug/pako-issue
Make sure Pako always has enough room
2015-09-23 11:29:43 -04:00
Solly Ross c802d93189 Make sure Pako always has enough room
Previously, we used a fixed chunkSize of 100KiB for Pako's output
buffer.  Using a hardcoded size caused issues, since Pako would assume
we wanted to use multiple chunks, and we didn't deal with this.  Now,
`Inflator#inflate()` takes a new `expected` argument, which indicates
the expected output size.  If this is bigger than the current chunkSize,
Inflator allocates a new output buffer that's big enough to hold the
output.

Fixes #531
2015-09-23 09:53:00 -04:00
samhed 045d922406 Moved resizeTimout to the UI object, no reason to have it outside anymore.. 2015-09-22 14:59:44 +02:00
Solly 40b35fa20d Merge pull request #524 from kanaka/bug/tight-buffer-overread
Fix buffer over-reads in handle_tight
2015-08-27 18:46:26 -04:00
Solly Ross 89bdc8ce48 Fix buffer over-reads in handle_tight
For performance reasons, the `handle_tight` function skips the
use of the receive queue API and uses the raw receive queue directly.
Because of the way that typed array receive queue gets reused, this
introduced the potential for buffer over-reads.

To address this, a new function, `rQwhole`, was introduced.
`rQwhole` simply returns a new view into the receive queue that
starts at 0 and ends at the current recorded end of the queue.

`handle_tight` now makes use of this function.

Fixes #522
2015-08-26 14:31:23 -04:00
Solly Ross a369a80c24 Fix bug in non-true-color code
There was a bug caused by 38781d931e
which prevented color map look-ups sent by rfb.js from working properly,
since display.js expected a single-item array, and rfb.js sent just them
item value itself (a number) instead.  This fixes that, and tweaks the
corresponding test to match that behavior.
2015-08-24 19:34:30 -04:00
Solly Ross bb180145c6 Tests: Fixed bug in displayed assertion
This `displayed` assertion had a bug that was causing it to not
actually check anything (it was using obj.length instead of
data_cl.length).  This fixes that.
2015-08-24 19:30:44 -04:00
Solly Ross 340290fa1d UI: Fix typo preventing reconnect after password
There was a typo in ui.js preventing the use of the connect button
after a password was entered.
2015-08-24 16:41:00 -04:00
Solly abf2b09ea7 Merge pull request #488 from kanaka/feature/more-perf-improvements
Performance Improvements
2015-08-14 11:56:57 -04:00
samhed a825582196 Only work with integers when panning to avoid getting a blurry image.
Also disable image-smoothing to avoid bugs seen on Android which were
also causing a blurry image while panning.
2015-08-14 17:02:00 +02:00
Solly Ross f00193e08f Skip unnecessary render queue object creation
This commit skips object creation for the render queue when not
needed.  Instead of pushing an object onto the queue, and then
immediately running the result, you call the function directly.
Then, if the render queue is not empty, an object is created and
pushed onto the queue.  Otherwise, the functionality is just run
directly.
2015-08-06 14:47:03 -04:00
Solly Ross b0b5fc55e1 Fix multi-line assertion messages in test runner
This commit prevents multi-line error messages from being
truncated in the local test runner ('tests/run_from_console.js').
2015-08-06 14:47:03 -04:00
Solly Ross 07f514d887 Allow the use of the PhantomJS remote debugger
This commit adds the '--debugger <port>' option, which triggers
the PhantomJS remote debugger.  The initial output of the terminal
when running the debugger gives more information on how to use
it.
2015-08-06 14:47:03 -04:00
Solly Ross 9ff86fb718 Use Typed Arrays for the send queue
This commit converts the send queue to use typed arrays, and converts
message creation functions in 'rfb.js' to create messages directly into
the socket's send queue.  This commit also removes the separate mouse array,
which is no longer needed.
2015-08-06 14:47:03 -04:00
Solly Ross d1800d0960 Avoid Creating Small Objects Frequently
Creating lots of small objects frequently can drastically decrease
performance.  This commit introduces three fixes which avoid this:

- Use a preallocated palette and indexed-to-rgb destination Typed Array
  (the destination typed array is currently allocated at `4 * width *
  height`).

- Inline `getTightCLength`, which returned a two-item array.

- Pass RGBX data directly in a Typed Array to the Display, which
  avoids an extra loop, and only creates a new Typed Array View,
  instead of a whole new ArrayBuffer.
2015-08-06 14:47:03 -04:00
Solly Ross 38781d931e Use Typed Arrays for the Websock receive queue
**This commit removes Base64 (and Flash) support**

This commit converts websock.js to used Typed Arrays for the
receive queue (and tweaks rfb.js to ensure that it continues
to function, since only Firefox implements
`%TypedArray%.prototype.slice`).  Base64 support was removed
to simplify code paths, and pave the way for using Typed Arrays
for the send queue as well.

This provides two advantages: first, we allocate a buffer ahead
of time, meaning the browser doesn't have to do any work dynamically
increasing the receive queue size.  Secondly, we are now able to pass
around Typed Array Views (e.g. `Uint8Array`), which are lightweight, and
don't involve copying.

The downside is that we initially allocate more memory -- we currently
start out with 4 MiB, and then automatically double when it looks like
the amount unused is getting to small.

The commit also explicitly adds a check to the compacting logic that
avoids calling the copy functions if `_rQlen === _rQi`.
2015-08-06 14:47:03 -04:00
Solly Ross 6c883653a2 Remove unecessarily nested loop
This commit removes a nested loop in indexedToRGB, converting it into a
plain loop without multiplication.
2015-08-06 14:47:03 -04:00
Solly Ross 6940936ffc WIP: Switch to Pako for zlib
This commit introduces an alternate implementation of the zlib
decompressor based on Pako (https://github.com/nodeca/pako).
2015-08-06 14:47:03 -04:00
Solly Ross 0442e153a1 Fix RFB.js JSHint Errors
This fixes a couple of JSHint errors in RFB.js caused
by using `==` instead of `===`.
2015-08-06 14:47:03 -04:00
Solly Ross efed2eeafd Fix up vnc_playback.html and playback.js
This commit fixes vnc_playback.html and playback.js
so that they work with the current version of noVNC.
2015-08-06 14:47:03 -04:00
Solly Ross bc4414f5b1 CI: Switch to Container-Based Travis
This commit switches the Travis tests over to Travis's new
container-based infrastructure.  It also tells Travis to
cache the node_modules directory for faster setup.
2015-08-06 14:43:02 -04:00
Samuel 8f3c0f6b9b Merge pull request #499 from samhed/fullscreen
Add option to toggle fullscreen mode
2015-07-01 13:16:53 +02:00
samhed a6357e8276 * Hide the fullscreen toggle button on Safari since alphanumerical
keyboard input doesn't work in fullscreen.
* Force clipping mode in Internet Explorer while in fullscreen since
  scrollbars doesn't work in fullscreen.
2015-06-25 22:37:05 +02:00
samhed 6e296bfa8a Adapt display to be able to handle a changing clipping-setting while connected 2015-06-25 22:37:05 +02:00
samhed 7d1dc09ad0 Fixes #498 - Add the ability to toggle fullscreen mode 2015-06-25 22:37:05 +02:00
samhed b098afc234 Fix error from a previous commit, there is no data type called 'text'.. 2015-06-25 22:34:44 +02:00
samhed 74f2ac968d Renamed popupStatusPanel to popupStatus and removed the global variable
which kept track on if it was open or not (it automatically closes after
1.5 seconds anyway).
2015-06-25 17:04:55 +02:00
samhed 30bfff81d9 Clarified enableDisableClip (now called enableDisableViewClip) and
moved it to where the other clipping functions are.
2015-06-25 15:29:23 +02:00