Commit graph

18217 commits

Author SHA1 Message Date
Rash419
0a203ad91e cypress: added desktop calc/autofilter_spec.js
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I48f4ceb591cbdf178b08b44ad1f833b52d5c004d
2022-05-10 22:31:16 +05:30
Szymon Kłos
4f8a29a2a5 formulabr: remove reference marks after use
previously when used formulabar to type: "=SUM("
then selecting some range using mouse and "ENTER"
- referenced range was still visible

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I357b1ef51ad4d46e3e332decda0332ac4f9ad1d7
2022-05-10 14:00:54 +03:00
Szymon Kłos
03f842a385 formulabar: handle ctrl and shift keys
send SHIFT and CTRL modifiers
don't add event listener if not needed (rawKeyEvents not used)

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I5c3487e8655c33f1bf9cabcb2308428a27c18a95
2022-05-10 14:00:54 +03:00
Michael Meeks
1eb03824e2 delta: disable PngCache for deltas.
Change-Id: I5019b645ccdc02ab813db5e3e421f920681f05e5
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 11:48:33 +01:00
Michael Meeks
7b595366f3 deltas: promote width before multiplication.
Change-Id: Iddbb2b29bb39f091d891faf02642953da563e31a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 11:48:33 +01:00
Michael Meeks
486ab2fa86 deltas: add and show debug counts for both keyframes and deltas.
also color deltas as yellow when debugging.

Change-Id: I75e7f92708937adb31106e46e9771115320fb8d6
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 11:48:33 +01:00
Michael Meeks
c0cd95b8fb delta: document ids decorating previews.
Change-Id: I2f6ade6c2de962c24f7b1a10c57aeb065b62e679
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 11:48:33 +01:00
Michael Meeks
a67b64218a For now detect a delta by size and warn.
Change-Id: I93c0678d8329d9cb4acb9ce30d505c06888063d4
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 11:48:33 +01:00
Michael Meeks
1d3142feac Session: remove un-used headers.
Change-Id: Icd0d7c1a6abce9157fd23f0c347866a58033e48c
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 11:48:33 +01:00
Henry Castro
4a002845f6 browser: remove unused Zlib embedded library
Change-Id: I58b6146d33adce9211143083c393834bff9ece56
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-10 11:48:33 +01:00
Henry Castro
e15a4dea4e browser: use pako to inflate zlib
Change-Id: I3486692fb38f26778ede69c14c64c3886f3565f1
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-10 11:48:33 +01:00
Henry Castro
9e885e025b delta: add return image size
It will be used to instrument the return output size

Change-Id: I9f779ff5532d2181da6d6c98060859842e145c0b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-10 11:48:33 +01:00
Michael Meeks
47275c6f9e This should do something cooler.
Change-Id: I90d6028c91e88034b48ab91de7429ebde5ba5c25
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 11:48:33 +01:00
Henry Castro
94c42ae43b kit: simplify initialization delta data
Change-Id: Icd7e8d2614eb97790f6e2533db3cd7eec5511a4d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-10 11:48:33 +01:00
Michael Meeks
fb0819191c delta: optimize un-premultiplying identical runs.
Change-Id: I67baab6c6378385da65cac0090923d6abbb44382
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
4b0b73bec9 js: apply multiple deltas in one blob.
Change-Id: Ied8662ad54ecf76e0e3140a54b2763539f5523d3
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
d8dff82f24 Don't re-use old wire-ids, we want to monotonically increase.
Change-Id: Ie819b73edba175749ed6edf170af326b7b825bac
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
92f47cb4a3 Do a straight putImage without getting first for new tiles.
Change-Id: I35ef4292d3342febcb7db21348b857f0e50ecdb0
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
01abe2326a Avoid re-creating and initializing canvas tiles un-necessarily.
Change-Id: I94ace82baede5c341f770cef4d910c24f95ca87e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
b6445a9692 Un-pre-multiply pixels in deltas and BGRA -> RGBA swap.
Change-Id: I31eaf0580cfb9d43df3e85a5f15ae0443b6941f0
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
f76522c86a Compress raw images too directly with zlib.
Change-Id: Idb54db1c3a3d6970db0782b2a7a2eebbad27f153
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
0df3e41879 deltas: make delta creation & caching thread-safe.
Change-Id: If134ac6212850beadb262a4b8f4c084c78d8a44e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
099ebaa089 deltas: add delta deflate compression.
Includes a horrible inlining of minified zlib de-compression (MIT)

Change-Id: Iaf5f9f5e1215458836e26d45e48e436ee52c48ef
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
bfc4699ffb deltas: enable monotonic wid incrementing, build deltas based on pos.
We want to always generate a delta vs. the last state we have so we
move linearly forward into the future.

Change-Id: I730d1dfb125a19e2c48b8f84ad5563664d196ab0
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
8eebe1e345 Tile-deltas, expose TileData to unit tests.
Change-Id: I5f33a56009927187b460775129f0818f47843368
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
71ef6cb4a5 Switch Tile to have a list of deltas.
For each tile, the wire-id will grow incrementally for each key-frame
or delta appended; so we can tell which deltas to send.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ic5f201d23273c37eed232c5932b9da854e80d06a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-10 09:35:47 +01:00
Michael Meeks
5abf419bc8 deltas: switch tile.el to be a canvas when that makes sense.
Makes rendering interactive again, and removes the async 'load'
from the delta application code-path.

Change-Id: Iaf95b24b299f6614b37f4188afcdbd95a4a8f673
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-09 16:40:57 +01:00
Henry Castro
f19348f0c3 browser: fix bundling error
The uglify tool does not support es6

Change-Id: Ia87651ad39064889c99922b5e910bd4bcaf09885
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:40:57 +01:00
Michael Meeks
0fd95cc2ac deltas: add comments to classes.
Change-Id: I49a714ab79b37b77455a9d31b6a3e74fd43973b1
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-09 16:40:57 +01:00
Michael Meeks
8aff82aca7 Cleanup and fix issues in delta creation.
Change-Id: I05ac31d2b968821909e975622a0f52a7f6189369
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-09 16:40:57 +01:00
Henry Castro
299457e49a browser: add tmp module package
Change-Id: I2daaf027ea9888f9e543f7543cccd129e1c3bf69
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:40:57 +01:00
Henry Castro
a56cefc56f common: move "hashSubBuffer" function
Change-Id: If171b7cf4e636e24cb7f757d893136927e8373aa
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:40:57 +01:00
Henry Castro
e3c170cf94 browser: add pako dev dependency
https://github.com/nodeca/pako

Change-Id: I115c6c729f6783a23856a0e41f1908a7fc7f61fe
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:40:57 +01:00
Henry Castro
28d940eb93 browser: fix jsdom exception drawing in canvas
jsdom requires that the tile is a HTMLCanvasElement element type

Receiver.dataMessage (private/mmeeks/deltas/browser/node_modules/ws/lib/receiver.js:51
7:14) TypeError: The first argument must be an object
    at CanvasRenderingContext2D.ctx.<computed> [as drawImage] (private/mmeeks/deltas/browser/
node_modules/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js:124:17)
    at TilesSection.paintSimple (private/mmeeks/deltas/browser/dist/bundle.js:1:136355
4)
    at TilesSection.paint (private/mmeeks/deltas/browser/dist/bundle.js:1:1364132)
    at TilesSection.<anonymous> (private/mmeeks/deltas/browser/dist/bundle.js:1:136981
2)

Change-Id: I55b77e3a9ae80afd519f1a6c6c5388070c85193e
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:40:57 +01:00
Michael Meeks
e382d52102 deltas: batch tileprocessed and send together.
Should enable a multi-tile-processed optimization later.
For now lets us see which tiles are read & applied together easily.

Change-Id: I6e0bf13fc4df7b43503637d749753aaad828464e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-09 16:40:57 +01:00
Michael Meeks
104e4b35cf deltas: remove redundant copy/paste code: _onTileMsgFileBasedView
Change-Id: I57539b35a091cad3718e511270bbf57a2849a60c

Change-Id: I495a91fcdd1db8cd0e47f12131e8e5a61bb90799
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-09 16:40:57 +01:00
Michael Meeks
798eb25008 Cleanup performance traces.
Change-Id: Ie4a19485dc82ec3f6bc782dd3246543ac6968411
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-09 16:40:57 +01:00
Michael Meeks
0a983d1282 remove unused TileCache::removeStream.
Change-Id: If517f8f5426086fe40871027d241250d6d34e67f
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-09 16:40:57 +01:00
Michael Meeks
414c36c6f5 Add conditional delta creation back.
Change-Id: I374e4fd0404ee8caa0f81d6de24a55220ae23c91
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-09 16:40:57 +01:00
Michael Meeks
4140bf8741 Bring back the delta application JS from the 6.4 branch.
Change-Id: I13329e1e7ceeb1fc611193ccaa78fc4e799e1869
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-09 16:40:57 +01:00
Henry Castro
df96b97f88 browser: allow cursor jump if text selection is empty
Otherwise, if the user selects all the document,
the clipboard blocks Page Up or Page Down cursor jumps.

Change-Id: Ia9c432646c51063775bb7cca6a998e7d1cdcdbf2
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-09 16:08:14 +03:00
andreas kainz
dd3134d554 .w2ui-button use var color for :hover
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I3b77ba1e99dee24e74f9f839de5590d0a0def939
Signed-off-by: andreas kainz <kainz.a@gmail.com>
2022-05-09 12:54:37 +05:30
Ashod Nakashian
1c07d507ee wsd: do not enqueue messages on closed sessions
Also corrects the counting of number of active
sessions when broadcasting messages.

Change-Id: I5ab5995ed2cbc18b215542d0b2c9568957fd6a3a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-05-07 14:14:22 +01:00
Ashod Nakashian
a674a0d52e wsd: detect lost upload on exit and dumpState once only
Change-Id: If5a9601d9baa10dcdab38c57bfba82a45d8e5024
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-05-07 14:13:41 +01:00
Henry Castro
f65afcf5ff browser: fix show feedback dialog
When user click the menu options.

Change-Id: Ia53126b5c2972149839de501214d0a1cb2b5fc6c
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-06 18:50:54 +03:00
Ashod Nakashian
4bf085f195 wsd: correctly set termination and shutdown flag
We should always set the shutdown flag first.
Otherwise, we run afoul of a race condition.

Change-Id: Ic99793d68b3b943496ff932b4bdafd336fef7f82
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-05-06 14:45:34 +01:00
Ashod Nakashian
c5e533f943 wsd: forced exit after cleaning up jails
The static instances cause a lot of grief
when they aren't called in the correct order.
Worse, when we are cleaning up, we don't
even initialize some of them (Admin, for one).
This means that a normal exit will destroy
what isn't created, in some cases (Admin) it
will even force creating instances when we
are destroying others.

This avoid all this by simply exiting bluntly.

Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 231fae4ebd990cb344143759cbdfa19c4f30d4f2)

Change-Id: I6a9443ca5ab999ed6ca1d27314136472cfc6ddb6
2022-05-06 14:45:34 +01:00
Ashod Nakashian
757529aad2 wsd: cosmetics
Change-Id: I85773b4c06c051ee8c52c353e26dd6149c7843de
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-05-06 14:45:34 +01:00
Ashod Nakashian
c6561a99d8 wsd: test: correctly stop SocketPoll in UnitTimeout
Change-Id: I97317e8155e5c65d12e985cc837f07bfcf6a56d6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-05-06 14:45:34 +01:00
Ashod Nakashian
9a69adf766 wsd: test: always set the test name
Change-Id: Ibce5cf049ad1a1df7b11412ed7160d280ece60f3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-05-06 14:45:34 +01:00