Commit graph

2443 commits

Author SHA1 Message Date
Ashod Nakashian
f83cc22db9 Documentation update for 'useractive' and 'userinactive'.
Change-Id: I4e2f0923aa5d0f35c29c752b144e23b365e73bb0
Reviewed-on: https://gerrit.libreoffice.org/24279
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-21 13:03:06 +00:00
Jan Holesovsky
22e8f8b1fe loleaflet: Group tile requests into rectangular areas, and call tilecombine.
Instead of asking for individual tiles, try to find rectangular areas in the
tile requests, and ask for the large rectangles using tilecombine, instead of
asking for individual tiles.
2016-04-21 12:14:32 +02:00
Jan Holesovsky
4a21e21627 loleaflet: Split the DOM handling from the actual asking for tiles. 2016-04-21 12:14:32 +02:00
Jan Holesovsky
a11aa8565c loleaflet: Change _addTile to _addTiles, and pass the entire queue. 2016-04-21 12:14:32 +02:00
Jan Holesovsky
538c1f571d loleaflet: Don't create the message if not necessary. 2016-04-21 12:14:32 +02:00
Jan Holesovsky
d8741d5ec3 loleaflet: Remove code for prefetching in other parts.
Not that a typical use case I'm afraid, and trying to switch parts for
prefetching was causing trouble in the past anyway.
2016-04-21 12:14:32 +02:00
Tor Lillqvist
232499f542 Add test that simultaneously requested tiles indeed were rendered just once
This test requires the renderid parameter to be present in the 'tile:'
response messages, and that is the case only when ENABLE_DEBUG, so we
can run the test only in a debug build.
2016-04-21 12:50:24 +03:00
Tor Lillqvist
95278b8643 Don't just re-use the 'tile:' response as a 'tile' request
In a debug build it contains also the parameter renderid. (And in the
future, might be extended in other ways, too.) Construct a new request
message that has exactly and only the parameters we want.
2016-04-21 12:42:53 +03:00
Tor Lillqvist
d446822fb3 Add some more logging for tile cache management 2016-04-21 12:42:53 +03:00
Jan Holesovsky
06366c2e4c Fix build. 2016-04-21 11:36:47 +02:00
Andras Timar
a6969c8827 document --admincreds and --allowlocalstorage in loolwsd.service 2016-04-21 11:22:22 +02:00
Andras Timar
745edddbe8 spec file extended for Fedora/CentOS 2016-04-21 10:14:29 +02:00
Miklos Vajna
9059774e64 LOOLTool: fix potential memory leak
Change-Id: Ib1c9bb5cbbef709882580de40500c1a9c8f70e4a
2016-04-21 08:37:27 +02:00
Ashod Nakashian
5fbaa8f3d2 loolwsd: useractive and userinactive command support
loleaflet can now send userinactive when the user
has switched tabs or the browser window loses
focus. Similarly, it can send useractive when
focus is regained.

Change-Id: Id3186949b10a8263e29ada1a790d3123a79e8f08
Reviewed-on: https://gerrit.libreoffice.org/24272
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-21 05:31:18 +00:00
Ashod Nakashian
b0701733fa loleaflet: leaflet is dimmed after losing focus by 10s and Online notified
Change-Id: I0ed38e89c6dbd4f7325a81cc49b3b37de65c0ea0
Reviewed-on: https://gerrit.libreoffice.org/24271
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-21 05:17:24 +00:00
Henry Castro
40daf0185a loolwsd: test: discovery 2016-04-20 23:09:04 -04:00
Henry Castro
11fbb33b56 loolwsd: test: simulate lokit crash test 2016-04-20 21:14:51 -04:00
Michael Meeks
9d913f986b Use size_t for iterating tokens. 2016-04-20 20:47:00 +01:00
Tor Lillqvist
5a509f9211 In a debug build, say in the tile: reponse also whether it was found in cache
Also, do the construction of the response string in
MasterProcessSession::sendTile() only when it is actually going to be
used.
2016-04-20 18:54:18 +03:00
Tor Lillqvist
842525c25c Guard against mixing up cout output from separate threads 2016-04-20 18:54:18 +03:00
Tor Lillqvist
77a91c4b2e In debug builds append a renderid=<unique-id> token to tile: responses
Will be used in unit test to verify that several clients of the same
document asking for the same tile simultaneously indeed do cause just
one tile rendering to take place.
2016-04-20 18:54:17 +03:00
Tor Lillqvist
7b47548020 Add getToken* variants that iterate over a StringTokenizer
If any of the tokens in the string matches name=<value> for the name
in question, store that value and return true. Otherwise return false.
2016-04-20 18:54:17 +03:00
Tor Lillqvist
d423f7c2fd Add Util::UniqueId() to get a string id that is unique across processes and calls 2016-04-20 18:54:17 +03:00
Tor Lillqvist
e94e8344ad IIUC, the 'tile' and 'tile:' messages have an optional timestamp parameter 2016-04-20 18:54:17 +03:00
Tor Lillqvist
9499071707 Change comment to make sense 2016-04-20 18:54:17 +03:00
Pranav Kant
769c0591ed bccu#1656: Scroll when you are at the bottom of the screen
Change-Id: Id78ee3ad75bc2f1f3781c3e8ede9d4262e46a0f9
2016-04-20 20:27:57 +05:30
Pranav Kant
616cb5f451 bccu#1689: Show a popup when non-editlock view tries to edit
Show a popup on 'mousedown' and 'keypress' events for
non-editlock modes.

Change-Id: I3a8a964d6a507549f521f3f831a4c623d202c86c
2016-04-20 16:50:36 +05:30
Pranav Kant
14b672bf5f bccu#1707: Do not mix editlock with permissions
For some reason, text cursor gets stuck making it impossible to
type in the document. This only happens with firefox + owncloud.

Lets keep the editlock state separately in map, and do not yet
mix the permissions with editlock state.

Change-Id: If4193d08b7228cde510321ec5b4c892b8617d8a7
2016-04-20 16:50:36 +05:30
Andras Timar
028becc511 error: unused parameter ‘part’ [-Werror=unused-parameter] 2016-04-20 13:00:43 +02:00
Jan Holesovsky
97342a2817 bccu#1653: Make the .html's, .css's and .js's versioned.
It is still possible to access them directly via loleaflet/dist/<something>,
but such use can lead to unexpected behaviour due to various caching in the
browsers etc.
2016-04-20 12:58:10 +02:00
Michael Meeks
a47355db2f Expand use of the TileBeingRendered structure.
Implement this for tilecombine, and do tile writes in each client's
thread separately. Add env-var. to trigger sleep, and tune it to 1
second; easily long enough to exercise this code-path.
2016-04-20 11:14:18 +01:00
Andras Timar
14458095ad README: loolwsd's --test option was binned 2016-04-20 12:00:46 +02:00
Andras Timar
59aa99d08d typo: consistenly -> consistently 2016-04-20 11:51:28 +02:00
Andras Timar
f0549f8ba1 document --disable-ssl and related stuff 2016-04-20 11:48:12 +02:00
Andras Timar
af36a3bd13 document --allowlocalstorage and --admincreds 2016-04-20 11:35:31 +02:00
Pranav Kant
4fb1f60e06 Treat minified files as binary files
Helps 'git grep' do its job better.

Change-Id: Ia3c671df471d7ee4545aff3ea96c2bc104d0d025
2016-04-20 14:32:16 +05:30
Tor Lillqvist
2d74d65578 Rant about the duplicate specification of document URI, GET and 'load' 2016-04-20 10:35:38 +03:00
Miklos Vajna
5e2937bf79 Log: strcpy -> strncpy
Change-Id: I2929ad46b422e6e55e198064c2930028df844630
2016-04-20 09:10:30 +02:00
Pranav Kant
da7dd6f634 loleaflet: Remove bunch of warnings from the console
It is incorrect to add the <div> elements with parent as w2ui
toolbar outside of onRefresh() method because toolbar can
refresh multiple times during its lifetime meaning that all such
added elements will be removed after first refresh breaking the
font/back color feedback javascript code.

Hence, this also fixes the font/back color feedback.

Change-Id: Iacd4f8a5c8ebb64e5bba5e7f05ceef8b77051534
2016-04-19 22:13:36 +05:30
Andras Timar
090c246be4 bccu#1696 - enable WOPI connection from the same host (by IP address) by default 2016-04-19 15:32:34 +02:00
Tor Lillqvist
f825fea9db operator '?:' has lower precedence than '+'; '+' will be evaluated first 2016-04-19 16:21:55 +03:00
Tor Lillqvist
bf6dd4e291 Typo 2016-04-19 16:17:58 +03:00
Pranav Kant
79b21598d5 admin console: Handle spaces in filenames
Change-Id: Id63189e5a58e023669304438784d30c6ec48a1c2
2016-04-19 16:38:08 +05:30
Tor Lillqvist
d5bb373447 Improve efficiency when multiple clients of same doc ask for same tile(s)
Keep track of tiles being rendered in TileCache, and when asked to
render the same tile as is already being rendered, just "subscribe" to
the existing ongoing rendering. When a tile has been rendered and is
being sent out to clients, check if there are "subscriptions" and send
it to them, too.

One problem is that if the client that caused a tile rendering to be
initiated goes away before the rendering has completed, it will never
complete, and the subscribers are left without the tile.

Change-Id: Icca237876a0f466c29eb5bf60ffd4da3d9d68600
Reviewed-on: https://gerrit.libreoffice.org/24228
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-19 10:51:45 +00:00
Andras Timar
fb7de5df8e we need key.pem for admin console in http-only case too 2016-04-19 12:11:37 +02:00
Andras Timar
4864fac25a enable default admin/admin optionally (e.g. for CODE VM) 2016-04-19 12:11:37 +02:00
Pranav Kant
3e93a212f0 loolwsd: Admin console unit tests
Change-Id: Id0baa51c2adb14b77080b5acd2abf0658ee54b2b
2016-04-19 14:40:03 +05:30
Pranav Kant
3111c5c6d1 loolwsd: Use common method to send websocket messages
Will help in placing unit test hooks to better test the admin
console

Change-Id: Ic4daae685a8fe493a0395d94e40112bf119c93e3
2016-04-19 14:39:50 +05:30
Pranav Kant
56d18909d5 loolwsd: Remove unused code
Change-Id: I7edf6b8d4f83f2cf9f85a2075d1dca216cda3d34
2016-04-19 14:39:50 +05:30
Jan Holesovsky
aa158331fc Move css stuff from loleaflet.htms to the appropriate .css files. 2016-04-19 10:23:06 +02:00