Commit graph

2627 commits

Author SHA1 Message Date
Caolán McNamara
01165fbe1f On a cache hit for a tile the result typically had a wireId of 0
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
2023-07-05 11:49:34 +01:00
Caolán McNamara
2fd50d8965 cid#318897 Using invalid iterator
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I977f65bbd11060fecf4db31e7e25e068771c17b7
2023-07-05 11:49:03 +02:00
Michael Meeks
61aa932d30 Send an 'update' message for an un-changed tile when rendered.
Change-Id: Iefe666f9953195af0001626a9e8d7d080a7fe201
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-03 20:27:07 +01:00
Michael Meeks
023a243982 De-confuse two different sendTiles.
Change-Id: Ib67093b9cb61ff7e856db5c8d98178c0afbdf555
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-07-03 20:27:07 +01:00
Ashod Nakashian
b18c92aa31 wsd: simplify logging logic
Change-Id: I140d23e4e82e24c5ac66df4b485bca016f1eb22a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-30 21:45:40 +02:00
Ashod Nakashian
7824df4926 wsd: notify the client of loading errors
Change-Id: Ied18f6820a7c3ceb4cc29200111c4a73442d2808
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-30 21:45:40 +02:00
Ashod Nakashian
5fdc4f9623 wsd: better logging of document and session loading
Change-Id: I0cdf08bf711499e63f09c3db6f3f47e873eb3b59
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-30 21:45:40 +02:00
Henry Castro
e5b4036627 wsd: fix secure cookie Set-Cookie
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>
2023-06-29 20:47:08 +01:00
Rash419
fcce324cbf admin: added retryInterval option in monitor config
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: If0b94bb043a6a4883affac6cf38adcffd3b72b9a
2023-06-29 18:21:33 +02:00
Rash419
9d1741232b admin: added wopiSrcMap command
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I95a7ccec6075848bd18b8899119c720aa303a106
2023-06-29 18:21:33 +02:00
Rash419
d63bca3f8e admin: migrate document after saving
- 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
2023-06-29 18:21:33 +02:00
Rash419
932f2ad67f admin: don't send the routing_rmdoc if doc is migrating
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ic1391dd509027e794ed005bcf78014afca31ede5
2023-06-29 18:21:33 +02:00
Rash419
164d1d2826 show message that document is migrating
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Id0908f31b578a6f0ff012c212f4ca4468a76038c
2023-06-29 18:21:33 +02:00
Rash419
b717be603e implement document migration
- updated protocol.txt

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I67a0515580979e15223ea084c835f5ed801ceb5e
2023-06-29 18:21:33 +02:00
Caolán McNamara
2081d49bcc cid#318937 Array compared against 0
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8e0e270b0a08e9fe343b591095a001530bc88c02
2023-06-29 08:03:00 -04:00
Caolán McNamara
b30ccb0392 cid#318852 COPY_INSTEAD_OF_MOVE
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8e5f1f7f837c7d52922f05c8a65b1af583b864b9
2023-06-29 08:03:00 -04:00
Michael Meeks
455c377d29 wsd: double size of the delta cache.
Change-Id: I218c0fbdef6815a56bf8d4059bfcae186b32ebed
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-06-23 16:59:08 +01:00
Szymon Kłos
722d538d15 Pass ui_theme to welcome dialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I19270ad653540b72f5606554848eed88bded8333
2023-06-23 08:15:35 +02:00
Michael Meeks
12e0830b1b Kill canceltiles support completely.
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>
2023-06-22 09:35:22 +01:00
Caolán McNamara
5064d2bff1 cid#318846 Array compared against 0
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
2023-06-21 11:11:42 +02:00
Caolán McNamara
1b8e81497c cid#318967 Uninitialized scalar field
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I508dd19109fe9d32c57b538c51bb006713d83f36
2023-06-21 08:40:21 +02:00
Ashod Nakashian
7a634d0790 wsd: support providing CSP header in the config
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 25fe0b2dfb56494d59c3502f690265d46dbbc4ff)

Change-Id: I3e1f3085846ab31326a0a788e7332b5332c10c94
2023-06-19 07:45:02 -04:00
Ashod Nakashian
df898ae3a3 wsd: more CSP refactoring
Change-Id: Id7a31fbd2e804de758abb31ebb32e419a2955194
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit c1b19c0ae6b5148dee1517dfce19de5cfa27b9d5)
2023-06-19 07:45:02 -04:00
Ashod Nakashian
cefc71b198 wsd: add ContentSecurityPolicy manager
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 995c24345eeedc7cbd9e81f9b6c151e79b695fdc)

Change-Id: I75d6da58019d218a121bdf7bc72e73dd0f320216
2023-06-19 07:45:02 -04:00
Ashod Nakashian
fa3887ad4a killpoco: replace URI::encode with our wrapper
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 3e8deb33c6459634a6ce111bfa1d01f21f04a30a)

Change-Id: I959e7943ec291f04c03237f9550ccaecf5a81aa7
2023-06-19 07:45:02 -04:00
Ashod Nakashian
d221ac276b wsd: simplify frame-ancestor handling
Change-Id: I1ae8443a8a09b485a89b69a2d25d2efc49c34a52
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit c317090f4c9ba4fa1a5521bc5b31a48dfafd2516)
2023-06-19 07:45:02 -04:00
Patrick Luby
e381b9194e Implement minor changes suggested during review
Signed-off-by: Patrick Luby <plubius@neooffice.org>
Change-Id: Id25c8a9deec35b9ae74ed1cc8a9dcf88dc5486cc
2023-06-15 19:01:42 +01:00
Patrick Luby
57a9db5664 Replace preprocessor directives with C++ conditional check
UnitBase::isUnitTesting() and UnitWSD::isUnitTesting() to avoid
calling methods that crash on mobile.

Signed-off-by: Patrick Luby <plubius@neooffice.org>
Change-Id: Ie6bc2d238ac9e475b02ceef5809c55acc129dd52
2023-06-15 19:01:42 +01:00
Patrick Luby
12213d7ec5 Fix iOS build breakages by adding http::Request to iOS build
Still needed to add a bunch of #if !MOBILAPP to disable all of the
Online server's unit testing classes so that the iOS app won't crash
when opening a document.

TODO: the iOS app will not accept text input at all. Is some code
unexpectedly consuming message data sent over the mobile fake socket?

Signed-off-by: Patrick Luby <plubius@neooffice.org>
Change-Id: Ie874ee8e452188a7b4cdf6d5f87708e5ed9b0235
2023-06-15 19:01:42 +01:00
Marco Cecchetti
39be94e852 Force notebookbar ui when a11y is enabled
When accessibility is enabled in coolwsd.xml, overrides setting in
<user-interface> section by force to use the notebookbar UI.

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I98f4b288439b21110214ca2a67df639b397184c9
2023-06-15 08:54:51 +01:00
Ashod Nakashian
c9542a44cd wsd: thread-safe kit pid
Change-Id: Id8dc3b894d18606e80806950f8bad65cf657a565
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-06-14 07:04:26 -04:00
Caolán McNamara
2e38ab907c cid#318943 Uninitialized scalar variable
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4b5afe9f26f90c11aec6009c55a9438263cff4e4
2023-06-14 10:10:46 +02:00
Caolán McNamara
fb9fe79d3d cid#318951 Uninitialized scalar field
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I20dc0f87f000a68e1c6a6304292e792953959099
2023-06-14 10:10:46 +02:00
Marco Cecchetti
d01bedc09c a11y: add config for enable/disable accessibility in general
A new section about accessibility has been appended to coolwsd.xml
config file

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I086abdf73646639283eb655ae60f200fb64e495a
2023-06-08 00:00:51 +02:00
Jaume Pujantell
87ad301dc1 fix a bug introduced in 418ffa3
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I938e02db8ad6adc85d6464d3260dfc8c0bb7ca9a
2023-06-07 18:44:49 +02:00
Paris Oplopoios
baaecac852 Add debug option that allows tile dumping
Added a debug option (triggerable using the about debug menu) that
allows you to dump tiles as they come in

Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com>
Change-Id: If5939b816c1e3598e50c2db4971710524f855909
2023-06-05 08:59:39 +01:00
Julius Härtl
752cde163e feat: Add UITheme option for light/dark to ui_defaults
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: Ief028dcec0daa2ae448f83df993e0e5ade594a7c
2023-06-01 09:49:08 +02:00
Marco Cecchetti
b9f9cef60a a11y: populating editable area with focused paragraph
We handle notification from core about currently focused paragraph:
content, caret position, text selection start/end.
Notifications are sent on any text changes, even when the text has
been modified in another view.
Moreover we can request such info to core at any time.
That allows AT software to read focused paragraph and selected text.
All that keeping editing still working.
A set of new cypress tests for checking clipboard content has been
developed.

failing cpp unit test:
- HTTPWSTest::testInactiveClient
'unexpected message' assertion was failing since an idle client can
receive an a11yfocuschanged message when the same paragraph has focus
in both view and the active view is editing the paragraph.

failing cypress tests:
desktop
- calc/autofilter_spec.js
  - added more wait time before performing clickOnFirstCell
- impress/undo_redo_spec.js
  - Repair Document was broken
    - we need to select 'Hello world' in order to overwrite it

mobile
- impress/spellchecking_spec.js
  - Apply suggestion
    - better use selectTextOfShape instead of Ctrl-A

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I070d390543fa66fe786c4a0661fa09f891b9883e
2023-05-31 22:43:51 +02:00
Ashod Nakashian
cec4cf087a wsd: test: initialize logs before unit-tests
Make sure that the logging subsystem is
already initialized before starting
unit-tests.

Change-Id: I2ce3ffdb2d3b0094ae7ed496d7cacfc02af89c21
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-31 07:40:11 -04:00
Szymon Kłos
fad3441650 linking-api: always response for thumbnail render requests #6416
followup for:
commit 012b00d
linking-api: always response for thumbnail render requests #6229

in calc and impress we don't get cursor message when switching to
target (slide, range), so don't check if target was reached,
statechanged messages are good enough signal we are loaded already

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I63aa5aefeef153d4d6e2b483e1cdb7bf2c6268ac
2023-05-25 09:14:58 +02:00
Andras Timar
bd119af2bb iOS: build fix
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Idc47510f5b6c28f27b3cfac476e7a648dad03fb5
2023-05-25 09:13:32 +02:00
Pranam Lashkari
1f2367f563 wsd: const parameters
follow up for 25efeea0d8
missing const in modified function caused build error

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ic0f4ae39476e16a9a49904e06b44f26d2a5d4fe7
2023-05-24 15:20:17 +07:00
Ashod Nakashian
004d0c66b2 wsd: simplified initialization of WOPIFileInfo
Reduced duplication.

Change-Id: I2b97d84a0c132c02a833bfbf78957d8f9765129d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-22 09:34:29 -04:00
Ashod Nakashian
08908a6a0e wsd: WOPIFileInfo inherits FileInfo
Change-Id: I2a40e0b6c7d260c6377b13250cd13681156b5ff1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-22 09:34:29 -04:00
Ashod Nakashian
7af95798df wsd: cleaner modification of private members
Now StorageBase::getFileInfo() is strictly
used for reading.

Change-Id: I0d412e7ef6e502ae8b1864131b6f174e44343273
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-22 09:34:29 -04:00
Ashod Nakashian
804bfa2e4e wsd: move PostMessageOrigin into WOPIFileInfo
This moves the logic to update the PostMessageOrigin
field in WOPIFileInfo to be done in the constructor.
And now getPostMessageOrigin() returns a const&.

Change-Id: I88936441edb58deb65d901db4baaf6311be3bdd1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-22 09:34:29 -04:00
Ashod Nakashian
6d2f3605b3 wsd: const parameters for WOPIFileInfo ctor
Change-Id: I9a742d988f3a2817e2f56a0012df38b71a6e0d4e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-22 09:34:29 -04:00
Ashod Nakashian
9e798e9c12 wsd: wopifileinfo -> wopiFileInfo
For consistency.

Change-Id: Ia30b4e3c95e25691bb32d5007729a22f1eb05344
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-22 09:34:29 -04:00
Ashod Nakashian
c62e39a27d wsd: cleanup findJSONValue
Remove unused bRemove parameter.
Use Util::toLower.

Change-Id: I9991090a42231f614a5c3762e225b58ef341aac3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-22 09:34:29 -04:00
Ashod Nakashian
68200eccff wsd: WOPIFileInfo needs not the call duration
The call duration is already logged elsewhere.
No need to pass it around and log again.

Change-Id: Icef50b9a8a48dcecc78a6b99c6311fc0d5b2a676
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-05-22 09:34:29 -04:00