When IME is enabled and user presses the space button, firefox
sends 'compositionend' event with data = ' '. However, chrome
instead fires 'textInput'
event. Lets listen for 'textInput' event too and treat it like
'compositionend' event when data = ' '.
Change-Id: Icbebdf2e89f608f790e6ce68c49f474364e7d5ab
Parse the compositionend event's string, convert each into a char
code and pass them individually to server.
Change-Id: If79d538ccaebaa29749a5ca48a1f6ed5e0689ed5
Since Poco receiveFrame expected the buffer to be
at least as large as the frame, otherwise the socket
had to be closed, we sent a 'nextmessage' frame
before sending large frames with the payload size.
This caused many problems, not least related to threading
and lack of atomicity when sending large frames.
There is another API in Poco that doesn't have this
strict requirement, one that expects Poco::Buffer
and resizes it as necessary.
One potential issue is the possibility that a malicious
attacker might send very large frames to force the
server into allocating large buffers to read them,
thereby destibilizing the server, if not bringing it
down altogether.
Change-Id: I05014d54c3a1464f629ed82d761a7a65e4941985
Reviewed-on: https://gerrit.libreoffice.org/31184
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
tile and tilecombine have grown organically
and gained optional fields when originally
all fields were required.
Since internally we deduplicate them, we need
to compare the required fields and not the
optional ones. By moving all optional ones
after the landmark ver, we make comparison
easier and, hopefully, less error prone.
Change-Id: I309185d3e19a45c7d59bc872e8a76acd3c511c14
Reviewed-on: https://gerrit.libreoffice.org/31182
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
While some value of jitter is default in debug builds, one should
easily be able to disable this latency stuff using env. variables
LOOL_WS_DELAY=0 LOOL_WS_JITTER=0
Change-Id: I345df8f48adc69b5f237f18c981172441d21c757
Have a new event 'warn' which doesn't change the document
permission but just show the user dialog with some message.
Change-Id: I455168e4f7315acdcccfb31fc8c70b86bbc6caad
The new behavior is to warn the user when we try to save to
storage and set all the sessions of
the opened document to readonly, if storage server has no disk
space left. In case of WOPI, this is intimated by HTTP response code 413 -
request entity too large.
If save operation to storage failed due to reasons other than
413, just warn the user and let it continue editing the document.
We can add more reasons of failure and act accordingly in future.
Change-Id: I4b046fc38bbc0d752c89d90acb5991a958b76670
Alerting all users is done from different contexts.
One such is when loading a new document.
Since both alerting all users and loading documents
need to hold the same lock, this would deadlock.
The solution here is to differentiate between
external alerts and internal ones (to WSD).
The internal one expects to be invoked while holding
the lock, while the external one always takes the lock.
Care should be taking when alerting from within WSD to
avoid this deadlock.
Change-Id: Idf0e952db1216a3d161f22c7da51af16701f685b
Reviewed-on: https://gerrit.libreoffice.org/31102
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Only enabled in debug build. Default values for base delay is
10ms and jitter 5ms.
Override using LOOL_WS_DELAY, LOOL_WS_JITTER env. variables
Change-Id: I50502613075d6f73365623b93eb17748fe96fcc3
It was written in one conditional branch and was read in an other
conditional branch. So make sure no uninitialized data is read.
Change-Id: I230c6a4d3b048ee9d7f96881baf00eb041204ff0
Amazingly, this (my third attempt) seems to work.
Add a boolean 'forAllClients' parameter to the loleafget getPreview()
function, and pass it as true in the location where a new preview of
an edited slide is requested.
Add a parameter 'broadcast' to the 'tile' (request) message. Set to
'yes' in the above case. When subscribing to a such tile rendering,
subscribe all sessions of the document.
While at it, drop the default values for the parameters of the
TileDesc constructor. I dislike default values...
Change-Id: Idb438f11c953d791fafe4c890e0497d8dfbaa733
Reviewed-on: https://gerrit.libreoffice.org/29591
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
Users aren't bothered with connection errors when inactive.
Instead, when they try to re-activate, the connection is
re-established, and only if that is not possible does
the user see the disconnection notice. Otherwise,
the connection is re-established semi-transparently
(the is a small "connecting" status shown at the bottom).
Change-Id: If4735cc1593c6e29c65d3c9686a8f2861365c583
Reviewed-on: https://gerrit.libreoffice.org/31026
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>