Commit graph

14988 commits

Author SHA1 Message Date
andreas kainz
735c984734 notebookbar.css use --gray-light-txt-color for dimgray
dimgray is #696969
--gray-light-txt-color is #696969
now it use the value and can be themed

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Ia4ce421aad99a2b9b45c7fce0a43b4d0b72d3a69
2021-05-11 07:11:04 +02:00
Tor Lillqvist
a28ee1bac6 Fix syntax errors in generated Trace Event JSON
Colon, not equals. Comma missing.

Change-Id: Ife64fe7c57e0cff155926f9b17beb17ce530d848
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-10 18:06:59 +03:00
Tor Lillqvist
4e0b03f651 Let the server tell loleaflet whether trace events can be collected or not
Instead of requiring that information in the query string of the loleaflet.html URL.

Change-Id: I8c41e87c7f561561adeb03ec34ce0c19fe9d7fa5
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-10 16:44:07 +03:00
Tor Lillqvist
cdf374dc63 Clarify Trace Event file writing
Make it contain a proper empty JSON array if no trace objects have
been written to it.

Change-Id: Ided1992a822659561a909ac545536261b91adbac
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-10 15:14:40 +03:00
Tor Lillqvist
9da0145280 Add an --enable-trace-event-logging option to loolwsd
It enables turning Trace Event recording on (and off again). The
option is passed down to the client through loleaflet.html, and to the
KIT processes. If the option is not used, the new JS functions that
send trace events to the server turn into no-ops to avoid wasting
bandwidth.

It is always on in a "make run".

Change-Id: Iafe1919ccba7c376137d3e0568b857e20780bbc8
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-10 12:39:07 +03:00
Miklos Vajna
7b89ce2961 ClientSession::_handleInput: avoid pointing to a temporary
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I048ce322111029847d78f917f071b1c0854dc116
2021-05-10 12:38:32 +03:00
Pedro Pinto Silva
144134e88c Notebookbar: Help Tab: promote items to bigtoolitem
Fix a single line layout of small icons in the help tab
by promoting those buttons to bigtoolitem.
- Hopefully this change makes it easier to scan and detect
those actions, specially:
	- Online Help
	- Report an Issue
This change also improves the space efficient, giving more room
for upcoming buttons

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic9a709e4c36d2e42a95466f9f0899399142789ad
2021-05-10 09:21:19 +02:00
Gleb Popov
6622053557 scripts/refresh-git-hooks: Create hooks dir before making links.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I9ceb7894c0b670bf17cb89e0397b994b5e227ef7
2021-05-10 09:19:13 +02:00
Henry Castro
30f7aa6834 loleaflet: fix activate messages
The activate() function assumes that the document
is loaded when the socket is connected.
This is not true until a status message arrives,
then a document layer is created.
If the document has an interactive dialog (i.e. Macro Warning)
the document formally is not loaded and it should not send
messages that will receive "nodocloaded error".

Change-Id: I01ceb156376712234ab4c12226d080446aa9279d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-05-10 08:59:43 +02:00
Henry Castro
17f704725f loleaflet: fix error messages when a document is not loaded
It happens when reconnecting, a Macro Warning dialog is opened,
but the document is not loaded yet.

Change-Id: If98cf4d68ac8ef71d7c0ad3d8aa5151a77adbe4b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-05-10 08:59:43 +02:00
Szymon Kłos
04dd13672f cypress: Don't check cursor in formulabar
because it is tunneled now as drawing on the canvas

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I76c7d218abf155b2bd835d9f74b46d02e2808bbc
2021-05-07 20:00:19 +02:00
Miklos Vajna
d6c41de084 ClientSession: fix -Wdangling-gsl
wsd/ClientSession.cpp:411:31: error: object backing the pointer will be destroyed at the end of the full-expression [-Werror,-Wdangling-gsl]
            const char* str = tokens[2].data();
                              ^~~~~~~~~

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I67e4aa5f61e049ad13663dc1e11ae2bd67399bea
2021-05-07 13:42:54 +02:00
andreas kainz
3ac539b1cb Notebookbar: Tab: Fix vertical alignment
Center align tab titles (vertically) with display:flex

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Iaf876e786e8bc24dc6c03c412d12dc5e4700119c
Signed-off-by: andreas kainz <kainz.a@gmail.com>
2021-05-07 10:48:02 +02:00
Ashod Nakashian
f6da8d664c wsd: create the unittest SocketPoll thread only when testing
Change-Id: I901ef4722182dd44406c35528c7642414f680814
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-05-06 22:14:51 -04:00
Ashod Nakashian
3e500107c4 wsd: make: add new files
Change-Id: If0ad0c841658c7ab035f267ab8f0b031c6b71da9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-05-06 22:14:51 -04:00
Ashod Nakashian
effa9b942f wsd: log if we skip updating the modified flag
Change-Id: Iadde822ce720ff81abd38fd7c8991352ac57953f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-05-06 22:14:51 -04:00
Ashod Nakashian
aea70a563c wsd: http: disconnect if the server closed the socket
Change-Id: If00566939708d71482a8aac8e97cc371a4a381fd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-05-06 22:14:51 -04:00
Ashod Nakashian
a0696403a9 wsd: http: complete the http response only once
Change-Id: I2c015f004883272bb6efe4ffc5a14e3cc101f60f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-05-06 22:14:51 -04:00
Michael Meeks
204607ea43 Don't enable profiling yet.
Kit initialization uses 'trace' for very early start, and then
switches to the configured trace level later on, so don't use
it this early.

Change-Id: I8e0333930b46e5ad25658d7eda12d7469bdfdd1e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-05-06 20:31:55 +03:00
Michael Meeks
900bf62682 Avoid parsers believing that the body is a forward message.
We need a space after the prefix here to get past the
getForwardToken detection in the core; \n doesn't cut it.

Change-Id: I3f125d47586964ff844f0a89b04b8de866d01f8b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-05-06 20:31:55 +03:00
Rash419
a01e5fb4d8 fix:cypress failing randomly on master
when two or more tests share the same document one or both the test are failing

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I638a76f8f98eff019a298bcafcbe89155442bcde
2021-05-06 19:58:10 +05:30
Tor Lillqvist
9c57b8a435 Introduce a TRACEEVENT message from client to server
Add a function emitInstantTraceEvent() to leaflet that sends an
"Instant" Trace Event to the server for logging.

Add a function createAsyncTraceEvent() that creates an object that
records the timestamp of its creation and sends the 'b' event to the
server for logging, and when you call finish() on the object, sends
the corresponding 'e' event.

Finally, add a function createCompleteTraceEvent() that creates an
object for a "Complete" Trace Event that includes the end timestamp
*and* the duration. The event is sent to the server when you call
finish() on the object.

Loleaflet sends timestamps in the above messages from
performance.now(). To enable the server to turn those into absolute
timestamps, the loolclient message is amended to include the current
Date.now() and performance.now() values.

Note that the intent is that when generating Trace Event logs, the
server and the web browser run on the same machine, so there is no
wall-clock synchronisation issues between server and client.

Change-Id: Ie9e68b093b769cc942e1e1d17083febeb07ccf5e
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-06 11:24:20 +03:00
Aron Budea
a601dca3e1 cypress: update cypress: 6.2.1 -> 6.8.0
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I8174ad69bde13df3a93ddbe7b8ace93b0b0aa44c
2021-05-06 12:16:09 +05:30
Henry Castro
ae76450398 common: 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: I15bc840f5a6eaf9a74a1ee1caa57d447baa2afce
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-05-05 13:50:41 -04:00
Tor Lillqvist
739dfce08a There is no isManualDefrag parameter
Change-Id: I1a662dbdb2e43335f8739852e7797012de7be34a
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-05 15:22:00 +03:00
Michael Meeks
d387700914 Message: don't generate and allocate abbreviations just for trace logging.
Also avoid generating abbreviations in various message handling loops
unless debugging is enabled.

Change-Id: I22f4929b0bfd4da36917db6882bb2f5f5be02780
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-05-05 09:40:10 +01:00
Tor Lillqvist
686f1ba1cb Make WebSocketHandler::_isClient const and drop default values for bool parms
Avoiding default values for parameters makes the code easier to read.
Especially true for bool parameters. But sure, just a question of
taste.

Change-Id: I473f70bdfafe3a9ccfb325def8760d78fee7e9a6
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-05 09:03:29 +03:00
andreas kainz
031f71bd8a Notebookbar Writer cleanup id values
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Ia98bf65fde4e3681700c38fce8a02f60bcb8f50c
2021-05-05 07:05:02 +02:00
Michael Meeks
5c345a1d14 Message: cleanup message parsing of payloads.
Change-Id: Id11a702590539ff4f20fa56272beeb6d91b9e7bd
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-05-05 02:51:54 +01:00
Pranam Lashkari
e8b50bab40 cypress: rearrange dependencies in package.json
problem:
every time running cypress test would change the properties,
in alphabetic order

this will make sure to avoid unintentional changes

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id7b955ad2154ec6393a4cb9d115f369db25b5008
2021-05-05 04:41:57 +05:30
andreas kainz
77a122b88a Notebookbar Draw use branding color yellow0
text, spreadsheet and presentation use branding colors
with this PR also drawing use the branding color
compare to yellow1 drawing use yellow0 for better contrast

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Ie3e3862bdc868c060d631b677ebe014adbc76a38
2021-05-05 00:58:11 +02:00
andreas kainz
6eba1e6fc1 Notebookbar ScrollButtons height shrink to 72px
As the notebookbar height was shrinked, the ScrollButton has to be shrinked also.

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I6d195a10d98e57ec43d74f58d3bb13ed33b7b62f
2021-05-05 00:45:53 +02:00
andreas kainz
df2e0a9d51 Thesaurus work only in writer #2129
Thesaurus was removed from calc and impress/draw see issue #2129

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: If440bdf2c61aaac22811706cc440b9ccbe7a30d1
2021-05-04 23:48:18 +02:00
Aron Budea
9bf17cd902 Fix build with --disable-ssl
After 358b30a682.

Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I53ab88b240bde8fcd09dd916cf156dc251452b26
2021-05-04 23:35:21 +02:00
Henry Castro
4e7fadb2b5 wsd: revisit log messages LOOLWSD.cpp
LOG_FTL = abnormal, crash, denied service
LOG_ERR = load, save, session, connection, wrong parameters
other cases LOG_WRN, LOG_INF

Change-Id: I80e8ee0de2b6858ec8e1c27276eb2058acdb2970
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-05-04 10:44:01 -04:00
Gleb Popov
53e1c0250b Use Util::getThreadId() instead of Linux system call.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I5cab82f0d869cc9f2ea97ac9320d8f4bbf466c37
2021-05-04 15:40:50 +01:00
Pedro Pinto Silva
1699a97736 Classic: select: do not change element's height
93bc5f6083 introduced a regression
in the Classic mode.

- Better target ui-combobox
	- Use notebookbar class
	- Simplify CSS declaration

Fixes: https://github.com/CollaboraOnline/online/issues/2088

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I0ab1dee8a29408c58621297ba8eefc18db3c4fa9
2021-05-04 15:04:44 +02:00
Tor Lillqvist
fd1910c727 The Chrome format is called Trace Events, not Event Trace
Change-Id: I2515182d9369c3a25727dce0d3790e79de891bff
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-04 15:12:14 +03:00
Andras Timar
3c1767b290 LOKit's installation path does not contain version number any more
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If3ae865f1d19ccba2a13c4c31faa7aff8274d34b
2021-05-04 13:14:15 +02:00
Andras Timar
0ab307c8db New versioning scheme: 21.05.x
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9f27b549225604ee10bbef8670bd77db73f24ccf
2021-05-04 13:14:15 +02:00
Michael Meeks
aeb10dbbb0 Remove obsolete client-side leaflet grid-lines layer.
Change-Id: I290563263d5926f19173a6197ca6697f21334859
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-05-04 13:02:19 +05:30
Pedro Pinto Silva
4e477e1589 Welcome dialog: do not mix desktop and mobile plus styling
- Fix problem introduced with d0253673a6
  - Desktop was always without close button

- Add mobile specific class
  - So we can style it apart from desktop
  - So we can style it apart from mobile(other dialogs)

- Mobile: fix padding (remove for child element)
  - So we can use more efficient the horizontal space

- Mobile: Dismiss button
  - Make it full width

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Icb6a5a0a4191b39ecf76eaafac06e182430490d0
2021-05-04 07:58:21 +02:00
Tor Lillqvist
eb9c580c36 Introduce ways to toggle and tweak core Trace Event recording and logging
When toggling tile debugging in the Help>About, toggle Trace Event
recordning, too. Add a comment with an example of how to turn on
SAL_LOG overriding at the same place.

The following new messages from client to server are introduced:

traceeventrecording <start/stop>

    Starts or stops comphelper::TraceEvent recording.

sallogoverride <string>

    Overrides the SAL_LOG value, or stops overriding if no parameter
    or parameter is "default".

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I8b56c28cd99d39115cd796c44e5051d934d21a1f
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-03 16:09:35 +03:00
Tor Lillqvist
9ef32a3e38 Similar improvements to the ProfileZone here as to that in core
Perhaps we should use the exact same code in both core and online? But
that would be a bit tedious as core needs to be cross-platform (and
thus we use things like osl_getSystemTime and osl_getProcessInfo in
its version) while online is Linux-only.

Also imporve the test for it.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I0bc9dca71dc4489bd1671e0dae1e582990a8f8b4
2021-05-03 16:09:35 +03:00
Tor Lillqvist
e7ed4e11cf Add a ProfileZone implementation here, too
Compiled but not yet used.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I3b85696ca6076e42d16e710b49bfd37bac342ec8
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-05-03 16:09:35 +03:00
Tor Lillqvist
be476d23b3 Produce a Chrome Event Trace file
It is (for now) produced (by the ProfileZone things in core) whenever
logging level is "trace". The Event Trace file pathname can be given
in the loolesd.xml file or on the loolwsd command line.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6d5829121e71460a4600ee94d2ebf51043c8893f
2021-05-03 16:09:35 +03:00
andreas kainz
b5e3fc49b1 Notebookbar height 72px instead of 84px #2088
with #2235 and the fix of the home tab height it's now possible to reduce the notebookbar height to 72px in height instead of 84px.
Sure there would be 68 px theoretical possible, but the additional 4px in height are good for the home tab.

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Id28bcc63db142d235986cb5449d750808b684c4f
2021-05-03 13:30:26 +02:00
Pedro Pinto Silva
0b6237934d Docs: use better favicon
- Use something more specific to documentation, instead of product icon
- Fixes #2172

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idace492f776a635398c704c8ab78e13a6ceefede
2021-05-03 13:19:02 +02:00
Gökay Şatır
4529184367 Read Only Mode: Allow changing selected part with PageUp & PageDown keys.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ifb2451c627e984063efe6d6d17b2c8e76231e1d0
2021-05-03 14:08:19 +03:00
Rash419
d0253673a6 fix:added dismiss button in welcome page dialog
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ia1b5c7316d20e14d9537281274c9ebd0b8f58ae7
2021-05-03 11:52:26 +02:00