Text messages are already utf8 decoded, so we only need to decode
if its a binary message, not otherwise.
This also fixes context menu invocation on the UI as in some
cases double-decoding of utf8 strings would throw a URI malformed
error. This problem started to appear after we explicitly started
sending context menu payload as text message rather than binary
message in ecd33e1b07
L.Polygon can take array of latlng pairs. Lets pass the full
array instead of passing each array element one by one and
creating Polygon instances everytime.
Minifiying the js code was taking too much time. Minifying is not
really needed on developer's machine, so lets disable it by
default, otherwise it gets annoying during development having to
wait for so many seconds for it to build.
A simple 'make' now means no debug-info and non-minified
bundle.js. To add debug-info(source-maps), do 'make DEBUG=true'.
And to minify, similarly use the MINIFY=true variable with make.
'make dist' forcefully minifies the js code.
splitterChannel can be a raw pointer, at the end it'll be assigned to
channel, which does not call duplicate() on it. As a side effect this
fixes the use-after-free warnings reported by clang-tidy.
Change-Id: I8f5d7c9f6c8f280c9f1222c2ab6d7b0fddf64a30
Reviewed-on: https://gerrit.libreoffice.org/28145
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
For impress, call to initializeForRendering() *changes* the
viewid, so there's no point in remembering the viewid before call
to initializeForRendering().
This command is intended to be used when re-activating a
client. It is intended to be sent prior to sending the
list of active views, including the re-activating
client's own view.
A client UI must maintain its own view ID and info
when receiving this command.
Change-Id: Iea58c01fb30af139888e746b5cf9e7ba7e7eeab1
Reviewed-on: https://gerrit.libreoffice.org/28132
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
The new commands help the UI update the cursors and other
visual elements that track views and clients.
Currently, when remview is received loleaflet removes
the associated cursor from the screen.
Change-Id: I03e2f9e3485166adae31de84ae7ac6bd1c85b05d
Reviewed-on: https://gerrit.libreoffice.org/28131
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
ChildSession and Connection are run their own thread and
their destruction depends on the connection, which of course
is completely asynchronous.
This change fires the destruction of the ChildSession, which
unloads the view, without destroying the connection.
The latter is cleaned up when purgeSessions() is invoked.
Change-Id: I341bfdbdd4b37338d1813ec707a51aeb3be59497
Reviewed-on: https://gerrit.libreoffice.org/28130
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Each ChildSession had its own thread and queue,
which was an overkill. By moving the LOK callback
handler into Document and handling all events in the
same order that we receive them we reduce resource
consumption without affecting performance.
In fact, performance could improve by avoiding
unnecessary overheads.
Change-Id: Ic2bac0f08c28e91acabd512a704966c6b761fc7c
Reviewed-on: https://gerrit.libreoffice.org/28124
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
Callbacks from Core are now per-session and not
shared among all. A new descriptor is used to
help get from the callback to the respective
session.
Change-Id: Ie72771da05eef4760cf01351f7c06c034abf5109
Reviewed-on: https://gerrit.libreoffice.org/28122
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>