Commit graph

14333 commits

Author SHA1 Message Date
Michael Meeks
a739e268e1 Tolerate a null this.dialog on the map at start.
Change-Id: I1d74b9899c0bebe075c83ee79987b60154a27dac
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-03-03 21:08:45 +00:00
Michael Meeks
4c4c02b3b9 Firefox 42 ESR workaround.
We get a single exception during setup from setSelectionRange,
presumably when the textArea is not focused. That causes a leak
of _ignoreInputCount - which kills text input.

So catch and ignore the exception.

Change-Id: I3fdfff99344f53b03ebadec2e551d7ee70416334
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-03-03 21:08:45 +00:00
Henry Castro
cedf950a52 wsd: add interactive state
Add a new state before load the document,
when Macro Security dialog popup, and avoid
to send the event load timeout.

Change-Id: I5973c5205e90e5447e5478cbab895709a68606f6
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-03-03 09:18:15 -05:00
Tamás Zolnai
d4f4abde02 cypress: avoid "detached from DOM" failure in statusbar tests.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I48696c4b7bba68b176ab948dcac9d7728a9c7831
2021-03-03 14:34:14 +01:00
Tamás Zolnai
fd481bf669 cypress: fix spec existence check usage.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ie71828942e0f67df7e33be51f4727af8edbd1340
2021-03-03 14:34:14 +01:00
Gökay Şatır
0f76dfa925 ScrollBars: Make them pixel perfect.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I5d00b444e43c65c65366efb2b54cc6d4c58c3499
2021-03-03 16:31:08 +03:00
Gökay Şatır
52759920a5 mCustomScrollBar: Remove.
It's not used anymore.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I4424018e6b1820de0d86c9058207fe19f46e0c16
2021-03-03 14:04:11 +03:00
Gökay Şatır
68ac78ceec Impress: Remove mCustomScrollBar
Use native scroll bars.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I63eeac7916e9f7edc2decc0e9338c36bda48ee50
2021-03-03 14:04:11 +03:00
Gökay Şatır
b9e50b7de6 Control.Scroll.js: Removed.
ScrollSection.ts is the updated version of this file.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I484dcb7eafdc3ca62ba4d8ad864e0de711567d66
2021-03-03 14:04:11 +03:00
Gökay Şatır
1bf9a9a9e9 scroll-container: Remove references.
This class was used by mCustomScrollBar.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Id912677c3fa2cfdfa6cd5824975d8630ec6a2ac7
2021-03-03 14:04:11 +03:00
Gökay Şatır
078ce5b24e Map: Remove function "enable".
It was used for managing the mCustomScrollBar. Not needed anymore.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Ibb1da1e69556f4af56353d2f8d326a3b9a56f059
2021-03-03 14:04:11 +03:00
Gökay Şatır
6fa20e77aa Calc: Set variables upon selection all.
wholeColumnSelected and wholeRowSelected variables need to be set before the command is sent to the server.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I302643d5dbaeb3a6919c51eef34a2523e5f9bfa0
2021-03-03 13:17:34 +03:00
Tamás Zolnai
87c6c7d81d cypress: extract typeIntoInputField() method.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I8dc89dc6abad9106ffae42fc52723e503ddc0cca
2021-03-02 17:58:52 +01:00
Tamás Zolnai
45300cc51b cypress: make: fix typo in function name.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Id72466486ed8c1ea13e61db4bcc03a98096bbad3
2021-03-02 17:58:52 +01:00
Gleb Popov
f3a22e981f Port loolwsd-systemplate-setup to FreeBSD.
Signed-off-by: Gleb Popov <6yearold@gmail.com>
Change-Id: I9944e79d0fe220a5f2fe40d2ba98619c22d25a77
2021-03-02 13:44:09 +01:00
Gökay Şatır
ae0c2bb813 Cypress Test: Update some mobile writer test.
Some tests were relying the cursor position for checking the document
dimensions. Those code lines are removed from the tests.

Document size is not able to checked from html elements. Instead, a unit
test may be prepared for that task.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Idd4fd52656b2969bf0bfa9534a807a7a8bd3f987
2021-03-02 09:25:41 +03:00
Gökay Şatır
3d507fb3a5 Control.Scroll.js: Move to typescript.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: Iac7c15fa5ea1fb8fe78119ea28032017552d93d4
2021-03-02 09:25:41 +03:00
Gökay Şatır
5c3cdcc5a4 Map.Scroll.js: Update it according to Scroll Section.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I9ea5687d9c730152875f6c6abe23a5c4653846e1
2021-03-02 09:25:41 +03:00
Gökay Şatır
a1c39ece7e CanvasTileLayer: Mirror functions.
Mirror Map's events to tiles section.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I5ef658789a21e20c8655ecc9cafcdc4556086d0e
2021-03-02 09:25:41 +03:00
Gökay Şatır
84e1d855d0 loleaflet: Makefile bug.
All ts files were being compiled upon a change on one of them. Bug
solved.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I3137d07e7ddf43076bf8b55fbacba1caef6f19cd
2021-03-02 09:25:41 +03:00
Ashod Nakashian
6e88701702 wsd: test: assert when failing copy-paste test
The assertion will include much more info than
simply flagging for failure, which helps in
troubleshooting failures.

Change-Id: I6bd649e5334a90e9feaf0d72347790088f70c1b3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-01 21:50:18 -05:00
Ashod Nakashian
ff68273549 wsd: test: logging in copy-paste test instead of cerr
Change-Id: Ia80721179c37ef159cb0c8206ba13f650ad03244
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-01 21:50:18 -05:00
Ashod Nakashian
355850e7e7 wsd: test: improve Template test
Change-Id: I4b19580e9753133ba83ee64ce287ead3fe021ccb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-01 21:50:18 -05:00
Ashod Nakashian
5371715a52 wsd: logging improvements
Change-Id: Ic887c42f0ca844e54bfc054e9c0706bbec7ebb6f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-01 21:50:18 -05:00
Ashod Nakashian
21e99cf128 wsd: better errno handling in sockets
Change-Id: Id3a7744802cbf693a92e39ef4d99433951dfa923
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-01 21:50:18 -05:00
Ashod Nakashian
16185ff4fd wsd: cosmetics
Change-Id: I8ceb1a14f4d479dd7cae9a0a9a2f02990a7b4279
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-01 21:50:18 -05:00
Ashod Nakashian
feaed252bf wsd: retry flushing the WS buffered data when shutting down
Normally writeOutgoingData flushes all the available
write buffer to the socket. However, when an error
occures during the write, the flushing loop is
broken and the error is expected to be handled
in the poll loop (or, at any rate, the poll loop
will sooner or later retry).

This doesn't work when the socket is being shut
down. Details and stack-trace is added in the
code to document this scenario.

The proper fix to flushing before shutting
down is to do it asynchronously (i.e. flag for
shutdown, let poll flush the buffers, and then
close the socket), but currently this isn't
easily possible (again, details in the added
comment). For now, we do a second attempt to
write, before we give up and warn of lost data.

Worth noting that this was caught thanks to the
simulated socket error logic. Every so often the
Close Frame of the WebSocket was getting lost.
This frame is asserted in the 'crash test' and
the explanation is that it happened when the
simulated socket error happened to hit during
the writing of the Close Frame (as one statistic
this happened ~15% of the time, when running the
crash test in a loop). With the retrying in this
patch I was able to run the crash test successfully
a few 100 times without failures.

Finally, we unify the flushing with the mobile-app case
to minimize the differences as much as possible and
improved the logging a bit.

Change-Id: I0c0559d6095cd2af8250a7e65a972ba672ecd4b1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-01 21:49:26 -05:00
Ashod Nakashian
7a13fa0943 wsd: socket error simulation to maintain the ssl state
SSL signals whether it needs more data to read or write
so that we perform the appropriate polling and call
the respective API. Since during error simulation
we skip calling the SSL API altogether, we shouldn't
change the last desired operation it communicated to us.

This becomes clear when we consider that we always read,
unconditionally, in StreamSocket::handlePoll (but write
only when poll signals POLLOUT event). This means that
if we decide to simulate a socket error during such
uncoditional read, and SSL wants to write, we would
reset its last wantsTo flag from write to read!

Logically, since we aren't even invoking any SSL API
during a simulated error, we shouldn't change the
SSL state one way or the other.

Change-Id: Ie4ddbc959f8424ea4ac3bc52f30edbc7399b2c7a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-01 21:48:43 -05:00
Ashod Nakashian
3982c7b34f wsd: set errno when simulating socket errors for SSL
The API is the same for both SSL and non-SSL sockets
(they are virtual functions), and the API relies on
errno to detect errors and decide to retry, log, or
break. As such, we must set the same EAGAIN when
simulating socket errors for both SSL and non-SSL
cases, so that the behavior would also be the same.

Change-Id: Ib1695cc94d93f5ecc53d7b22872f459ac8b11bbd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-03-01 21:48:43 -05:00
Szymon Kłos
e3a0c8b972 Add ids for shortcutsbar in draw
needed for show/hide functionality using postmessage

Change-Id: I9dc486c886ae7537963b339c7a4f08104a337e85
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-01 13:28:06 +01:00
mert
5df4eb2d02 Fix exception when there is no handles on shape selection
Change-Id: I0725a239177413b3415ec329186c4ee33cf37519
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
e84e5addec Draw: Hide items that does not have functionality from notebookbar
Change-Id: I1914136d9a0f442463d1ab94eb2b2e32b1685c07
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
fe7252d108 Added ConnectorToolBox to Notebookbar
Change-Id: If00563eef7a5277b2ac82f61b402074c390b7186
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
Szymon Kłos
d92d69335d Update unocommands.js
Change-Id: I2bceaafd2eb65dd6280f5e0e2390e4c697715b28
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-01 13:58:14 +03:00
Szymon Kłos
a47773954f Update unocommands for Control.NotebookbarDraw.js
Change-Id: I575fc13e4db5860bdeca7093bbc64c85b15a63cb
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-01 13:58:14 +03:00
Szymon Kłos
bf62ad5acb notebookbar: added for draw
Change-Id: I9caf00f1b02ebbf0820051d8e44721a8eb4549fd
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2021-03-01 13:58:14 +03:00
mert
63839fec60 Show rectangle bounds while moving the shape
Change-Id: Ic9a305267ab64e87d503db688555feb01647114d
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
84ad87284a Fix handle positions are wrong in Calc
Change-Id: I7f520b02787aabef3e8c5ccbc275aa2bdcc6359c
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
71ba3d9cb6 Include map zoom to twiptolatlng function
Change-Id: Ia95726a77494e53b2e027b694252a2bda4c9cec2
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
8594118f4d Fix rotation handle position
Change-Id: I75b3c2ff343828d00d263edb236e0d90f3d51f7f
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
244aa7eacc Share scale/scaleend functions with Connectors
This will avoid code duplications.
Middle handle and flat line handles will use the same function

Change-Id: I6fc3509147e3908a39692488305f89c6f8527a1f
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
158907dd00 Implemented Line drag animations
Change-Id: Id677bb43547d6cb9da4870117272eabea67828a2
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
80ca12aeaf Implemented PolyHandle type
Change-Id: If4b50919bcaa8cce597dbaa2e80830b6601d92d0
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
6ad4e97aba Pass mousedown callback function to createHandler
This will make the function resuable.

Change-Id: Ic59f023fc87c6e962e1c52cb1e9eeff846bb89bd
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
8034f8e724 Implemented new CustomShapeHandle marker
Change-Id: I46f974bc234b053af8904ac5e07cbb7d72ef01fe
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
d3eeaac275 Adjust getPoints to new handle callback
Change-Id: Ifc65cfe01f88209ca9f0e50583c652744112fee7
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
7d66977d9f Hide rectangle borders to match with core
Change-Id: Ic594dcb8eaf656ecc8f559966de06c1fe8cadfaa
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
mert
fa488e6e5e New MoveShapeHandle uuno command
Change-Id: I4b28616dd2e931cd1882d035e5846ab4a19c6cf6
Signed-off-by: mert <mert.tumer@collabora.com>
2021-03-01 13:58:14 +03:00
Tamás Zolnai
b14c3b3441 cypress: fix overlay tests with php-proxy.
php-proxy slows down things and make it visible, that
cellA1Bounds and cellC3Bounds can be initialized to the same
value. So let's wait fo the cell cursor to be updated before
we set the cellC3Bounds value. Changed the toString() function
to exactly match with the json in the overlay items' text attribute.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Idde0f516ff568cb14b5d53224fd75ebc6167abe9
2021-03-01 11:28:04 +01:00
Tamás Zolnai
706206948c cypress: alias -> local variable change in moveCursor helper method.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I3b52648ae9d9396d4cd3eb7dacfe9248fdbc2b52
2021-03-01 11:28:04 +01:00