Commit graph

21459 commits

Author SHA1 Message Date
Darshan-upadhyay1110
fd630d427f Fix Spell checker js Dialog
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Idc0800eaa4ab751601bd34bba6c2e9cfef38de4d
2023-07-18 15:42:35 +02:00
Pedro Pinto Silva
7f2e5df037 Calc: fix document background. It should be white.
With c04c065edc we start to dynamically
set the canvas background. The problem is that for Calc cells do not
have intrinsically a background and thus what we end up to see as the
document background color is actually the canvas color.
	 - Make sure that when we are in presence of calc we set the
	 canvas color (clearColor) with the value coming from
	 documentBackgroundColor
	 - To make it clear: create a new CSS variable to be used as
	 background-document

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4c456e4aeea233609ee58684d967984dd8afd63a
2023-07-18 15:01:25 +02:00
Michael Meeks
b700ea08a8 deltas: further increase Kit delta cache to 96 tiles.
Should help for single user with large screens.
Also dump delta cache sizes on USR1.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Id16a287be6b05cee5681abe1d9d2dc0ec61cda2a
2023-07-18 09:43:34 +02:00
Michael Meeks
226dfe83fb deltas: don't clear useful debugging counters when restoring tiles.
Otherwise when we get under pressure re: canvas' we loose useful
statistics around the number of deltas applied.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I44a089e4af2819007b8f400b506292f8d469ff82
2023-07-18 09:43:34 +02:00
Michael Meeks
ccc3d6277c deltas: fix re-consitution of canvas' from rawDeltas under pressure.
When we need to re-constitute a canvas from the cached compressed
tile.rawDeltas, we could re-enter via var ctx = this._ensureContext(tile);
as we had to populate the canvas with the previous content before
applying our new delta.

Its important to ensure that we don't then try to apply the same
delta (or set of deltas) twice - ie. move the context/re-constitution
before we append the new deltas to the tile.rawDeltas.

Previously showing the same delta applied twice:

Applying a raw keyframe of length 7320
Applied keyframe 0 of total size 264270 at stream offset 0 size 262144
Applied chunk 1 of total size 2126 at stream offset 262144 size 53
Applied chunk 2 of total size 2073 at stream offset 262197 size 2073
Applied chunk 0 of total size 2073 at stream offset 0 size 2073

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ib23bb81e6d3534f140ff3472afed1010c6f98cc2
2023-07-18 09:43:34 +02:00
Michael Meeks
e675dec329 deltas: don't garbage-collect keyframes from visible tiles.
We have no obviously good mechanism for re-fetching them, and
this seems a bit extreme - even if they are otherwise old.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ibaa3d5185493de45efb2887d94b0bf1ee7cac245
2023-07-18 09:43:34 +02:00
Michael Meeks
06619df9ef deltas: handle deltas sent to apply to keyframes we garbage-collected.
In the obscure case: we could have garbage collected the keyframe
content in JS but coolwsd still thinks we have it and now we just
have a delta with nothing to apply it to.

+ show a count in tile debug-mode of this case.
+ re-request a full tile ie. with oldwid=0 if we hit this case.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ide95c54086fcc48d0deed1a090b3b9dd4aa49cd5
2023-07-18 09:43:34 +02:00
Michael Meeks
e3c4fee876 delta: simplify the states a tile can be in when cleaning.
+ don't keep a canvas around if we free its rawDeltas.
+ don't keep imgDataCache around if we freed the canvas.

Change-Id: If3e5be642c9e7560bb889881fa62f25031104658
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-18 09:43:34 +02:00
Michael Meeks
cfa831ee68 memory: add dump_malloc_stats helper.
gdb seems to really struggle with versioned symbols & types in glibc.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ic59020c2e5c88fbeb7799d3f5c06752097a5ad40
2023-07-18 09:43:34 +02:00
Michael Meeks
f41a8bed3e deltas: more unit tests for wire-id fun.
This should catch the case where one view should get an empty
update delta, and the other should get a new keyframe tile.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I3ad8f564cc45d80186430b463214ffcf092346f3
2023-07-18 09:43:34 +02:00
Pranam Lashkari
807f309264 calc: blur address bar when tapped on sheet
problem:
regression from 919db16
when address input has focus and keyboard is open,
tapping on sheet would not close keyboard and bring focus back to map
only way to close keyboard and focus map was to accept the input

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I2c6f23be9efcbbe8e4d47d11505074a75abc000f
2023-07-17 13:07:19 +02:00
Michael Meeks
4d9070b1da Remove long obsolete ENABLE_DELTAS conditional.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I7f254328ba1be8074d8f1feabd7b89304166281d
2023-07-17 11:35:25 +02:00
Michael Meeks
5ed7c326c6 deltas: improve torture testing options.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Idcb708d2686c6a1f40a1a832bf8c0940f9890c1c
2023-07-17 11:35:25 +02:00
Michael Meeks
d309d7199a deltas: fold the update: command back into an empty delta: command.
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
2023-07-17 11:35:25 +02:00
Michael Meeks
85152bf953 Typos: wake-up.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I8ae12c8c8390997bbde7af1e203e9075dfa4ea25
2023-07-17 11:35:25 +02:00
Michael Meeks
b7d7c02a3f deltas: allow JS tilecombine to force sending a keyframe to the client.
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
2023-07-17 11:35:25 +02:00
Michael Meeks
e16f627333 deltas: calm down warning debug around keyframes.
It's fine to be a keyframe and have appended deltas too.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I205e44e0b019b3eec0ce266e9a544b060d0bce4d
2023-07-17 11:35:25 +02:00
Andreas-Kainz
b6c26bee91 Mobile sidebar header layout #6861
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: I8c10857b0ca7e166b5f9364db9ea2a01e5acfffa
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
2023-07-17 10:20:52 +02:00
Andreas-Kainz
81c44946d4 Dark Icons: update toggledarktheme to fit other icon styles
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: Iee02515870d48adc2dcdd2f44ff76fb4c2cf05e7
2023-07-17 10:19:33 +02:00
Andreas-Kainz
4e5159e77c Dark Icon - Help tab icons update
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: I50654f4fc82330e50069761a87e50ada23740ec7
2023-07-17 10:05:18 +02:00
Andreas-Kainz
563ae14953 Dark Icon Update - saved icons
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: I966f44bb79ba0252ca662146f1680984a140bc1c
2023-07-17 10:05:18 +02:00
Rash419
55305d0d28 indirection: use Action_Load_Resp to show error msg
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I682973acfe45b9477bb6df9e8a17adf01e3dda65
2023-07-17 12:18:41 +05:30
Rash419
72570b1ea3 fix: media cannot play with indirection server
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I83d39fa4829938e8f217361fec3fbdab79adbac9
2023-07-17 12:18:41 +05:30
Darshan-upadhyay1110
2369bfc0ac Enter shouldn't be a requirement to trigger a tab or a button
No enter key will not be necessary to change tab by accessibility key

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I9ab9e004e9dc883d18b8f750a9a400e1f318240e
2023-07-16 09:16:02 +02:00
Rash419
8c5d822dc9 android: fix: save failed error while parsing save command
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ia6a53184322f403d2b995213700193d5612fd63d
2023-07-15 20:33:18 +05:30
Rash419
371cb21d5d android: after sdk 30 WRITE_EXTERNAL_STORAGE is not required
- android will not even show a popup
- for some reason after sdk 33 checkSelfPermission returns PackageManager.PERMISSION_DENIED for WRITE_EXTERNAL_STORAGE even if it given permission implicitly by android

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: If50df0df0322d0bddf30d5ff5fb13ab9c010ed87
2023-07-15 20:33:18 +05:30
Darshan-upadhyay1110
ddef0ef881 Fixed Spellcheck dialog size
Set Minimal width for suggestions list
Added some padding for spell check text box for more readability

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I0fa5bb60ece88e4107408448a17378b526020784
2023-07-14 14:32:22 +02:00
Szymon Kłos
6124d3abd1 notebookbar: tab focus cycle inside tab page
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0daf9a068802470a45cfd203577a2b5f01c7cfc5
2023-07-14 10:32:34 +02:00
Szymon Kłos
a58c802d5b Create util for doing tab focus cycle inside container
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I25b44ebd1954301de4be0a4b4d22286f026a62fe
2023-07-14 10:32:34 +02:00
Pedro Pinto Silva
ee592d97bd Compact view: Add missing InsertObjectStarMath (formula object)
Before this commit this option was only available on tabbed view

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6e027f1b84d09e802f7ea6c6fd9e5144cae2eb91
2023-07-14 09:48:20 +02:00
Szymon Kłos
3d6ed28857 Fix pasting image assertion
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
2023-07-13 20:06:58 +02:00
Pranam Lashkari
919db1674f keyboard: show keyboard only when explicitly requested
problem:
on mobile phone keyboard used to flicker when you tap on cell,
even if you were not editing inside cell

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I47d940ef32297fdf846ed4370411743982fcd3b7
2023-07-13 20:17:32 +07:00
Szymon Kłos
4c3be8555f comments: fix hidden comment after lost focus in modification
after commit 51d19dd60e
annotation: avoid saving comments on losing focus

We had regression causing collapsed comment to be completly hidden
if user first opened 'modify mode' and clicked outside comment
area. Then comment was collapsed but when selected again - content
wasn't shown.

This commits makes us sure that when we select comment again
it has visible content.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4fc9f0bb7d6649c0aa88bbb9c4cc69ed5cbf57c9
2023-07-13 10:43:17 +02:00
Michael Meeks
a064fe66ba tile debug: toggle tile debugging mode without bogus invalidation.
Show the existing state as-is to aid debugging, rather than
polluting it with bogus data, also update the screen immediately.

Change-Id: Ia6f0033208a5ad29eca374f24f215ffc5104301c
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-13 08:14:48 +01:00
Michael Meeks
9270ceef16 update: send for redundant tilecombine requests.
Update tests to check for this too.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I02c8f3167886321496245589b34a382fd61617f0
2023-07-13 08:14:48 +01:00
Michael Meeks
24f0819337 tile debug: render updates as well as deltas in the tile.
re-factor histogram rendering out, remove crufty paths to track
tile metrics and do them unconditionally - some counters should be
small & fast & simple. Simplify debug output of tile/deltas.

Change-Id: I3b615719ae2540f855597e52e6c35594dbe5b3f4
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-13 08:14:48 +01:00
Michael Meeks
8e91eafbf2 Cleanup JS tilecombine generation and reduce copy/paste.
Share sorting tilecombines by part, and de-duplicating on key.
Ensure we build wireID list and send oldwid data to save
bandwidth and avoid re-rendering keyframes un-necessarily.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I8180fceca22f1369e577bba4de7fd8a6fdbc011f
2023-07-13 08:14:48 +01:00
Michael Meeks
9a29a346d8 Allow tilecombine's to send oldWid information to fetch deltas.
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>
2023-07-13 08:14:48 +01:00
Pranam Lashkari
7cf1e19493 impress: avoid all slide preview context menu in master view
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I9f661df619581aa9d66d98f7e63c3562c6a939b9
2023-07-13 10:08:24 +07:00
Szymon Kłos
0832fb7f99 Avoid using null in notebookbar a11y code
happens for example in Impressi on load

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4d9f8fbb2ba996bdecd33c54bbc198d9ed82ce89
2023-07-12 14:22:54 +02:00
Szymon Kłos
a5bc10185a comments: avoid using undefined
refactor a bit condition introduced in:
commit 51d19dd60e
annotation: avoid saving comments on losing focus

I noticed TypeError here at some point in my browser

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I416088333bb0c87b03c52aff3804fee8f7ada311
2023-07-12 14:22:54 +02:00
Pranam Lashkari
81bfaee859 language: introduce option to change language of only para or selection
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: If9086e72f53c3620c9d3e605b9e0415bdebab730
2023-07-12 19:14:44 +07:00
Ashod Nakashian
752f2a4ae1 wsd: save and upload rapidly when unloading
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>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
ec120ccfab wsd: test: enable testCrashForkit
Change-Id: I2acabeccda6caf660c73f2f46fdd96a4b3f28972
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
2fd159bc0c wsd: better always-save-on-exit handling
Change-Id: Id718f81fc2eb0af5ca5bfe61e687de5258dbdd7d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
75b1cbcb11 wsd: better detection of upload skipping for save-on-exit
Change-Id: I0b8c6dc7429587cddff6304aaf501f24af896602
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
2756d48a5a wsd: test: new UnitWopiLockReadOnly test
Change-Id: I67aec627737fd3e67ad576aaba378b7391641b87
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
68e20add3b wsd: better data-loss detection
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>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
0a969e5006 wsd: better modification detection after saving
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>
2023-07-12 07:00:41 -04:00
Ashod Nakashian
f383cf9032 wsd: always-save-on-exit skips uploading as-loaded docs
Change-Id: Id38c2b708d9d440cedb3d51b345bf180af0349f8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-07-12 07:00:41 -04:00