Commit graph

4444 commits

Author SHA1 Message Date
Ashod Nakashian
ea2c3eb15c wsd: deduplicate tile messages in SenderQueue
Change-Id: Ib1cc38f34534aa754503ef296871815bc3d5450d
Reviewed-on: https://gerrit.libreoffice.org/32158
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-19 05:55:33 +00:00
Ashod Nakashian
7e1529af31 loolwsd: add tokenization to MessagePayload
Change-Id: I39135b2ad65da5abce93848a68faffc93906a0c0
Reviewed-on: https://gerrit.libreoffice.org/32157
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-19 05:51:49 +00:00
Ashod Nakashian
58d679240c loolwsd: better MessagePayload encapsulation and cleanup
Change-Id: I690f1044f75582b6e7f05b2026f96a0720be2cbc
Reviewed-on: https://gerrit.libreoffice.org/32156
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-19 05:50:30 +00:00
Ashod Nakashian
32271b8d5c loolwsd: string trimming helpers
Change-Id: I5e47f92b624890421bd7022084063cdea77da12b
Reviewed-on: https://gerrit.libreoffice.org/32155
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-19 05:46:15 +00:00
Ashod Nakashian
8099b84c3e loolwsd: run whitebox unittests with make check
Change-Id: I4354e1f42f33a5b2181a895077e1e16abb4e2c99
Reviewed-on: https://gerrit.libreoffice.org/32154
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-19 05:44:40 +00:00
Ashod Nakashian
5a987bea90 loolwsd: better to poll less frequently
Change-Id: I8ad44d132f11d32247f48583151c650e98856f82
Reviewed-on: https://gerrit.libreoffice.org/32153
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-12-19 05:42:20 +00:00
Pranav Kant
8d3c60c9a8 Bin 'setting minimum socket buffer' in non-debug mode for tests
Initial effort was setting it when we are compiling with
--enable-debug or when not, unit tests are running, but since we don't
run the unit tests in absence of --enable-debug anyways,
there is no use for this #else code block.

Change-Id: I9d7c66a18be160a47afd2bf336d89d50d4f2463e
2016-12-18 00:34:43 +05:30
Henry Castro
f0c5e907ab kit: debug, simulate loading document
Very useful when the bug is reproducible in the preinit, init lokit stages,
so the scenario can be isolated.
2016-12-17 08:32:49 -04:00
Henry Castro
38549b0c9b kit: debug, wait until unique kit die
Very useful to debug preinit stage when it is
ensured 1 kit process
2016-12-17 07:56:03 -04:00
Henry Castro
416c4a5267 Revert "disable 'Insert Special Character' for Impress"
This reverts commit 0e786d14a0.
2016-12-16 23:40:21 -04:00
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