Commit graph

14039 commits

Author SHA1 Message Date
Henry Castro
851c532508 wsd: revisit log messages misc files
LOG_FTL = abnormal, crash, denied service
LOG_ERR = load, save, session, connection, wrong parameters
other cases LOG_WRN, LOG_INF

Change-Id: Iaddfcf7f0853abfa96948fff28acda606cf88b55
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-23 23:48:19 -05:00
Henry Castro
bac79a1a4a wsd: revisit log messages Storage.cpp
LOG_FTL = abnormal, crash, denied service
LOG_ERR = load, save, session, connection, wrong parameters
other cases LOG_WRN, LOG_INF

Change-Id: Ia014602cc3288f5cb0e2b06fd46cdf0ad7294f43
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-23 22:04:24 -05:00
Henry Castro
3d58669af5 kit: revisit log messages Fokit.cpp
LOG_FTL = abnormal, crash, denied service
LOG_ERR = load, save, session, connection, wrong parameters
other cases LOG_WRN, LOG_INF

Change-Id: I105b0d2706db4ffeb2ab10923604f2e06c2d8d77
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-23 21:42:08 -05:00
Henry Castro
aad38107d8 wsd: revisit log messages FileServer.cpp
LOG_FTL = abnormal, crash, denied service
LOG_ERR = load, save, session, connection, wrong parameters
other cases LOG_WRN, LOG_INF

Change-Id: I44b84853e951f5a9d6a8bbb5bd0ceebcff75abe2
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-23 21:36:11 -05:00
Henry Castro
41a7767c86 wsd: revisit log messages FileServerUtil.cpp
LOG_FTL = abnormal, crash, denied service
LOG_ERR = load, save, session, connection, wrong parameters
other cases LOG_WRN, LOG_INF

Change-Id: I1f6708c566fc69edc76e7c0d32625f6b1f4b3af4
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-23 21:35:14 -05:00
Ashod Nakashian
0292334805 wsd: properly log time duration natively
Change-Id: I12d900d44d0f79932f4454f06a16d1e1b727ab63
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-22 14:24:36 -05:00
Ashod Nakashian
135359afff wsd: storage: better handling of failed http requests
Change-Id: Ie7a855b692f3de28092b6b59ff4627fc4e5534ea
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-22 14:24:36 -05:00
Ashod Nakashian
88cc2d58b6 wsd: test: http::Request with invalid host
Change-Id: I88196c38a49d7e70479ea4b1a077447560c001bd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-22 14:24:36 -05:00
Ashod Nakashian
b0b1d9ef3d wsd: fail when trying to connect to an invalid host
Change-Id: I3fb1a625a5e88fbbf5726034559207684f2851f2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-22 14:24:36 -05:00
Ashod Nakashian
658968fbf1 wsd: http::StatusLine initialized as invalid
This guarantees that any early failure results
in the status to also be invalid. That is,
only when we do get 200 OK from the host do
we set it in the StatusLine, never by default.

Change-Id: I4e31cb48cce0ed8962a737c4784fd6453b9a48cf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-22 14:24:36 -05:00
Henry Castro
c24c7d9335 wsd: add an option "batch mode" to load the document
disable any dialog interactivity

Change-Id: I6d6fde721c7b3c18c519f87139525fcac1f6fb31
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-22 14:59:59 -04:00
Henry Castro
be68f06f70 kit: enable send LOK_CALLBACK_STATUS_INDICATOR_FINISH
Otherwise the LOK_CALLBACK_STATUS_INDICATOR_FINISH
message is lost, and client side does not receive
it when Macro Security dialog popup.

Change-Id: Ife52c77078160b8cc1075eff9137de2d26b87b55
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-22 14:58:58 -04:00
Henry Castro
2c52b53f25 wsd: set state loaded when "statusindicatorfinish:" received
Normally the client session waits for a message
"status:" when the document has loaded to forward
to client side. However, when the document has macros
embedded, and a Macro Warning Security dialog popup
it will never receive the "status:" message.
So it is added "statusindicatorfinish:" to formally set that
the document has loaded.

Change-Id: Id40b853c002403577d7664c4f8206cb5a01403b6
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-22 14:58:37 -04:00
Tamás Zolnai
50101968e2 cypress: update shape related tests: TextShape -> SVGTextShape.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I67d09062313de939efb6bf2a83ad6fbf4fb7313c
2021-02-22 17:11:57 +01:00
Gleb Popov
21bfa19e9e Fix compilation with libc++
```
wsd/DocumentBroker.cpp:772:57: error: constexpr variable cannot have non-literal type 'const std::chrono::system_clock::time_point' (aka 'const time_point<std::__1::chrono::system_clock>')
        constexpr std::chrono::system_clock::time_point Zero;
                                                        ^
/usr/include/c++/v1/chrono:1355:28: note: 'time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1, 1000000>>>' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move con
class _LIBCPP_TEMPLATE_VIS time_point
                           ^
```

Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I88c5466b8ad104178cf7fa4101f5f5265ccf5e86
2021-02-22 14:39:57 +03:00
Bayram Çiçek
422723cbdf removed a duplicate of if statement in TileLayer.js
Signed-off-by: Bayram Çiçek <mail@bayramcicek.com.tr>
Change-Id: I6c49ff442b1ed11f10802a54c675eca1cbd8a1f7
2021-02-22 14:37:11 +03:00
Ashod Nakashian
78d24686e1 wsd: log WebSocket activity better
Change-Id: I551a20a14518a1794195442cec351f0755b094da
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-21 13:07:05 -05:00
Ashod Nakashian
f24aec95e2 wsd: reuse RequestManager in SaveManager
Change-Id: Ic1842d126edeb8e8771998466aba79598e741a68
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-21 13:07:05 -05:00
Ashod Nakashian
3431a68709 wsd: simplify, comment, and organize RequestManager
Change-Id: I92d19bb0e0d13ae2c1683e5703924dbd87d47d2f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-21 13:07:05 -05:00
Ashod Nakashian
550bddc27b wsd: storage: GetFileInfo with http::Request
Change-Id: Id04ece6918b084f5192ca357220afff6bf9fc987
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-20 16:47:17 -05:00
Ashod Nakashian
f5f1a64591 wsd: storage: download with http::Request and http::Session
Change-Id: I11e553fd65faf4d33c51f9b6e7e6e256fd87ba05
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-20 16:47:17 -05:00
Ashod Nakashian
f056d2be01 wsd: set the result of saving and mark the response time
Change-Id: Ia31376c38b4bad3dc15f618c902258af9b8f81f2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-20 16:47:17 -05:00
Ashod Nakashian
c1da9af494 wsd: Loaded -> Downloaded
Disambiguate between document loading
and downloading.

Change-Id: Ia16e580d8239a1aebd9192e01860e2f17cdc3878
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-20 16:47:17 -05:00
Pedro Pinto Silva
b879f6986f loleaflet: Postmessage-api: Fix missing tr tag in documentation
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2798b137df43cc322879012a774248fa8185cdec
2021-02-19 17:49:05 +01:00
Tamás Zolnai
19234449bc cypress: interfer: don't need to select the first cell.
We always have a cell selected, so we can move the cell
cursor left and right anyway.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I11c255bd38fb927652c9afd2f111ce9e2acce103
2021-02-19 16:44:46 +01:00
Tamás Zolnai
cee3e40bb1 cypress: add clearer error message when the specified spec file does not exist.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I10bc046639a997385256c006f9a7127fd71030a5
2021-02-19 16:44:46 +01:00
Tamás Zolnai
fb2a22d0f6 cypress: use cellcursor overlay inside clickOnFirstCell() method.
Using autofill marker as an indicator is not that reliable,
because it's missing by document load. The cell cursor overlay
however is always there.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I87e92efe78d492b3c66fb04e3b2ca25d4f122584
2021-02-19 16:44:46 +01:00
Tor Lillqvist
9492ef6142 Include the view id in the tunnelled dialog image hash
Otherwise this will break badly in the collaborative editing (multiple
views) case.

Change-Id: I63d391cb5a7d118c34564c4e1a4df7710b13e90e
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-02-19 14:29:40 +02:00
Tamás Zolnai
91a215b11e cypress: document interference testing in README.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I728545c0cbcee36a401140c8e362d1a0e079fb4c
2021-02-19 11:46:45 +01:00
Tamás Zolnai
7d6df05332 cypress: interfer: update description.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I82dc08f889faf90606f8a99d12ae1cf530dde8eb
2021-02-19 11:46:45 +01:00
Tamás Zolnai
a180d01154 cypress: don't mention video recoring option for interference testing.
cypress video recoring does not work when we have two cypress
instances at the same time.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ib807a001aa497ec9c7ef98df4f8f40236890879c
2021-02-19 11:46:45 +01:00
Gökay Şatır
7947759f6d CanvasSectionContainer: Event propagation.
Now, bound sections propagate events to the sections those are beneath
them. StopPropagation feature is also implemented.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I54c886fea0e254d4b97c4d06585db8ed28d40ab9
2021-02-19 12:07:10 +03:00
Ashod Nakashian
26d0d48b4c wsd: wopiLoadDuration -> wopiDownloadDuration
Consistent with names elsewhere and less confusing.

Change-Id: Ia72cdef0f6d6cd9589ce54028472e10008cf882c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-18 11:08:38 -05:00
Ashod Nakashian
d0516b4391 wsd: correct GetFile duration tracking
The download operation itself is done
after reading the response from the Poco
object. Therefore, the time duration that
was captured for the GetFile operation
was inaccurate. Luckily, we only need
to time the download API of the Storage
object, which actually is simpler, and
more accurate.

Change-Id: I05c94a29fa59d5efae215f2daea17672abc6efc7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-18 11:08:38 -05:00
Ashod Nakashian
ce9276f201 wsd: actually compute the CheckFileInfo duration
For some reason, the duration of the CheckFileInfo
request was not set/updated, and therefore it was
always 0. This fixes this oversight and also
moves the duration variable locally, since
the request is synchronous anyway and there is
hardly any reason to store it elsewhere.

Change-Id: I613b24311bc5c8ee9ab98d675057f354990226e8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-02-18 11:08:38 -05:00
Tamás Zolnai
5b4fa4ed32 cypress: update tests after recent change of core UNO string changes.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I440db4de4846879b279c2f34dae365de484eff33
2021-02-18 13:13:42 +01:00
Pedro Pinto Silva
762a353509 Vex and jsdialog btns use the same btn font
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idf286a6f3356b1827421540167b23931731519fd
2021-02-18 10:28:53 +01:00
Pedro Pinto Silva
7033da6dfa Vex: input fields: remove outdated width rule and add style
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie825d15a12732e6f55b370460115227e45a43589
2021-02-18 10:28:53 +01:00
Pedro Pinto Silva
5784ff8693 Vex btns: secondary re-use btn style
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ib956440e4d79254c8cb5323a375046e4d4bc191e
2021-02-18 10:28:53 +01:00
Pedro Pinto Silva
a586faa5a0 Fix Vex btns: apply existent btn style
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7787588ccce5ce4042cdd553b781114cf0627fbe
2021-02-18 10:28:53 +01:00
Pranam Lashkari
49277c8b3e leaflet: fixed context menu not working on first row/col
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: If8013f0c8ea455adcb3032f1cf39b10b074e89c4
2021-02-18 13:53:20 +05:30
Andras Timar
beccab2694 update unocommands.js after change of unocommands.py
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ifc7b064e9eed9752bdbd5df5439d567bcaead9e7
2021-02-18 09:18:44 +01:00
Szymon Kłos
ac0b14ea81 update unocommands script: don't replace characters
use original names as it is required for pulling translations

Change-Id: I0b679d0802afcfacc7db8cb56a08254749811bc1
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-02-18 09:16:35 +01:00
Henry Castro
9720eb0f81 common: add tag string to extract backtrace logs
Change-Id: I0eed9c6d3adc7c94f84f3f2115276df1d38f0a0f
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-02-17 11:47:16 -04:00
Pedro Pinto Silva
cbd4d5ff96 Macro warn jsdialog: style
- apply max-width
- fix text-transformation
- fix color

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6e40b8ab1b4fbeaee0bd6e97b3dae211c848505e
2021-02-17 14:47:45 +01:00
Pedro Pinto Silva
89442173fc NB: Improve alignment by removing extra margin..
from nav when in edit mode (keep margins when on readonly mode)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I83923bbb34e34c20daa81e80c5832778faab8e1b
2021-02-17 14:47:07 +01:00
Pedro Pinto Silva
fd62fc1aaf Partly revert cb27d2c ..
- Fix #1395
- This was also affecting iPad
- Overflow property doesn't apply to some table elements like table grouping and containers by default.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2e12c3cb1e5e2ced16748e79063774502c670946
2021-02-17 14:47:07 +01:00
Dennis Francis
2d169bf32a add cypress checks for canvas-overlay items
Currently only the cell-cursor and document selections are part of the
canvas overlay. The others are still part of svg layer.

For now only the bounds of the canvas-overlay items are asserted. The
canvas overlay items update their bounds data as JSON text on cypress
only divs inside the overlay section div every time there is any change.

Unlike cell cursors, the selections need not be always a single
rectangle. To add tests for the more general cases, the json format of
test data is helpful.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I70e6328116c44317f31deb9c8bea62e781d8c421
2021-02-17 19:13:49 +05:30
Tamás Zolnai
f8f6509745 cypress: put wsd related logs into cypress folder.
Workdir folder is for the build system, and for copies
of data files. cypress folder it for output of tests, like
videos, screenshots, cypress logs. So let's put wsd related
logs here too.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Icdb757d50d3c2bfef6013b92055b49ba222193e2
2021-02-17 13:37:31 +01:00
Tamás Zolnai
5dadd2c545 cypress: put copy of a test file under data subfolder of workdir
To make workdir structure easier to understand.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I1d0d8a16bd12cf9fc9abf9d350509f20ad322a7a
2021-02-17 13:37:31 +01:00