Commit graph

1520 commits

Author SHA1 Message Date
Jan Holesovsky
0bb8d0f1c3 loleaflet: Rename searchAll() to highlightAll() for clarity.
The previous work changed the behaviour of searchAll so that it does not
create a real selection, but instead adds additional mean of highlight, so
that it is possible to show all the results, and travel them at the same time.

The usage is now:

* call once the highlightAll()
* and then traverse the results using search()
2016-01-25 22:42:38 +01:00
Henry Castro
6b28433265 loolwsd: Log::warn when the thread pool is full.
When thread pool is full no more connections are accepted.
It is confused as a deadlock
2016-01-25 17:11:51 -04:00
Marco Cecchetti
a6364328e1 loleaftlet - enable propagation of the onmousedown in view mode
For details see bug bccu1446.

Change-Id: I91585e2402aea2e72645b7358ee68efc8b7de313
2016-01-25 19:06:34 +01:00
Marco Cecchetti
c3083e9048 loleaflet - active cursor in multiple documents - fixed
Added handlers for focus and blur events.

Change-Id: Ie85ae264696e5221168f7ac280ba91732e9f5df3
2016-01-25 19:06:30 +01:00
Henry Castro
e3fd07ad0e loolwsd: remove unnecessary inter process mutex
It is no longer needed becuase loolbroker handle connections
2016-01-25 12:26:22 -04:00
Henry Castro
eb2675164f loolwsd: remove unnecessary child PID file log
This is no longer needed due to logging improvements
2016-01-25 11:51:27 -04:00
Henry Castro
1ff52f2e2c loolwsd: remove unnecessary Poco thread default pool 2016-01-25 11:45:50 -04:00
Miklos Vajna
1d6d0741f0 loolwsd: -Werror,-Wtautological-constant-out-of-range-compare 2016-01-25 13:08:37 +01:00
Jan Holesovsky
f7d4a2cfa1 loleaflet: Position the mouse with 'drop' always (even html snippet). 2016-01-25 12:35:24 +01:00
Andras Timar
650ea84b4f loleaflet: Cmd on Mac should be sent as Ctrl to server (Linux) 2016-01-25 12:04:53 +01:00
Jan Holesovsky
29cc2e1b21 loleaflet: Add 'rel's for spreadsheet column/row headers for easy addressing. 2016-01-25 11:32:23 +01:00
Andras Timar
b8d560ddb9 loleaflet: focus to hidden input field when user presses Cmd (Meta) 2016-01-25 10:35:24 +01:00
Ashod Nakashian
65e06c1db7 loolwsd: per ChildProcessSession callback queue and thread
By giving dedicated queue to each session we eliminate
the bottleneck that a slow client will introduce
on every other session on the same document.

Change-Id: I715b80a8cd7bbef1268dc472d0b32e35f3dd6444
Reviewed-on: https://gerrit.libreoffice.org/21763
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 23:57:54 +00:00
Ashod Nakashian
904bf929f1 loolwsd: throttle traffic for inactive sessions
Sessions that have been inactive for a certain duration,
currently set at 120 seconds, will not receive updates.

A new statistics class tracks the activity of every
session and blocks callback updates from reaching
inactive clients.

Change-Id: I64296488b2c0be0598b218ba89a6d02f057a5f7e
Reviewed-on: https://gerrit.libreoffice.org/21760
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:14:57 +00:00
Ashod Nakashian
11e8a9bb4f loolwsd: test improvements
Change-Id: Ieeef1019063636cef171cc360f523810f6f989d2
Reviewed-on: https://gerrit.libreoffice.org/21759
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:12:43 +00:00
Ashod Nakashian
75ede04cd7 loolwsd: improved child forking
Change-Id: Ic05b412bb9c467659c24cba12f385ed9c0c67b84
Reviewed-on: https://gerrit.libreoffice.org/21758
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:11:54 +00:00
Ashod Nakashian
f9fd4c917a loolwsd: refactored HTTP Request Handler
Change-Id: I84685910afa04664639ae674fd66ff888962387e
Reviewed-on: https://gerrit.libreoffice.org/21757
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:10:53 +00:00
Ashod Nakashian
22e129702e loleaflet: extended loadtest timeout to 6s
Change-Id: I6779cf37a9e320369b6dc06be2c691e9f6b99088
Reviewed-on: https://gerrit.libreoffice.org/21756
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:09:54 +00:00
Ashod Nakashian
b85b4423b0 loolwsd: break the wait on save-as queue and better failure handling
Change-Id: Ifee252b3c189ee0b1287bda891b38c5abddb7440
Reviewed-on: https://gerrit.libreoffice.org/21755
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:09:28 +00:00
Ashod Nakashian
9593ec5720 loolwsd: improved polling and pong with client
Change-Id: I17c4f7685d23b6e4c84a7f8b34fcb7dbcaf959f9
Reviewed-on: https://gerrit.libreoffice.org/21754
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:02:16 +00:00
Ashod Nakashian
2bb2e2aec1 loolwsd: protect against empty messages
Change-Id: Ic60c1abf85268c9ad629bc1f981e53688fc6267a
Reviewed-on: https://gerrit.libreoffice.org/21753
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:01:03 +00:00
Ashod Nakashian
55f2105f00 loolwsd: logging improvements
Change-Id: I77844a2b549c1f497c2d44f054169bf11d9227d8
Reviewed-on: https://gerrit.libreoffice.org/21752
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:00:34 +00:00
Ashod Nakashian
ef2ec0b2e2 loolwsd: fixes to broker threading and communication
Broker cache clean up is now done only during searching
as there we loop over processes and request status
from each child.

Internal helpers simplified and termination is done
in a single removeChild helper.

Change-Id: I31f7df5429f0737d352842d5c0f6a02b91b8078f
Reviewed-on: https://gerrit.libreoffice.org/21751
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 20:59:40 +00:00
Ashod Nakashian
4dc9fa7eb7 loolwsd: prevent deadlock when purging sessions
Change-Id: I293e28674ed721741fa0afc57b37a636833d2e0e
Reviewed-on: https://gerrit.libreoffice.org/21750
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 20:58:09 +00:00
Marco Cecchetti
a698d6a2d1 loleaflet - fix for multi-line text selection issues
Steps for reproducing the problem:
1) try to select some multi-line text
2) still holding the mouse button pressed move the mouse pointer
outside the browser window
3) release the mouse button
4) move the cursor back over the map.

Expected result: the selection should not change any more after the
mouse button has been released.
Real result: the selection changes when you move the mouse.

The same happens when you move the mouse pointer out of the tiles
covering, even if we are still inside the html document element area
where the map is embedded.

A similar issue occurs in view only mode when you drag the document: in
this case the problem occurs only when you move the mouse pointer out of
the tiles covering, but still inside the html document element area
where the map is embedded.

The behaviour described above is due to the fact that the map container
receives mouse events only when the mouse pointer is over the map.
The implemented fix checks for mouseout events which occur between a
tile element and a non-tile element (such as the the resize-detector
iframe, the scroll-bar container, the selection cursor marker). When
such an event occurs handlers for mousemove and mouseup events are
attached to the HTML document element and to the resize-detector iframe.
In the same way when a mouseover event occurs between a tile element and
a non-tile element such handlers are removed.

It was needed to attach handlers to the resize-detector iframe too since
the HTML document element seems to not be able to receive mouse events
that occur inside the iframe area.

A side effect of this fix is that now the text selection goes on
changing as far as the mouse button is not released even when the mouse
pointer is moved out of the tiles covering.

Since for an iframe the coordinates embedded in a mouse event are
relative to the iframe area, it was needed to implement a workaround in
order to avoid sudden changes in the current selection or in the
document position when the mouse pointer moves out of the map.
2016-01-24 20:19:48 +01:00
Marco Cecchetti
47aeaa62e0 text doc - search - normal search does not discard highlighting
Improved search behavior for text documents:now when a normal search is
performed with the same search string utilized by a previous searchAll
action, search results highlighting is not removed.
2016-01-24 20:19:13 +01:00
Ozcan Esen
b281819ab1 loleaflet: new searchAll for presentation
does not affect regular searches since it caches results only if
(this._docType === 'presentation' && count > 1) and clears cache on
mousedown

Change-Id: I5569424df6e463da0c63166eef36842fa7d32f0e
2016-01-24 20:18:02 +01:00
Andras Timar
bc98b0194e loleaflet: fix Cmd+C / Cmd+X / Cmd+V on OS X Safari 2016-01-24 18:20:30 +01:00
Andras Timar
7e50b73f50 loleaflet: fix Cmd+C / Cmd+X / Cmd+V on OS X Firefox and Chrome 2016-01-24 17:42:19 +01:00
Henry Castro
620fdaf3fb loleaflet: update button modifier on mouse event 2016-01-22 22:17:37 -04:00
Henry Castro
74b92c775c loleaflet: fixed js lint errors in src/core/Socket.js 2016-01-22 21:41:26 -04:00
Jan Holesovsky
1da4769924 loleaflet: Implement rich copy / paste inside the document. 2016-01-22 16:30:44 +01:00
Jan Holesovsky
0c509e17c1 loolwsd: Fix /convert-to to handle filenames containing spaces. 2016-01-21 23:30:52 +01:00
Tomaž Vajngerl
6c152a595a loleaflet: dedup - move clipboard func. to Compatibility class
(cherry picked from commit 125e445a6b00b04e5581ce156d2d79f3558bcb80)
2016-01-21 21:00:22 +01:00
Tomaž Vajngerl
2152c1420a loleaflet: use IE11 clipboard function for cutting too
(cherry picked from commit a71d245f284873fe37951851889ed31e4a22898c)
2016-01-21 20:34:31 +01:00
Tomaž Vajngerl
58c12c9e5c loleaflet: IE11 has his own way to access the clipboard
(cherry picked from commit 26f061248ddd57cb9ab23307daa2a8f3cb6e3e8f)
2016-01-21 20:28:35 +01:00
Ashod Nakashian
41da8f144e loolwsd: unload command added
Change-Id: I30c42e24aa38c676e4bc6c7e6a2715d9e72430b9
Reviewed-on: https://gerrit.libreoffice.org/21686
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:07:54 +00:00
Ashod Nakashian
a882ed1aa1 loolwsd: thread safety fixes in broker
Change-Id: Ibfff184ad294c14d6583f7a8282edc4e2742ad52
Reviewed-on: https://gerrit.libreoffice.org/21685
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:07:02 +00:00
Ashod Nakashian
d3fc5ac37b loolwsd: sockets are shutdown on disconnect
Change-Id: I1c00be4648cff94013ceab87fcb607b9bb921535
Reviewed-on: https://gerrit.libreoffice.org/21684
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:06:37 +00:00
Ashod Nakashian
dd374d8aec loolwsd: disconnect command to gracefully shutdown a socket
Change-Id: I8beb4c14fc95bdb2a98c7e5da44408511bce5e28
Reviewed-on: https://gerrit.libreoffice.org/21683
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:05:55 +00:00
Ashod Nakashian
d310d3f3f5 loolwsd: proper ping handling by echoing
Change-Id: Ifc66ae1bc15d588d4613d87ab0fa19ec389b7615
Reviewed-on: https://gerrit.libreoffice.org/21682
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:04:26 +00:00
Ashod Nakashian
23ca0f0d77 loolwsd: detect child termination by signal as well as exit
Change-Id: Ic4dc89a7ad1470cc7afbd763b904b617b36e62aa
Reviewed-on: https://gerrit.libreoffice.org/21681
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:03:53 +00:00
Ashod Nakashian
291b0aac67 loolwsd: don't ignore the last few bytes of a closed socket
Change-Id: Id6332857e49ccbacfa6e63b87a1ed570e9598147
Reviewed-on: https://gerrit.libreoffice.org/21680
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:03:29 +00:00
Ashod Nakashian
d2bde985cc loolwsd: poll timeout of 500ms and handling priority events
Change-Id: Iadf449ee62700e1ac5da2be8c73c674657633808
Reviewed-on: https://gerrit.libreoffice.org/21679
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 16:02:04 +00:00
Ashod Nakashian
6b24eb7bba loolwsd: PIPE_BUFFER -> READ_BUFFER_SIZE = 2048
Change-Id: I12e9725549a15b2cb1c287db9de0fca732dafac2
Reviewed-on: https://gerrit.libreoffice.org/21678
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:59:47 +00:00
Ashod Nakashian
8ec0efe8bc loolwsd: const correctness
Change-Id: Icf1e7d625f9217abf3abe5d9123347aa61e0a74c
Reviewed-on: https://gerrit.libreoffice.org/21687
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:59:15 +00:00
Miklos Vajna
6fb558741c leaflet: position cursor before image drop
So we insert the image (close to or even exactly) at the drop position,
instead of the last cursor position, which may be far away.

With this, we're closer to the desktop image drop behavior in the
browser.
2016-01-21 16:56:44 +01:00
Ashod Nakashian
bccfd79d35 loolwsd: reset http request handler's thread name as it's reused
Change-Id: I62332e1d3018a7ff3cebe3982910792fa75d0c8f
Reviewed-on: https://gerrit.libreoffice.org/21676
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:45:30 +00:00
Ashod Nakashian
49d7c0e17f loolwsd: improved lokit callback notification dispatcher
Change-Id: I88abad83a3d06eb530200d921ef25b68465b82b6
Reviewed-on: https://gerrit.libreoffice.org/21675
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:45:00 +00:00
Ashod Nakashian
11f7746640 loolwsd: avoid reentering Poco::Log and deadlocking while handling signal
Change-Id: I3ee16ac32a337a9e1ff798495d45fb1359f4f063
Reviewed-on: https://gerrit.libreoffice.org/21674
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-21 15:44:38 +00:00