Gosh that was painful. But now they seem to be correct.
Some other clarifications and improvements. Also start trying to
handle touch device dragging in the tab stop area, but that handler
doesn't get invoked yet, and anyway any code to actually move the
nearest tab stop is missing.
Change-Id: I187bca84da70f03f5dcf032b997e43b5e54d7879
Reviewed-on: https://gerrit.libreoffice.org/84574
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 4b48ee682cf65fb3a7024e9a6e2cebe046847194)
Reviewed-on: https://gerrit.libreoffice.org/84797
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Draw only the user-edited/able ones. Draw all four kinds (left, right,
center, and decimal) the same for now, as a small triangle pointing
up. (Drawn using a CSS trick to get a triangle.) The tab stop
positions aren't actually editable yet, nor is there a way to add a
new tab stop or delete one. Later.
The code uses a CSS custom property, yay, to avoid duplication of a
magic value for the half-width of the triangle.
Change-Id: I862b09091bad03ad63425cc6e6759f3f13174579
Reviewed-on: https://gerrit.libreoffice.org/84474
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 5e6976f6eb23d742db7e8f9b334b521a299f2418)
Reviewed-on: https://gerrit.libreoffice.org/84764
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
No reason to make the code even harder to understand by using
variables that don't vary but hold a constant value. Especially when
the variable names don't match their constant value.
No changes in what the code does.
Change-Id: If98ef6cdd741e76e8b4e383d005486736bf227a3
Reviewed-on: https://gerrit.libreoffice.org/84763
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
There is too much state that isn't necessarily in sync. Get rid of
some of the coupling.
Instead of turning on the catching of touchstart events in the
_changeInteractions function, which does not work if you tap the
make-editable button before the document has been loaded completely,
start catching them right away after creation, but in the handler, the
_initiateDrag function, ignore the event if the "map" is not yet
marked as editable.
Change-Id: Ief7a98e9b6ffa4db9d41f558d1081687032c4bcc
Reviewed-on: https://gerrit.libreoffice.org/84235
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 4e42bae4a73fe8342921f4d695e9c84e723e3f33)
Reviewed-on: https://gerrit.libreoffice.org/84762
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Fire the 'scrolloffset' event also in
L.Control.Scroll._onUpdateScrollOffset(), which gets called when
panning a text document on a touch device.
There are still glitches in updating the ruler when one uses a pinch
gesture to zoom the document. But usually after a short moment the
ruler snaps into correct state.
Change-Id: Ic8dd5139ff49f6fe7961096552f1c7e6cf35356c
Reviewed-on: https://gerrit.libreoffice.org/83996
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/84048
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Note that in this branch it seems even harder to touch a margin handle
in the ruler exactly in the right spot to be able to drag it. You will
have to use your smallest finger and point very exactly. And still it
works only sometimes. (But I did get it to work once, honestly, so
ship it!) This obviously needs to be fixed, but cherry-picking this
commit as is for now.
Several changes:
On iOS, use touch events instead of mouse ones. One difference between
touch and mouse events is that the touchend event naturally does not
carry any position information (as the finger has been lifted from the
screen). So we need to keep track of where the last touchmove event
happened separately in _lastPosition.
Letting go of a margin handle after dragging it did not actually move
the coresponding margin in the document. The fix for this was to catch
the touchend event for the this._rFace element instead of for the
this._map element.
Once a margin had been moved, it could not be moved another time. The
reason for this was that because the document initially is readonly,
the this.options.interactive was set to false (see the
L.control.ruler() call in loleaflet/src/map/Map.js) and never changed
after that. This caused _updateBreakPoints() to pass {perm:'readonly'}
in the call to this._changeInteractions(). The fix was to set
this.options.interactive to true when turning on the interaction.
In theory this same problem probably would happen also in web-based
Online on "mobile" (i.e. phones), but we don't show the ruler there at
all, so the sitaution where a document would be initially read-only
and the ruler would show up doesn't happen.
Reviewed-on: https://gerrit.libreoffice.org/83807
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit caf37fb293a666b0a82ac8bd31df35b18b45fc01)
Change-Id: I0393704d02a2989b4ea3358dc4bee17e48c16ae6
Reviewed-on: https://gerrit.libreoffice.org/84047
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
We were inadvertently mutating and growing our copy of the bounds
to fetch here, causing a chunk of un-necessary rendering load,
particularly for spreadsheets.
Change-Id: Ia01565c043d1cb0172cabbec16d941dd8b66dd05
Change-Id: I98c141edbe88a74cf14453972494f29882aed23e
Reviewed-on: https://gerrit.libreoffice.org/84748
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
It will be closed always on tap on the document instead
of on 'cursor change'. This will prevent us from hiding
mobile wizard when user performed some action (eg. bold)
and invalidatecursor message was received.
Change-Id: I18faedb2a6c6317c547c1ed149923380cce4aa52
The browser has to move the sidebar to accomodate
scrolling, and this movement makes the sidebar
overlap with the document (specifically, the
scrollbar of the document) and causes other visual
glitches.
We now display a scrollbar at all times to make
the sidebar width fixed and also to avoid flickering.
This is the only portable/reliable way of avoiding
flickering/jumping-around due to scrollbar showing
and hiding. (Previously we had extra space in the
parent, but at least in Chrome it now always pushes
the canvas left when showing the scrollbar anyway,
so we gain nothing but having a thin margin on the
right, and we still got shifted left/right when
the scrollbar show/hide.)
Change-Id: Icbec841ffa4cec255e59f547530728f076d2877e
Reviewed-on: https://gerrit.libreoffice.org/84713
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Avoid race-condition scaling twips co-ordinates during a zoom to
a level that fails to match the core's understanding.
Fixes a race with other view's cursor positioning being reported
fast in new view twips, before the animation completes to that zoom.
Also fixes a writer zoom issue whereby you could get tiles at multiple
different zoom levels overlayed for parts of the screen when using
scroll-wheel zoom and panning fast.
Change-Id: I865920aa13715b852e14ab23f96781e076096808
Otherwise a cursor invalidation can close the wizard just after
it is opened.
Change-Id: I3e153ca05a0902b9b2225bbb6169062b79eebdd0
Reviewed-on: https://gerrit.libreoffice.org/84648
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
When image can not be loaded we remove the icon span and
change the titleSpan's class to the non icon one.
Removed existsIconForCommand's parts which are added for
conext menus.
Change-Id: I4c3130646b30aab06fb07415c08eea828eadf8db
Reviewed-on: https://gerrit.libreoffice.org/84646
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
It was a source of confusion that these bundled headers had to be
synced with core all the time, and when it did not happen, the builds
broke.
Change-Id: Id9d0a8a496b293d20c39e855176a00bcb85df640
Reviewed-on: https://gerrit.libreoffice.org/84358
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Temporary fix to allow showing of all widgets updated.
In the initial JSON some values or controls are missing.
This patch requests new JSON after current one was already received
to get updated one.
Change-Id: I74d0de7952d8ae8b86d8f6f9e9173e0a5b41b1c9
And disable a test that passes for me locally but fails on Jenkins.
Change-Id: Ifcdcedbac259247d784ce66185f95bfbe634381f
Reviewed-on: https://gerrit.libreoffice.org/84603
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ia29bce6ab4e26c63d7f3bf25bb3750d680e7c022
Reviewed-on: https://gerrit.libreoffice.org/84607
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
The app's WKWebView is not configured to allow opening web pages, so
it won't work anyway. When clicking the link the app will crash with
"Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'Returned WKWebView was
not created with the given configuration.'"
Change-Id: Iac05b74087331d6f3a0405e76f4323316af4729a
Reviewed-on: https://gerrit.libreoffice.org/84595
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Thus no "served by" information to display in Help>About.
Change-Id: Ia4f91431536f5261c6cb0ee26398b9c33c0d0ea3
Reviewed-on: https://gerrit.libreoffice.org/84596
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
The failing scenario was reproducible on my old phone:
* start editing the document from the shell
* add a word
* leave the editing using the '<' in the top left
* start editing the document again => boom!
In the normali, non-crashing case, the order of destruction is that
~ChildSession is called first (and calls ChildSession::disconnect() that
consequently calls Document::onUnload() via _docManager->onUnLoad(...).
The Document::onUnload() then deregisters callbacks and all is fine.
The in the above described crashing case, the Document is destroyed
before ChildSession and calls resetDocManager() for all sessions.
Before this patch, this meant that the _docManager was set to nullptr,
leading to situation that later, in the ~ChildSession, the call of
onUnload() was avoided, the callbacks were not unregistered, and later,
on the next document load, the app crashed because it called stale
callbacks.
I suspect the change might be useful even for the non-mobile case, but
not 100% sure, so rather do it MOBILEAPP-only.
Change-Id: I279a160ccaab3080e84fe0437ed72684331b6e13
Reviewed-on: https://gerrit.libreoffice.org/84588
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
So that they are in-process, which means it's easier to debug when they
fail.
Also, in UnitLoad, give up on trying to avoid the sleep after
disconnecting, it seems the old condition was not reliable.
Change-Id: I972a3319887a70eeea2585104ed1e762830ca505
Change-Id: If2547d8065d4158cffa8bee62ae78fc020e0b2b6
Reviewed-on: https://gerrit.libreoffice.org/84567
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Depending on timing, this failed with the following error:
wsd-14400-14411 [ docbroker_001 ] WRN Will not load document marked to destroy. DocKey: [/tmp/connectNoLoad_27c61e41_hello.odt].| wsd/DocumentBroker.cpp:520
Make sure we don't try to load the same document again when the cleanup
for the previous session is not done yet.
Change-Id: I354999fa934df665b48dca314d2b77ab95c84ec0
Before other content was still visible after user entered color picker.
But still we will need container with id for updates of colorpicker
later.
Change-Id: Id7cb9d3a77afa6e2a226250f10917fcd454d15dc