Commit graph

4434 commits

Author SHA1 Message Date
Henry Castro
20f6d8cdc7 kit: cosmetic
Required to custom lokit process debug
2016-12-16 23:39:53 -04:00
Henry Castro
e71c0046e7 kit: save first lokit PID
This is required to debug preinit stage
2016-12-16 23:39:08 -04:00
Henry Castro
8fdee3fca8 script: copy additional documents
This is only for debugging purpose
2016-12-16 23:38:32 -04:00
Pranav Kant
dd4a5278ad loleaflet: Fix cursor dissappearing during document load
Change-Id: I9e301d7d2b6e7d2626de91c242b7617fbc823572
2016-12-16 23:08:44 +05:30
Pranav Kant
d1a3d365b0 loleaflet: Cleanup & fix default numbering/bullet state
Automatically initialize formatButtons internal object to
preclude the possibility of one forgetting to enter the id of the
button in formatButtons object.

Fix 'id' of default numbering/bullet button after which it is
correctly showing the state now.

Change-Id: I57247e1b0e6d462153a47d31a883ceb04ecff74b
Reviewed-on: https://gerrit.libreoffice.org/32101
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 16:45:07 +00:00
Pranav Kant
e2151b30b2 loleaflet: Fix incorrect key name
It is insertannotation, not just annotation

Change-Id: I1bc01e87da963d0e07d670ffec261e33b45062d2
Reviewed-on: https://gerrit.libreoffice.org/32096
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 16:44:03 +00:00
Pranav Kant
56cb689a64 Handle enabled/disabled, true/false toolbar button states
If we get a true/false, assume its enabled.

Change-Id: I364c7cd611481757b674877ed44ac6ee0f6b0e58
Reviewed-on: https://gerrit.libreoffice.org/32089
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 15:08:02 +00:00
Pranav Kant
98036fd909 loleaflet: Don't move items to 'toolbar-more' after resizebreak
Change-Id: I9660e84f68cde2ab5eed6871d4f3948a736575b9
Reviewed-on: https://gerrit.libreoffice.org/32088
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
2016-12-16 15:07:54 +00:00
Tor Lillqvist
20f8c8d65a Use also the LastModifiedTime property from the WOPI CheckFileInfo response
If not present, set the FileInfo _modifiedTime to the UNIX epoch.

Change-Id: I2e805d34e426368e5319cb9321159c21fe8ae9e0
2016-12-16 15:21:06 +02:00
Pranav Kant
0e043853ea tdf#104695: Unit test for missing tiles due to low socket buffer size
Change-Id: I278c5d532cb9b6340dee71a4b66410b32a164704
Reviewed-on: https://gerrit.libreoffice.org/32072
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-12-16 10:25:15 +00:00
Pranav Kant
b26969b98c wsd: set minimum socket buffer size in debug mode
Change-Id: Ieae9721d45ade34c5ce9773867ab1ab997a344dc
Reviewed-on: https://gerrit.libreoffice.org/32071
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-12-16 10:24:14 +00:00
Pranav Kant
9b37eed727 Add missing config.h
Change-Id: Ib63c0bdfc8126fea211c5311c957985de6b00129
2016-12-16 11:33:18 +05:30
Pranav Kant
dd498ed079 Bin this unit test
This was added while debugging some problem with forward slashes
in docurl in websocket endpoint automatically being decoded on
some machines. But it turned out it was due to the apache server
setting. So, this test serves no purpose now and tests something
really obvious.

Change-Id: I4658354d53c481cf7554804383892f501bc408cd
2016-12-16 11:33:18 +05:30
Michael Meeks
e24dfb9616 Use a blocking write rather than failing when no space in write buffer.
Also avoid a poll syscall for an error state we'll get from the write.
2016-12-15 13:51:07 +00:00
Tor Lillqvist
ba765ddeba Fix accidentally pushed local debugging change, 1 instead of 10 min
Change-Id: I6b4fc6bff76d83442b17ee6ebf6c8fa718b80684
2016-12-15 15:04:19 +02:00
Andras Timar
73f2c278aa loleaflet: put link to git hashes beginning with 0 in About box
Change-Id: I3e981e72f69af45776f7ecccb10a0beda56f7c1f
2016-12-15 12:58:50 +01:00
Pranav Kant
73842dd307 Uncomment these console output statements
... as these are now printed only when compiled with
--enable-debug, so they shouldn't be polluting the release build.

Change-Id: I3169fb39cea298b001a4d576632a1634ff35e004
2016-12-15 16:55:09 +05:30
Pranav Kant
39dd5018e2 browser console logging depending on loleaflet_logging prop.
loleaflet_logging defaults to true with compiled with
--enable-debug otherwise false.

Browser will print additional debug info when this property is
set to true.

Change-Id: Id9fabf134bd8d19fa1a09ca8c0987df46d4f1a4c
2016-12-15 16:52:07 +05:30
Pranav Kant
6c4472de1d This code conditional to presentations only
Change-Id: If7caef1ec78e26960a4dd91edd3c798190d2fdc4
2016-12-15 16:12:30 +05:30
Pranav Kant
774a9a6e16 Remove devtools-detect as one of the dependencies
Usage of this module was removed in
2bbab9bf94

Change-Id: I7fdde32cdf52fa0d33859fc4cda58d4daed40254
2016-12-15 14:15:10 +05:30
Pranav Kant
1fa03a7c98 Lets avoid using global variable, map for consistency
Change-Id: I81157ea54ace6ff04d0730244f4ff8fdb893a3c3
2016-12-15 14:09:46 +05:30
Pranav Kant
1b690898f9 Clicking on content layer now also activates the map
Change-Id: Idd9343ab58e83ee1a710e82c649f2876c8b225bd
2016-12-15 13:42:45 +05:30
Tor Lillqvist
36f3dece7c Bluntly close sessions that have been idle for more than an hour
By that time the loleaflet code has already done the greying-out (this
happens at the latest after 10 minutes of inactivity) and marked them
as 'inactive'. Bluntly closing the session seems to work out fine, no
new horribly alarming message is displayed by the loleaflet code in
addition to the already visible 'Inactive document ...' one.

Change-Id: I420f0d7530194e6c8d6f34d7985ab810cde5a76a
2016-12-14 18:24:38 +02:00
Tor Lillqvist
8b05044151 Add an Emacs mode line to the two JS files I edit most often
Change-Id: I4bcce4a859221aa9581df85945080178f90ae6ce
2016-12-14 18:24:38 +02:00
Tor Lillqvist
2bbab9bf94 Don't let whether the web console is open of not affect our behaviour
After all, why would you have the console open unless when debugging
(even just following console.log() output), so it is
counter-productive to have the code behave differently in that case.

Change-Id: I2aa7cf095e249a4c87f920aa0f1911be76a348ca
2016-12-14 18:24:38 +02:00
Tor Lillqvist
8f98206926 Grey-out ("dim") after 10 minutes if idle even while having focus
(The greying-out without focus happens, as before, already after 30
seconds.)

Factor out the dimming code to a separate function _dim. When we have
focus, check once a minute if ten minutes has passed without user
activity. Keep track of when last user activity happened.

There is a bug left: When greyed-out while having focus, you need to
click on the background layer, not in the layer with the 'Inactive
document ...' text, to wake it up.

Change-Id: I19160a82f5de860fc609dad391b168acfba560ce
2016-12-14 18:24:38 +02:00
Tor Lillqvist
0bdac17fa6 Add 'userinactive' to messages that don't indicate user interaction
In fact, it is more or less the opposite;)

Change-Id: I34eca0ed6b7d4ce369ae803eac542f0996d193eb
2016-12-14 18:24:38 +02:00
Tor Lillqvist
cbb0bec0ab Mention that without flushing, log lines are not necessarily in chronological order
Change-Id: I9fef5f58ec1ac645f49543fbbe469e6f79ae175f
2016-12-14 18:24:38 +02:00
Pranav Kant
632c57df08 loleaflet: Fix stray toolbar items in corner cases
Change-Id: I4d2684548a9fb325afb62d4811f17f436621027f
2016-12-14 21:40:12 +05:30
Pranav Kant
7ce89800cb loleaflet: Check if this element exists before querying length
eg: for spreadsheets

Change-Id: Ie40fa27833fa0edb0e444a247895a1cb401b15b2
2016-12-14 21:40:05 +05:30
Pranav Kant
6f212ee49d loleaflet: Fix L.Browser.pointer
window.PointerEvent is available even on non-touch devices in
chrome and Edge (and maybe others too, firefox doesn't have it).

So it results in L.Browser.pointer resulting in true on Chrome,
Edge while false in firefox which leads to click event not
working on these browsers.

Fallout from a0036f24ba

Change-Id: I73b5824882e1cc1f87cdfbc9e7e31f22320367b1
2016-12-14 21:09:56 +05:30
Pranav Kant
07df52e45a loleaflet: Refresh the toolbar
Change-Id: I16fed0dd508ce6d3863157d316ab17898b680df5
2016-12-14 19:32:00 +05:30
Pranav Kant
7c6d4719da loleaflet: Print dialog for MS edge too
MS Edge seems to be very problematic when one tries to load the
pdf blob into the print iframe and issue a print command to it.

Lets fallback to print prompt as we have in firefox

Change-Id: I97fc394d0053030231c524efb6bf808d32a9aa07
2016-12-14 19:06:26 +05:30
Pranav Kant
1bfbd6990c loleaflet: Reuse L.Browser instead of our own logic
Change-Id: I479d6aa3de657ba032e3bb7e5039d5744a859163
2016-12-14 19:06:12 +05:30
Pranav Kant
a0036f24ba Pick changes from upstream Leaflet
Only the changes made to src/core/Browser.js

Change-Id: I96f95e59a50fabea7dad1a8836e78aebac9112c8
2016-12-14 19:03:13 +05:30
Pranav Kant
7ed38a2011 loleaflet: Pass print frame as argument to close function
Removing this._printIframe may still cause leakage here as
this._printIframe is overwritten everytime user issues a print
command.

Change-Id: I06f45604940380b809bc262f07b9b6a8aa7d9a87
2016-12-14 18:18:11 +05:30
Pranav Kant
e255fe64d2 loleaflet: bump timeout for closing print iframe to 5 minutes
Change-Id: If58a28ef5c856b4ab5e497028fbcabf7b954b282
2016-12-14 18:18:11 +05:30
Pranav Kant
9d039cbd5a Revert "loleaflet: print dialog: it seems that this magic hack is no more needed"
This reverts commit 8c522c44d1.

We need to remove the iframe otherwise it will leak.
2016-12-14 18:18:11 +05:30
Pranav Kant
23ab220259 Document owner termination feature
Change-Id: If9e09ba781e0cb53a6a96a6acdaac8995fa8f348
2016-12-14 18:18:11 +05:30
Andras Timar
9ee4062935 Bump version to 2.0.1+
Change-Id: I1a670d3b9a3a5d3711f1a83b2a8978e032ded774
2016-12-14 11:34:11 +01:00
Ashod Nakashian
fe38e0e1e6 loolwsd: per-socket dedicated sending thread
To avoid degrading performance for everyone
because of a single slow/bad connection, we
send data to clients each in its own thread.

Change-Id: I6f980c25a404c4d05bcdb1979849ea3d2776c7b9
Reviewed-on: https://gerrit.libreoffice.org/31984
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-14 04:21:20 +00:00
Ashod Nakashian
875d11f88b loolwsd: simplify checking for closed socket
Change-Id: I1f41c40bdd42ad6ab9224a2b13af97f84175492c
Reviewed-on: https://gerrit.libreoffice.org/31983
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-14 04:14:57 +00:00
Pranav Kant
1459223c69 wsd: Document expanding WOPI extensions
Change-Id: I1c2c510154a0a987095ff1f4c343c033150f8ae6
2016-12-13 20:17:32 +05:30
Pranav Kant
49193b3f58 tdf#104157: Fix Content-Type and add Content-Disposition for pdf
Change-Id: I07a02a621f0f067b9810d0f92bd3b9fff112af54
2016-12-13 19:39:25 +05:30
Miklos Vajna
d11997337e wsd: mark AppConfigMap as a final class
The call to the setRaw() virtual function during construction will not
dispatch to derived class, so the ctor is correct only in case there are
no subclasses.

Change-Id: I484d276dd05e53211b513373100b70586a5857c0
2016-12-13 13:56:42 +01:00
Pranav Kant
b914aa4222 wsd: If Disabled, turn their corresponding Hide options on
loleaflet will then automatically hide these options from the UI

Change-Id: I65a320850a35b5af4291d896d5942dddfaaa0c98
2016-12-13 18:03:37 +05:30
Pranav Kant
a76825728e Pass Disable{Print,Export,Copy} options to client and handle them
Change-Id: I59a9432bbdd06d8b184f96882c5f4009fcd0be54
2016-12-13 17:59:02 +05:30
Pranav Kant
3ce8c3158a wsd: Allow disabling copy/paste to/from the document to browser
Change-Id: I73c70f46f1db11d69ebff582f72127d304689aa2
2016-12-13 17:45:16 +05:30
Pranav Kant
6affbb307c wsd: Allow hosts to disable print, export
using these WOPI protocol extensions: DisablePrint,
DisableExport, DisableCopy. All assumed to be false if not
provided.

Change-Id: I415597d710107f9d8cbb8757f361365cc2a88eb1
2016-12-13 17:45:16 +05:30
Pranav Kant
1ddd85c77c Document downloadas protocol message
Change-Id: Iad8775c441e8fbb531b4608bd6ccb391435e7dcf
2016-12-13 17:45:16 +05:30