tile = this._tiles[key];
if (!tile)
tile = this.createTile(coords, key);
^^^^
The value assigned to tile here is unused.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iaabaa6417bcbf385ff2bde139663f8bd2e90db49
Instead of spending time re-compressing canvases as pngs and
base64'ing these into URLs, lets just keep the nice, pre-compressed
zstd keyframe around and its associated deltas, in case we need them.
Move to a simple LRU time for cache eviction of all types: sorting
_tiles by last render time. Collect garbage regularly while working.
Enforce canvas count, compressed arrays and number of tiles limits
under a high watermark. We should have enough canvases around to
keep rendering snappy, while not jeopardising our ability to allocate
larger document canvases to render into.
Re-create canvases if/as/when we need to render them from our
cached compressed versions.
Re-factor and simplify createTile, pass section into foreachTileInArea.
Includes parts of:
Partial fix for issue #5876 discard excess canvas contexts
WKWebView has a hardcoded memory limit for all canvas contexts
so if canvas.getContext('2d') returns null, convert the canvas
of other tiles to an image until canvas.getContext('2d') succeeds.
Thanks to: Patrick Luby <patrick.luby@collabora.com>
Change-Id: I5117b0986aa46d2fffab6cd66d990de39dfcecea
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
We no longer need to track their loaded state, loading errors etc.
Change-Id: Icfa82807a800fc7a7406c130de22eb600324f61d
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
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>
../kit/Delta.hpp:96:23: runtime error: index 4 out of bounds for type 'const uint64_t[4]' (aka 'const unsigned long[4]')
#0 0x558e8e0f800b in DeltaGenerator::DeltaBitmapRow::PixIterator::next() libreoffice/online-san/test/../kit/Delta.hpp:96:23
#1 0x558e8e0b8304 in DeltaTests::testRleComplex() libreoffice/online-san/test/DeltaTests.cpp:317:16
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I01da1e99b5d224411344659dce8bd2f29e7d74b0
Fixes#6650
When opened empty hello-world.odt document and
then in dialog Format->Paragraph switched tabs
and then returned to "Indents & spacing" - some
fields were marked as invalid.
This was caused by agressive validation done by the browser.
Let's adjust step to min and max value also to avoid these
errors.
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ie7784fdd85cda725a816842a7915efffcab22d0b
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
Store a bitmap of whether a pixel is identical to the last
pixel in a set of four 64bit members. These double as a
simple CRC. Store the allocated row size too, and use the
stack as a temporary scratch-space to do the building in.
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Un-necessary allocation overhead for now, but more follows.
Change-Id: I1012678daf021cf63d8fc6e52d25d2dec703c4fb
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
this should presumably be checking caps_none not caps and is a cnp
error
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I46f381fbec31b3e9c311f1becf0c536c192788fd
This way they:
- Align to checkbox
- And have additional padding in places such as Format > Paragraph
Line spacing 's dropdown is glued to "of" label
This also fixes one task from https://github.com/CollaboraOnline/online/issues/6647
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I53e66602dffbc96db39449cbda53d433a9dd12d8
We have http::Response specifically for
this kind of thing.
Change-Id: I4cc24378741bb1da76967e9c01a33060d11cdc4b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
In some cases we may not have permission to create devices.
This happen on nodev systems and some containers. In
those cases, we gracefully fallback to bind-mounting.
Ideally, we would like to reduce the number of bind-mount
cases we do per document, which i why mknod is preferred.
Cleaning up works without modification because the
random devices are mounted in /tmp (in the chroot),
which itself is bind-mounted. So removing it is
sufficient.
Change-Id: If9a4f0a511273952ead95d6c6855ca2becaf757f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
In some cases jail cleaning up may fail.
In such a case, we still want to be able
to build a fresh set of binaries, which
are used to run coolwsd --cleanup.
Since cleaning up the jails and the
systemplate are not strictly required
to building, we now only emmit a warning
and move on.
Change-Id: I4ebf7772cf767b579810247c427d86efa5a6d3ad
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
Added condition for focus on textarea so ot will handle the keyboard in mobile view to stop flicker.
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I8cb6211a3605503f4144a3c48e059960cf461617
addmb-menu corresponding to add to dictionary seems to be a dropdown
that is not enabled in online. And we do hide the main component by
making use of hidden class. Nevertheless, and even though that is
never visible, we keep getting the file not found in the console.
- better to add an generic alias for that file so to avoid that error
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic9ad2d9cb07fa1f496166d3653bbf81de3f310d0
Remove un-necessary gating of wakeup() on stop un-related to
callbacks or new sockets.
This reverts commit 25f2581a30.
Change-Id: I9f9f30fed34c973b86206677168071abb81afa6f
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
added slide hide/show option in presentation bar
rearranged icons to align them with core UI
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ic4b121ab5d9ab21d8f48e68bb07e51a31442586e
We throttle the "move" event, but in moveEnd we always call
a _move anyway, so if there are throttled moves still
pending by the time moveEnd is called then there is no point
processing them after _moveEnd because we are up to date
already when they arrive and to do would just duplicate tile
requests
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I15c6fe5f0f1b6171a299a4519138912000dd9b68
rational: building for release takes a lot of time and we
neither package, nor run (most of) these unit tests when
we make packages.
CI runs all of these tests before merging PRs, so risk is low,
if we do not run the few build-time unit tests when we package.
make -j12
--enable-tests (default): 3m 18s
--disable-test: 1m 9s
3x faster...
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I4edd98af55748432e30c65c4c910e72c0221272a
Only Chrome browser validate number inputs if it is
defined the attribute <input type="number">.
Unfortunately, it is not possible to get the cursor p
osition to validate too.
Change-Id: I73ef692498caa348a5b8d376cbfcfca0c146816b
Signed-off-by: Henry Castro <hcastro@collabora.com>