Commit graph

3477 commits

Author SHA1 Message Date
Miklos Vajna
6006e22001 LOOLKit: use std::move() in Document ctor
Change-Id: I25aeb5285465385858180747f441a69b858c4fe6
2016-09-12 08:15:37 +02:00
Marco Cecchetti
ed983f17cb loolwsd: we use callbacks latch for not missing messages sent very early
- lok::Document::setCallbackLatch: used on doument loading for
set/unset the latch

- now cell cursors of other views are correctly notified to the new
view
2016-09-10 21:28:11 +02:00
Marco Cecchetti
edc1302f16 Revert "loolwsd: we use callbacks latch for not missing messages sent very early"
This reverts commit f2106157f3.
2016-09-10 20:51:59 +02:00
Marco Cecchetti
f2106157f3 loolwsd: we use callbacks latch for not missing messages sent very early
- lok::Document::setCallbackLatch: used by a child session for
set/unset the latch

- lok::Document::registerCallback has a new boolean parameter used for
setting the latch state just before the callback is actually
registered for a (new) view

- now cell cursors of other views are correctly notified to the new
view
2016-09-09 22:23:51 +02:00
Henry Castro
46a314206b loleaflet: avoid undefined variables when map not loaded 2016-09-08 16:48:56 -04:00
Henry Castro
e9f3fd4e56 loolwsd: test: cell view cursor 2016-09-08 12:16:51 -04:00
Henry Castro
878fff5ebb loleaflet: fix part not taken into account for cell cursors 2016-09-08 12:11:07 -04:00
Henry Castro
f751d36c8f loolwsd: test: view cursor visible 2016-09-08 10:27:42 -04:00
Pranav Kant
d2bf039d59 loleaflet: Implement object/image multiple view selections
Change-Id: Ifc2d6f95fa48a947fc043bf48d582ab549fa6172
2016-09-07 21:47:11 +02:00
Pranav Kant
33a5c4bc70 Fix comment
Change-Id: Ib43bcc7378590e71b98856c11218fd99ad90d32d
2016-09-07 21:47:11 +02:00
Henry Castro
d4d764cee5 loolwsd: test: invalidate view cursor 2016-09-07 12:21:34 -04:00
Henry Castro
a666c01c03 loleaflet: fix part not taken into account for cursors
Also refactor cursor marker
2016-09-07 12:18:14 -04:00
Pranav Kant
1b0088ab69 loolwsd: Comments
Change-Id: Ia4e91f18d695ac2249fa1139afbcb5b3f65f87ba
2016-09-07 11:37:12 +02:00
Pranav Kant
3f421be4da loolwsd: Code reuse, and don't send 'remview' message to inactive clients
Use the existing function notifyOtherSessions() to broadcast the
message.

The function also takes care of sending this message only to
active clients.

Change-Id: I98d40429de17463167a67cb10ba59381a0cbc525
2016-09-07 09:20:37 +02:00
Pranav Kant
9edb1c2994 loolwsd: Don't send addview notification to inactive clients
Change-Id: I4771e4bf12057fdc7099e9433d3b7dc2198cb265
2016-09-07 09:20:37 +02:00
Tor Lillqvist
c4733fd4d2 Revert "Mention --without-system-nss"
That is the default anyway.

This reverts commit 894b0a11b0.
2016-09-02 15:15:40 +03:00
Tor Lillqvist
894b0a11b0 Mention --without-system-nss 2016-09-02 15:08:49 +03:00
Ashod Nakashian
99d0ee2ac1 loolwsd: don't combine tiles by row to allow for better culling
Change-Id: I30c0a9caad51bd77360a97c9f5899742385ccc27
Reviewed-on: https://gerrit.libreoffice.org/28615
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-02 11:30:42 +00:00
Ashod Nakashian
2663f9b63f loolwsd: replace old tile requests with more recent ones
A new queue with own thread now processes tile requests
so we have a chance to cull backlogged tile requests
that have since been invalidated.

This reduces load on the server significantly, especially
with multiple view at different zoom levels, and very fast
typing.

Change-Id: I6599939cd363dc71c30187f40d542aa37260dc56
Reviewed-on: https://gerrit.libreoffice.org/28607
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 20:47:10 +00:00
Michael Meeks
6bce292c44 Send intermediate tiles back even when we they are older.
Should improve interactivity and avoid jerky feedback.
2016-09-01 21:18:38 +01:00
Michael Meeks
8182dd8c54 Assign priority based on intersection with the cursor.
Should help to reduce visual tearing when cursor spans a tile join.
2016-09-01 21:18:38 +01:00
Pranav Kant
de770a32e8 loleaflet: Fix inconsistent user count for views going active
Iterating viewCursor object won't give correct number of live
viewids because inactive views don't receive any viewcursor
messages.

Rather use map._viewInfo object because as of now, we do receive
these 'addview' message for inactive views, so this place should
always remain updated and prevent giving inconsistent view counts
across different clients.

Change-Id: If210049e76b5f2b91371a21863f6019cbccdb9ca
2016-09-02 01:29:58 +05:30
Pranav Kant
c43c5486fa loolwsd: Fix build
Change-Id: If55ad5dfe3f16c9cf4d15d57d199c392d8814e24
2016-09-02 00:41:41 +05:30
Tor Lillqvist
a970587053 Ignore unexpected TimeoutException from receiveFrame() in SocketProcessor()
Seems to get rid of some (maybe all) "unexpected connection error"
issues for me at least.
2016-09-01 19:47:45 +03:00
Jan Holesovsky
e41e107500 Fix --disable-ssl case. 2016-09-01 16:24:35 +02:00
Tor Lillqvist
be4e71c0f0 Fix misleading logging
Don't mention 'TerminationFlag' in the log line when that lovely
global variable isn't what we are logging there (but the local 'stop'
boolean variable). Also, output its value as "true" or "false", not
numerically.
2016-09-01 17:16:46 +03:00
Tor Lillqvist
eb4b4b6ca0 Remove leftover unused field Connection::_stop
Not sure what the stop() function should do now, if anything. Maybe
_stop should be kept and actually tested somewhere, like in the third
lambda passed to IoUtil::SocketProcessor() in Connection::run()?
2016-09-01 17:04:05 +03:00
Ashod Nakashian
f4c0a87991 Revert "loolwsd: remove queue thread from child socket handler"
This reverts commit a30526c87e.

Change-Id: Idcbf2a6c4e228a5fb6a890e8cdd58b6137295666
Reviewed-on: https://gerrit.libreoffice.org/28596
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 12:37:55 +00:00
Ashod Nakashian
16605b9289 Revert "loolwsd: canceltiles re-designed using tilecache instead of queue"
This reverts commit 571ff06906.

Change-Id: Icf9caeafc640b815f64211f240cfdac8e91694a1
Reviewed-on: https://gerrit.libreoffice.org/28595
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 12:37:47 +00:00
Ashod Nakashian
77a693c353 Revert "loolwsd: remove tile queue and simplify tile response"
This reverts commit 59eaacd2f8.

Change-Id: Ieba9bbaaa6406e3e685b46ce12a44a0766127815
Reviewed-on: https://gerrit.libreoffice.org/28594
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 12:37:38 +00:00
Michael Meeks
1dce882fd1 Start of simpler input fuzzer. 2016-09-01 10:11:03 +01:00
Pranav Kant
53b768de0f loleaflet: Remove troublesome checks
... and fix the incosistency among view count in UI

Change-Id: I6b055b6d145c2de314830731f6341462287b244a
2016-09-01 14:25:54 +05:30
Tor Lillqvist
c5d8e3c799 Clarify that LOOL_NO_LOGCOLOR has no effect if stderr goes to a tty 2016-09-01 10:34:34 +03:00
Pranav Kant
d3eda7d198 loleaflet: userlist l10n fix
Change-Id: Id2be29e018f1c23a8d5b61ad3fbaebc36f1222ec
2016-09-01 12:50:06 +05:30
Pranav Kant
04064b2e23 loleaflet: User count in user list
Change-Id: Idde4e1bdf1b33590c3b9a8265e059c01943f4777
2016-09-01 11:25:21 +05:30
Pranav Kant
958c0e3534 loleaflet: Better algorithm for adding/removing users from list
Remove them dynamically, rather than creating a new list
everytime.

Change-Id: I3e1a8c603e092fdd727806154a3715139e4f5b2c
2016-09-01 11:25:21 +05:30
Ashod Nakashian
151d1ff955 loolwsd: unittest fixes
Change-Id: I7096b6dabfa59a536809c4e997168c8fce5791f0
Reviewed-on: https://gerrit.libreoffice.org/28578
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 04:09:23 +00:00
Ashod Nakashian
534ab15d2f loolwsd: more aggressive test for unresponsive clients
Change-Id: I9daf81661cf03be2ea38b5bc4d9688039912bd8a
Reviewed-on: https://gerrit.libreoffice.org/28577
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 04:07:53 +00:00
Ashod Nakashian
9b3343aad4 loolwsd: Don't block on client sockets and timeout in 1 second
Change-Id: I7fec1054cef25704f898a7a5211abfb398d61bee
Reviewed-on: https://gerrit.libreoffice.org/28576
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 04:00:17 +00:00
Ashod Nakashian
59eaacd2f8 loolwsd: remove tile queue and simplify tile response
Tile queue was used to process canceltiles commands.
Since those are handled by TileCache, there is no need
for queues and the threads that pump them.

But because these queues were also used to buffer between
WSD internals and clients, such that a slow client wouldn't
block WSD while sending back tiles, it is necessary
to reword that logic.
In subsequent commits that will change as well.

With this change not only do we save a thread per client,
but we also reduce latency of tile, and improve typing
responsiveness, by almost 3x or more! Latencies are
down to ~15ms from almost 50ms.

Change-Id: I9bb5856efed28caea9d4e6f94f77b093779e5241
Reviewed-on: https://gerrit.libreoffice.org/28575
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 03:59:31 +00:00
Ashod Nakashian
ce2309edd8 loolwsd: log errors while getting file info
Change-Id: I076da575f553f3199fa302f32e8c399b6339fe2c
Reviewed-on: https://gerrit.libreoffice.org/28574
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 03:57:36 +00:00
Ashod Nakashian
9308268144 loolwsd: tolerate missing WOPI username
Change-Id: Ied24b5562f63ecdd96ee6ac7fd312b3bb5599573
Reviewed-on: https://gerrit.libreoffice.org/28573
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-09-01 03:57:12 +00:00
Henry Castro
1370c42afa loleaflet: update extra width/height for optimal column/row 2016-08-31 23:37:18 -04:00
Michael Meeks
f56d96229d Avoid profiling CL devices during jail setup. 2016-08-31 22:05:02 +01:00
Henry Castro
947f1d3d86 loleaflet: fix extra height for optimal row
Also increase setTimeout to 400 for dblclick auto fit
2016-08-31 15:52:23 -04:00
Jan Holesovsky
c3a3d81365 Breeze icon for the 'Document repair'. 2016-08-31 19:26:23 +02:00
Jan Holesovsky
2090f121b6 Don't check for nullptr after dereferencing.
StorageBase::create() is supposed to throw when there are trouble.
2016-08-31 18:36:42 +02:00
Tor Lillqvist
b7623d48d0 We should return true here
Fixes a regression introduced in
571ff06906, where every loleaflet client
ran into an error, displayed as "We are sorry, this is an unexpected
connection error. Please try again."

Found by git bisecting.
2016-08-31 17:54:24 +03:00
Tor Lillqvist
b57ddcd173 Sort #includes of C++ headers 2016-08-31 17:02:29 +03:00
Tor Lillqvist
a5e5d3cdf6 Introduce LOOL_NO_LOGCOLOR to enable turning off the annoying colours again 2016-08-31 16:59:43 +03:00