Commit graph

3017 commits

Author SHA1 Message Date
Ashod Nakashian
bf66f7a908 loolwsd: Calc tile rendering test with editing
Change-Id: Ib02a079bf1e4e90c7dfb65b6038b3ca1423a673c
Reviewed-on: https://gerrit.libreoffice.org/26448
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-17 23:56:26 +00:00
Miklos Vajna
5e1b210891 Util: pass by const ref 2016-06-17 09:18:26 +02:00
Miklos Vajna
75db2dd33b loolwsd: disable unit-fonts for now as it's unstable 2016-06-16 13:45:20 +02:00
Miklos Vajna
3c32bc1724 LOOLKit: fix loss of callback during initializeForRendering()
Impress deletes the current view and creates a new one during that call,
so make sure at the end our registered callback is not lost. With this,
the order matches how it's done in gtktiledviewer.

This fixes the HTTPWSTest::testInsertDelete() test when per-view
callbacks are enabled.

Also remove the assert from TileCacheTests::testTileInvalidateWriter()
that would assume something is invalidated right after load: the hope is
that it's possible to load a document without invalidating anything...
:-)
2016-06-16 12:15:11 +02:00
Miklos Vajna
70f5b914f6 TileCacheTests: assert before possible nullptr deref / div by zero 2016-06-15 18:04:57 +02:00
Miklos Vajna
afb6a7ebb0 Util: turn TerminationFlag into an std::atomic<bool>
Running unit-fonts under helgrind points out missing synchronization
there.
2016-06-15 15:31:41 +02:00
Miklos Vajna
9ac53ef5f5 TileCacheTests: disable testTileInvalidateCalc for now
It fails for me and Ashod as well.
2016-06-15 15:30:37 +02:00
Miklos Vajna
f64534404c loolwsd: document setclientpart command
At least I guess this is the purpose of it, based on commit
b9884a470a (loolwsd: be aware of the
client's current part, 2015-07-21).
2016-06-15 14:31:52 +02:00
Mike Kaganski
9ef285cc33 loolwsd unit test: invalidate tiles while typing
This test simulates characters and combined characters being
typed to loolwsd, and verifies that each causes tile(s)
invaliations

Change-Id: I670659de3a9eb71e94c366c96e69e6efd4338c38
Reviewed-on: https://gerrit.libreoffice.org/24928
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-14 22:20:36 +00:00
Andras Timar
cd67dc7022 loleaflet: update translations from Pootle 2016-06-12 16:06:13 +02:00
Andras Timar
445f97a0c7 loleaflet: hide context menu after pressing ESC key 2016-06-10 23:42:11 +02:00
Andras Timar
ec15d9e9ff loleaflet: l10n of src/control/Toolbar.js 2016-06-09 15:26:08 +02:00
Pranav Kant
257b95f01f bccu#1871: Add url prefix, lool, to post requests
All post requests will now have to be prefixed with /lool/

This is necessary to ease proxy url redirection setup.

Change-Id: I04fbc211879722f6433cb9eb17786f394187a1b9
Reviewed-on: https://gerrit.libreoffice.org/26091
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-06-09 11:22:05 +00:00
Pranav Kant
8cc367638f bccu#1871: Add url prefix to websocket urls
Normal websocket connections are now :
/lool/ws/filename

Admin websocket is now :
/lool/adminws/

Change-Id: If39382cb852d89ed0394adbd7fe168fe4767a075
Reviewed-on: https://gerrit.libreoffice.org/26029
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-06-08 14:06:20 +00:00
Andras Timar
c5198fa855 loleaflet: unclosed tag in loleaflet/spec/loadtest.html 2016-06-08 14:56:08 +02:00
Pranav Kant
2e2373dfa0 loleaflet: Fix loadtest
Change-Id: I6307a12858478b42d3a3253e7d01a52b7ea42282
2016-06-08 15:47:53 +05:30
Miklos Vajna
f209773f0a loolwsd: fix naming style of static members
README suggests not using an initial underscore for those. Rename the
few cases which don't respect this recommendation.

Change-Id: If36a36da9374597f6b9090e7f81a1b3fb2f23647
2016-06-07 09:18:49 +02:00
Pranav Kant
b230dcb26f loleaflet: Kill modules.zip
... and save ~3MB of space.

Change-Id: Iaa5cb62936d66044b657e6a507237a90f1d0a537
2016-06-06 16:28:57 +05:30
Pranav Kant
a32ded9752 loleaflet: Move websocket module to devDependencies
This module is only used from tests. These are not hard
depedencies.

Change-Id: I9b63562de827f9d2e12fa108555cc783a5689db2
2016-06-06 16:24:54 +05:30
Pranav Kant
3ec6c6b662 loleaflet: Reduce z-index of auxiliary toolbar
Otherwise, when the screen becomes inactive, it is the only
widget to shine separately.

Change-Id: Idf22e2cece3fd465ff37e7304f4776dbfdef66a8
2016-06-06 11:50:59 +05:30
Ashod Nakashian
3b6009fa56 loolwsd: fixed testLoad12ods
Change-Id: Iec0bb481da7af71b210463613617a7272209bfb3
Reviewed-on: https://gerrit.libreoffice.org/25947
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-06 01:55:18 +00:00
Ashod Nakashian
6b1a57c9eb loolwsd: improved random directory generator
Change-Id: I611debe9cd33b8b15c2fab3c49ad19cc6ad6a995
Reviewed-on: https://gerrit.libreoffice.org/25946
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-06 01:54:45 +00:00
Ashod Nakashian
d73167b734 bccu#1826 writer: jump to top when switch editor
Change-Id: I9d6f64d1e17f9dd5fb4e7d1b3ac8416be4623822
Reviewed-on: https://gerrit.libreoffice.org/25944
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-06-05 23:58:01 +00:00
Andras Timar
7e625d5f42 loolwsd: respect server_name setting 2016-06-05 16:38:48 +02:00
Andras Timar
c3fe386dc0 loleaflet: enable l10n of Color picker widget 2016-06-03 12:25:54 +02:00
Pranav Kant
3042580873 loolwsd: Increase timeout for admin test
... to 60 seconds. This one contains a lot of sub-tests. Further,
loolwsd shutdown is consuming approx. 15 seconds out of this
limit. The default 30 seconds, hence, is not enough for this one.

Change-Id: I0c29c92f6be0140cb62b58dacb57392e264d7f30
2016-06-01 21:58:07 +05:30
Pranav Kant
26d5614b89 loleaflet: bccu#1777: bccu#1555: formula bar fixes
* Use new param DontCommit in .uno:EnterString to not trigger
recalculation until enter is pressed.
* On pressing 'ESC', reset the current content
* Range selection is now possible when formula is entered in
* formula bar
* Forward 'enter' key events to `map` from formula bar

Change-Id: I073eca2fa08520faa9f679b1c986e10805da0ad6
2016-06-01 21:24:46 +05:30
Pranav Kant
4c053e864f loolwsd: unit-admin: More debug info
Change-Id: I0a529915ab9383ce05a76b8291651663324c8fe8
2016-06-01 14:57:35 +05:30
Pranav Kant
b58801c6b0 loolwsd: unit-admin, log when test passes
Change-Id: I9714a8dc57b22ecff3ef4a421192d08a8f3f10e1
2016-06-01 14:57:35 +05:30
Andras Timar
4b72613447 loleaflet: bccu#1649 l10n of Admin Console 2016-05-31 23:31:16 +02:00
Andras Timar
fdc109d002 loleaflet: l10n of loading.html 2016-05-31 16:57:20 +02:00
Andras Timar
611bbe3814 loleaflet: mark-up strings for l10n in src/map/Map.js 2016-05-31 16:36:29 +02:00
Henry Castro
2df8d928dc loolwsd: remove unique_ptr to call std:free
It is recommended that if you allocate with malloc() it should
be deallocated with free()
2016-05-31 10:16:47 -04:00
Andras Timar
2e035ee2cc loleaflet: fix wrong uno command name for opening hyperlink 2016-05-31 14:50:39 +02:00
Andras Timar
a5d79702a7 loleaflet: bccu#1862 remove Table -> Delete -> Table from impress menu
Apparently it does not work. In desktop version I cannot delete a table by
Select All + Cut, or Select All + Delete/Backspace key. Only Select All +
Delete Rows/Columns works...
2016-05-31 11:22:20 +02:00
Pranav Kant
7e1d3fe87e loleaflet: Consistency
Change-Id: I5962af5731199cf507da0eece0adc7b480f48ce0
2016-05-31 14:33:31 +05:30
Pranav Kant
d9019a2e79 loleaflet: Reuse html canvas spinner for slideshows
Move the spinner initialization to a separate class L.LOUtil.
Other similar LO related functions should also go there.

Also remove superfluous class leaflet-slideshow-spinner. It was
not being used anyway due to wrong spelling.

Change-Id: Ie8fac0391a9c6a3771900539e8f08d1b73b9be28
2016-05-31 14:30:22 +05:30
Ashod Nakashian
886af28bc2 loolwsd: improved random directory generator
Change-Id: Ic4ea88ba77549cc4ccba83c27fffdffcdeebb984
Reviewed-on: https://gerrit.libreoffice.org/25698
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-31 04:24:25 +00:00
Ashod Nakashian
8f3dcbcfb6 loolwsd: more secure random directories
Util::createRandomDirectory now uses /dev/urandom
(and a complex pseudo-random generator where missing)
to generate 64-byte long, Base64-encoded, names.

This should provide ample security compared to 64-bit
pseudo-random numbers hex-encoded, as was the case.

Change-Id: I714810a9fb03b5dcdbad7a15305940bf7457149e
Reviewed-on: https://gerrit.libreoffice.org/25696
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-31 00:57:52 +00:00
Henry Castro
58580a45ce loolwsd: test: update unit test getPartHashCodes 2016-05-30 20:26:40 -04:00
Henry Castro
0fe4c89e55 loleaflet: adjust partName and partHash 2016-05-30 20:23:54 -04:00
Henry Castro
19acaecfc7 loolwsd: bccu#1748, status: message send both ...
the partnames and hashes (for presentations)
2016-05-30 20:20:26 -04:00
Andras Timar
c542fedd0c loolwsd: add robots.txt (compliance) 2016-05-30 17:40:52 +02:00
Ashod Nakashian
c005f765bf loolwsd: reuse the same callback for now
Change-Id: I0f5ff42ed8c3ab422909d185089bfc31d5bb298b
Reviewed-on: https://gerrit.libreoffice.org/25663
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-30 11:29:10 +00:00
Ashod Nakashian
335611b0ff loolwsd: don't unlock too soon
Since rendering moved to centralized WSD<->Kit
processing, it runs on a different thread than
those processing the communication between
ClientSession and ChildSession. This introduces
a new race between events and tile rendering.

The shared ChildSession lock prevents this race
such that no events are processed while a tile
is rendered and, more importantly, response
is prepared and sent back. That preparation
could be lengthy due to png compression.

The typical race happens when two keystrokes
are entered in quick succession such that the
same tile is invalidated while it's rendered.
If the invalidation is processed in parallel
to rendering, it will find no cached image to
remove. It will reach the client, who will
request a new tile. Meanwhile, the first tile
is rendered and cached. By the time the second
request arrives we have a cache hit, albeit on
an outdated tile, missing the second character.

By locking until the tile response is sent we
ensure that the invalidate event will follow
it, and by then the image will have been cached.
The invalidation then removes the cached image
and the second tile request is forced to place
a new tile render request.

There is some inefficiency, it would seem, but
that is not really true, as Core is really
sequential anyway and we shouldn't process
events in parallel in the first place.

Change-Id: Id8170a41a7e69bca6ac8b520029b7cdb2d96c880
Reviewed-on: https://gerrit.libreoffice.org/25662
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-30 11:28:43 +00:00
Ashod Nakashian
763eee7040 loolwsd: batch tiles by row
Change-Id: Ib5ca8e1457d4e23aa09968f90ccd3bf10d189815
Reviewed-on: https://gerrit.libreoffice.org/25661
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-05-30 11:28:24 +00:00
Pranav Kant
08636e6c67 bccu#1768: loleaflet: Disable row/col headers menu while viewing
Change-Id: I89e0853b2a5e59ecf3e33c785991c5589d9c0864
2016-05-30 16:52:43 +05:30
Henry Castro
c24ee3669f loolwsd: deallocates more memory 2016-05-29 20:36:18 -04:00
Andras Timar
a4c8ceb1ac loleaflet: bccu#1856 disable View - Full screen on Edge, too 2016-05-30 00:43:04 +02:00
Andras Timar
6b57831673 loleaflet: fix js lint error 2016-05-30 00:29:47 +02:00