Commit graph

15864 commits

Author SHA1 Message Date
Gökay ŞATIR
7ca0730e58 Calc annotation: Add a wait for stability.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I3e34b84386d4b5abcb625c3d792375f153614f63
2021-07-21 23:07:47 +03:00
Gökay ŞATIR
7aca2bed1d ScrollSection: Make vertical and horizontal scroll bars always visible on desktop when the file size is larger then the view size.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I80f1f8509eec744d7ae8e18e61a3f062465a4947
2021-07-21 23:07:47 +03:00
Henry Castro
bfcd88faf7 test: fix deleting log files
if make is killed or interrupted during the execution
of their recipes, the target is not deleted.  So there is
an opportunity to check the logs, why are taking to long
time to finish the test.

Change-Id: I6e8176a48ff721ecb2b2efc01b1f149907dd359b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-07-21 11:38:36 -04:00
Gökay ŞATIR
088376afb7 Replace window.devicePixelRatio with app.dpiScale wherever possible.
Remove 2 unused variables from control.rowheader and control.columnheader files.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib5b8e8a8f993ece4f7126a68d4fbf81afd87c849
2021-07-21 17:37:43 +03:00
Gökay ŞATIR
38856bd3f9 Replace that.dpiScale with app.dpiScale.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I8d98f47dcd82b10c62ef2c362dac29b756997189
2021-07-21 17:37:43 +03:00
Gökay ŞATIR
57c1611083 Use global app.dpiScale variable instead of local copies.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I2ce695076343320ec16f02d058af3caf2dbd6d03
2021-07-21 17:37:43 +03:00
Gopi Krishna Menon
b3d5a2563c Add profilezone around kitPoll function and SocketPoll constructor
Add profile zone around kitPoll function and SocketPoll constructor to
improve trace event generation

Signed-off-by: Gopi Krishna Menon <krishnagopi487.github@outlook.com>
Change-Id: Ia46e9add59a57935997649fe39861a8d851e1ff0
2021-07-21 15:00:31 +03:00
Tor Lillqvist
522431a82e We generate 'S' and 'F' "Async" Trace Events in loleaflet, not 'b' and 'e'
"Async" here refers a specific kind of data in the Trace Event JSON
format, not asynchrony in general.

Actually, we don't have code that would generate such yet in
loleaflet. Just the createAsyncTraceEvent function in Socket.js. Quite
possibly the "Complete" events (a.k.a. ProfileZones) are all we need.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I611ccd4b964bcacdd1050893f70dbdb813ee3c34
2021-07-21 13:26:23 +03:00
Tor Lillqvist
7483ae1c82 Check directly that the result is exactly what we expect
At least I didn't fully understand what the old code actually was
checking.

Also, use sizeof instead of magic numbers.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I01602a2e256b1fbe39793c9f1439e025461c5a72
2021-07-21 13:25:23 +03:00
Tor Lillqvist
9de5ebbb1f Don't use the obsolete 'type' parameter in 'textinput' messages
Our JS code does not send 'textinput' messages with a 'type' parameter
either, so it is pointless to do it in a unit test.

(We still have code that checks for the 'type' parameter in received
'textinput' messages. That is pointless, too, and should be removed.)

Also, document what testWriterTyping() apparently is doing.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I4954379339f14e4a310a76788521001048d84e37
2021-07-21 12:24:31 +03:00
Michael Meeks
cd56efe900 cleanup: don't assume that the web-server poll is still alive.
Since a99edb5d29 this gets a different lifecycle, and is often
joined and gone by the time we get to cleanup.

Change-Id: Ic21ca837d484a9a853c7f8f683e876406b00a943
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-07-21 10:03:13 +01:00
Tor Lillqvist
8b6ee5b8bf No need for the template class MessageQueueBase
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ie007344f9a0ffe7fdf767cb9e9069db99aa224b9
2021-07-21 09:54:28 +03:00
Szymon Kłos
6b1c64a944 jsdialog: properly close popup on esc key
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic3437565fe53205c6a94362e9d4805c73ae31bd8
2021-07-21 08:49:55 +02:00
Szymon Kłos
9cbe11699f Don't stop loolwsd when logger already exists
there was a case detected by tinderbox when logger
somehow existed already what closed the app:

unit-wopi-versionrestore:

Test unit-wopi-versionrestore FAILED.
-25786 2021-07-19 08:37:08.429079 [ loolwsd ] TST  UnitWOPIVersionRestore (+0ms): WopiTestServer created for []| WopiTestServer.hpp:71
-25786 2021-07-19 08:37:08.429160 [ loolwsd ] TST  UnitWOPIVersionRestore (+0ms): setFileContent: [Hello, world]| WopiTestServer.hpp:57
wsd-25786-25789 2021-07-19 08:37:08.430827 [ UnitWOPIVersionRestore ] INF  Thread 25789 (7fb8e5063700) of process 25786 formerly unnamed is now called [UnitWOPIVersionRestore]| common/Util.cpp:572
wsd-25786-25789 2021-07-19 08:37:08.430954 [ UnitWOPIVersionRestore ] INF  Starting polling thread [UnitWOPIVersionRestore] with thread affinity set to 0x7fb8e5063700.| net/Socket.cpp:310
Failed to initialize LOOLWSD: Exists
wsd-25786-25786 2021-07-19 08:37:08.438294 [ loolwsd ] FTL  Failed to initialize LOOLWSD: Exists| wsd/LOOLWSD.hpp:469
Exists

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I489fab82ca604de76d13bc47674ee4f02e800f79
2021-07-21 08:49:45 +02:00
Pranam Lashkari
24668f35b2 leaflet: fixed insert graphic button on top toolbar
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id2f5ec1e1776ad3f96b2d23952739ffbc47098bb
2021-07-20 16:51:26 +05:30
Gökay ŞATIR
725376e878 Cypress: Disable some lines for now.
These tests are passing on local build.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I459b46ae249ce799d7c825a936eb3e12d7d610ab
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
fb50ef5b1a cypress impress: disable coordinate based test for now.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I458d229213a850e64339b81f68ddeff971f3b27c
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
cc89d8f9bd PDF View: Move highlighting code outside of if.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I1820bc3ba941152baf1465eb415bd5edecb0f5e5
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
3b80336b75 Hamburger menu icon visibility: This issue is master branch-only.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Id7765467ca1c144d2cd9cf04adfd2e39823dac08
2021-07-20 13:43:22 +03:00
Gökay Şatır
37e39283ab Impress Mobile: Fix slide sorter size.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I1b60bf2688a4a3fdeec535d933f27876db07190a
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
81d5d58ceb Main-document-content: Prevent over-sizing.
Set min-height property to prevent exceeding the available size.

slide-sorter: Set max-height to prevent over-sizing relative its parent.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib8c50bc9f6f6ac4311cefa3b0e016da728efe95b
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
034b594bdd Impress: Adjust mobile edit button position.
* Remove 3px margin of read only view.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I8f72ea952e2bc734048fe4e02e6ba1784acb1369
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
c429815777 Impress:
* Use lineHeight rule for centering the elements on mobile.
* Use parent element's rules for setting the styles of img and preview elements.
* Disable mobile-slide-sorter. It is not in use for a long while.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I06517467f269669c70294fb5a4dd0960eb16feb5
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
4c4df83e99 Impress: Center the document on initialization.
It seems that fitWidthZoom function is impress-only.
I will turn back to this later.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I95b02d53299bf1b8ce7daf31121b67dccd1c817c
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
d89d2918ff Revert "impress: no slide preview if session was started with hidden slides pane"
This reverts commit bd015e5c6e.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib9420ca380a9099f5a1b2d84e7a2ab8d46f6f7e7
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
3d2e70c395 Revert "mobilewizard: pan the document area to top on presentation"
This reverts commit b783cb30e8.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I6132bbc0ce4800551569cf173261118c88c39e01
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
33082e9ad5 Mobile view and Impress:
There are some inconsistencies with impresstilelayer.

I think the reason is that impress has overwritten some of the canvastilelayer's functions like in updatemaxbounds (old one).

I bound impress' onresize function to canvastilelayer's synctilecontainersize and deleted the workarounds.

One 1year old commit will be reverted after this commit.

Only change that is not related to impress is the FIXME part on canvastilelayer. So i tested the mobile views.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I2dd127bd8d2280f2897d8c58281541f0aaa3c50f
2021-07-20 13:43:22 +03:00
Gökay ŞATIR
b36b732e1f Move side bars into flex container.
So, we no longer need to set positions of HTML elements using margins or absolute positioning or attributes like "left: 30px".

Tested on mobile, desktop, tablet views with & without notebookbar.

The problem was:
    On an unbranded build, side bar's width is different. So pre-assumed pixel based positioning would need to be changed according to existence of branding.
    Instead, i tried to use CSS rules with flexbox.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Ib301dfa8c06a9cf12acd33caf1b6a852a2faab20

There is an additional fixup for master branch included.
2021-07-20 13:43:22 +03:00
Pranam Lashkari
a6cc06ae88 leaflet: refactored uno commands in top toolbar
added missing uno commands
modified uno property to use full command (i.e: use prefix ".uno:")

some item had custom handling and adding uno property would interfere the correct functionality
but to make freemium work properly each item needs a command
to solve the problem a new propery to store the command introduced: freemiumUno

This unifies the button properties with other JSONs

This is also necessary for freemium, without uno property button can not be blocked

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I43fb0796507987817b8eb82828a506b1f874d8ca
2021-07-20 14:41:55 +05:30
Tor Lillqvist
d9fc146605 Bypass updateFreemiumStatus unless ENABLE_FREEMIUM
Fixes build of iOS app.

Change-Id: Icf4e49c7d4d8f77a37557e1990f37673e1b9c91d
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-07-20 14:41:18 +05:30
Pedro Pinto Silva
6e64ffeba0 Freemium: Dialog: Improve default text, rewording
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I1be4a06e8159050e578c2da319a3b99a982302b2
2021-07-20 14:41:18 +05:30
Pedro Pinto Silva
48ba9257ea Freemium: Dialog and triggers: Fix style and layout on mobile and sidebar
Mobile:
- Checks if we are in presence of mobile mode and adjust layout
accordingly based on class
- Makes sure that the illustration resizes
depending on device's size
- Adds subtle animation to get the user excited or at least curious to
tap it (avoids making the disable status to dimmed/not legible)
- Fixes layout and buttons

Desktop:
- Adds hover state not only to button but to the locker
- Makes locker a discreet overlay above the respective button, suggesting
"this button is locked" but make it react so user is willing to click to
discover what is it
- Added CSS rules for top toolbar

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idbe66746c5ad07647cd62eb94d3b22a840bf70d7
2021-07-20 14:41:18 +05:30
Pedro Pinto Silva
7062fe28e9 Freemium: Use vex attributes plus styling
Do not use external html file and instead use input attribute from vex
so we can send html while being able to use variables (those variables
should then be overwritten by integrator)

Also Fix styling and DOM elements creation:
- Avoid to many elements and messy notebookbar with multiple (states)
  - Replace disabled feature icon with lock icon
	- Also style it properly and make it similar in other properties as
	the existent disable status

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9c2a07ef1fe5f089d5e63cb53d2d6b7f0b5083a8
2021-07-20 14:41:18 +05:30
Pedro Pinto Silva
81aac851a7 Freemium options: Add external content and fix vex
- Add html file where structure can be changed
  - Add illustration as default (in the case integrator doesn't
	have one). Avoid any purple so to do not confuse the user about
	who is requesting the subscription
- Set custom vex button text (to do: translations)
- Add custom class to vex so we can target it better in CSS

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6a4c0232f3728ba88f650ce28905ebfe2f6d9bfc
2021-07-20 14:41:18 +05:30
Pranam Lashkari
e02e1df76d Introduce Freemium options
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ib6b68ff74839cf84f2d8c8cfb7d380be9209f923
2021-07-20 14:41:18 +05:30
Ashod Nakashian
4c87cc36ff wsd: Close socket hard when necessary
Also clear its input buffer explicitly.

Change-Id: I8badbb96d98eaf10433a65fcfd13b0d6d5893594
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>

Ignore input in a somewhat gentler way.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I758302dc3bb1aa87f9fbfa726f73f4b9339e08c2
2021-07-19 17:31:55 +01:00
Ashod Nakashian
90f0360ada wsd: close the connection after failing to load
Change-Id: I571c9afba3ae2d9be83382dab571902669e8b059
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-07-19 17:31:55 +01:00
Miklos Vajna
18d4c58442 http response: if the result doesn't fit, then consider that a fatal error
This is really a garbage in -> garbage out situation.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic1c33f44081f259e5cf5994ad901e1593fe8dfcf
2021-07-19 13:38:00 +02:00
Miklos Vajna
32a654eecb http response: simplify the condition if the result would fit
Given that "digit" is always less than 16, we can avoid the "- digit"
in the condition (because the division turns that into 0 anyway), making
it effectively constexpr.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Iaf9e53d3543f2237c00768f214114a02a4746020
2021-07-19 12:42:38 +02:00
Gökay ŞATIR
653c611860 CommentListSection: Remove unused function's call.
Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I86c5793b33e7edcbe8484fd9d520d31b0eea33ff
2021-07-19 13:38:14 +03:00
Pedro Pinto Silva
280c2b7148 Mobile: Hide scroll indicator for busypopup
since there is no scrollable content

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2f2dda8df160772a5da766e7c04746f3f6e7bb3e
2021-07-19 10:22:08 +02:00
Pedro Pinto Silva
e0017b8734 Mobile: busypopup: Add class to mobile-wizard and add style
- So we can be sure nothing else is targeted
- Center illustration
- Container goes full width
- Fix Portrait and Landscape modes
- Add border radius so to differentiate this panel (busypopup) that
blocks the ui from any of the other ways we use the mobilewizard

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I2391197477d465636143ca2b55c0723f60a4b339
2021-07-19 10:22:08 +02:00
Szymon Kłos
491ff730be BusyPopup: fix on mobile
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I602c8009b63b686c1f303930d71f77d81df3a6ab
2021-07-19 10:22:08 +02:00
Szymon Kłos
f48a3c6712 BusyPopup: fade out to not flicker
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ief67c0c221f61af0033aaac7b6be787bb68a3676
2021-07-19 10:22:08 +02:00
Szymon Kłos
3550daf575 BusyPopup: show after 0.7s delay
This will prevent us from flickering if popup has to be shown
for less than 0.7s.

Change-Id: I5904e5f836dae40b83ca24d19e0b2fb779eb504b
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-07-19 10:22:08 +02:00
Szymon Kłos
68e4498a87 BusyPopup: enable for mobile
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If89a567bd4609ef6993b891a042a7958e4d340d3
2021-07-19 10:22:08 +02:00
Ashod Nakashian
617b1aeae5 wsd: prevent recycling the listening port during tests
When running tests in parallel, closing the server listening
port before all DocBrokers are terminated runs the risk of
the listening port getting recycled by another test. This
means that the new test might get unexpected connections
from the old test that is shutting down.

This improves test stability.

Change-Id: I2c6ac9e7ed9953813e0da6ab19b960b1edc1d1a8
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-07-18 21:14:48 -04:00
Ashod Nakashian
187caefbfd wsd: test: improve modify test
Change-Id: Ic6f3f81b5481340e5e3350152228f40654460a86
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-07-18 21:14:48 -04:00
Ashod Nakashian
0d59630b48 wsd: killpoco: cert verification
Change-Id: Ie9bc96183d1e416ef4b9b455eefb1f9249b2f695
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-07-18 21:14:48 -04:00
Ashod Nakashian
f63d077916 wsd: ssl certificate verification requirements
Change-Id: I72ffa586310296f1986276c3007672c41146c92b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-07-18 21:14:48 -04:00