Also: address parts of #6897, primarily:
* remove the problematic aspect of bumping the last wid in our
TileData, when this could trigger a re-send of a previously
sent delta, causing tile corruption.
* instead append an empty wid entry.
* as an optimization - if the last entry is empty update
the wid - since re-sending an empty delta is of no
concern.
* simplify a number of code-paths that special-case zero length
deltas. All deltas now commence with 'D'.
* still track updates in the JS - by detecting empty deltas.
* shares more code and simplifies various paths.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I02af6d4b152524c201b6985b7a3497da7f08a517
However, don't force rendering a keyframe, only sending it - other
clients may be happy with deltas. This is to better handle:
window.app.console.debug('Unusual: Delta sent - but we have no keyframe for ' + key);
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I4efff0f6b1d2817e6b8bd567eb3b098383a1ef42
Revert "Avoid crash when pasting image in debug mode"
This reverts commit 78558fe9af.
Instead of detecting paste command and not trigerring assertion:
fix frame type so it will be binary in case of paste.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If5c726463459be7eaffae1522df522dfa1d74443
Disable the 'forceKeyFrame' for tilecombine messages from the client,
we have a larger cache now and it makes sense to honor and track these.
forceKeyFrame was signalled with a zero oldWireId - which is the default
if we don't have it set.
Change-Id: If96423e96f8dc578a634ed5093517dfa6702cc1b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
We normally throttle saving and uploading to
avoid hammering repeatedly, but when unloading,
we reduce said minimum wait by a factor of 10.
This allows for a quicker unload cycle, esp.
if we had just saved before unloading, or
if there was a previous failure.
Change-Id: I8710c9b86c05254ad9b9735d8496dd96900221e2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Had to disable a crash test due to incorrect
modification check before unloading.
Because we think there are modifications to
the doc, we issue a save, which will fail
because the kit is killed in said test.
Will be re-enabled when isPossiblyModified
is improved.
Change-Id: I0dd7931308e66e9a12d891a979d54e3f373ef99b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
And now UnitSaveOnExitUnmodified verifies that
we do not unnecessarily upload unmodified
documents because always-save-on-exit is set.
Always-save-on-exit is meaningful only when there
are modifications. Otherwise, we create identical
copies as separate revisions.
Change-Id: I933069d31d3d273c41734b58e0849680566e591a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
This improves the disconnected session cleanup
and fixes a corner-case with the last editor
disconnecting before read-only sessions.
Change-Id: Iecb553d7f5be2c63fc55111e60e22b3d8aa668f6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Added toggle button/menu entry for enable/disable accessibility support.
This ui feature is available for Online Writer only.
The button/menu entry is added only when accessibility is enabled at
server level.
That allows to enable/disable accessibility per view.
By default, the accessibility support is disabled.
Anyway the accessibility support state is saved to local storage
if available.
Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: If5968a47f17922038b9da3d320cbed84ebb7688b
Calling a PUT before a GET would cause a SEGV around managing the
internal list of files.
Re-factor to ensure we always have a valid LocalFileInfo to
work with, and simplify and cleanup code-paths.
Change-Id: I2b206bb8bdebc3c44cd55c61048da9b0dc30dbd5
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
also re-work parseInvalidateMsg to not use std::pair<> returns.
Change-Id: I724783b7050a1ee251dfbe9b2f1e0ea02e7d45f2
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
A zero size delta means we're effectively up-to-date for this new
wireId.
Change-Id: I96abdf00648f7c2f833ffd56bd43980265b8d490
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Suppressing needToSaveToDisk silently when we cannot
save, because there is no Kit f.e., is unhelpful.
Now we have these two states separated out and
we log appropriate information in each case.
Change-Id: If38798578a7b88600e3f07c88e0bcbf833ae53f0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
And tile::needsFetch on that result will always return true given the
default of invalidFrom of 0 and the comparison of
return this.invalidFrom >= this.wireId || ...
so the tile return from the cache is unusable.
It is typical for a request not to have a wireId, if we don't use the
cache then doRender will send a timecombine result with wireIds set. But
if we use the cache here we send a response using the wireId of the
request.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I586406af86b0f503dfc204e20120cc8acebf5b8e
The browser will block the cookie if it is sent
over an insecure connection
"This attempt to set a cookie via a set-cookie header was
blocked because it had the "Secure" attribute but was not
received over a secure connection."
Change-Id: I36faac0d9d3a73eed463c2580e5405d61a3a18f5
Signed-off-by: Henry Castro <hcastro@collabora.com>
- controller used to send two messages first to save then
once saving is done migrate the document
- now controller only sends one message, COOL handles
unsaved document
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Id4afe1f9a04ef99005d7f0dbd6246826ba82442b
This stopped working well a long time ago, and is already disabled
on the coolwsd side, so dung out the rest of the code & docs on this.
Change-Id: I2e0b73fe9780e16c3cc74ae3a38ae6b04434717a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
array_null: Comparing an array to null is not useful: "false",
since the test will always evaluate as true.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib34694022484e9041827980c0b67fe614446f4b9