Commit graph

26 commits

Author SHA1 Message Date
Tor Lillqvist
410270fd14 Actually use the safer (escaped) string we construct
Also, no reason to append a null byte to it.

Don't know why this worked even when not escaping "dangerous"
characters. Does Webkit have a more relaxed lexical analyser?

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Idfedcbf11a9ee565b954ba972e7e3bc9b804a122
2023-01-06 16:09:52 +02:00
Gökay Şatır
8bcdc9d975 Enable developer console for webkit debugging.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I544abda3744fc5415a4dfd935e0df864c5765ca3
2022-11-29 17:50:11 +03:00
Tor Lillqvist
da0e05a7a1 Make the gtk app work again
Apparently using a debug=true query parameter breaks tile
rendering. So let's not use that then. Now tiles show up.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ia458a6bdf35b956bf2570801d132211f600513f6
2022-11-24 16:09:03 +02:00
Tor Lillqvist
81c7d3aa1b Seems that the lang and userinterfacemode query parameters are needed
Now some UI stuff shows up on the cool page. No document tiles yet,
though.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I5cc33cc8df3a700ee752a3ad437cdb3aabfbca86
2022-11-24 16:09:03 +02:00
Tor Lillqvist
a0fabb543c Probably must check for arbitrary binary data here, too, like in the iOS app
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ic6834f5f5b57035831778305ece9228d14bed930
2022-11-24 16:09:03 +02:00
Tor Lillqvist
459bba8dc2 Make the gtk app build again
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I000fdcc059c39cf3c0c4a9ec066f4039c653cb70
2022-11-24 15:02:10 +02:00
Ashod Nakashian
85eaefd741 gtk: mobile: don't cleanup log when failing
Change-Id: Ibd8d3d65f5fffc0abbc410e3f265c3eea0af6c40
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-08-02 14:45:12 -04:00
Ashod Nakashian
4e9b836ea6 wsd: always use Util::forcedExit to properly cleanup
We need to flush and shutdown logging before exiting,
so we can't use _exit/_Exit directly.

In addition, with profiling (e.g. code-coverage) we
must flush the profile data, lest it's all for naught.

Change-Id: I726c5a2f4e699c17dd0d7d5b1c86d856e0118b3c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-08-02 07:51:52 -04:00
Andras Timar
f07ff8c7e0 rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
2021-11-18 14:14:11 +01:00
Henry Castro
a8b628ee43 mobile: rename 'lool' -> 'cool'
Change-Id: Icea136704eaf13c6da0ec455a9e6207b57e2a7f6
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-17 09:17:58 +01:00
Henry Castro
705968cef5 gtk: rename loleaflet -> browser
Change-Id: Ib46a667f6add8b52600074d10db459e69b836d04
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Henry Castro
e0fe47be5f rename loleaflet.html -> cool.html
Change-Id: Iaa28f1269f8192755ec323396ae4ff054529f412
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-11-10 17:18:56 +01:00
Ashod Nakashian
28815ac33e gtk: always include config.h first
Change-Id: I8e1f57e5dd2935d9b22d906acbb75e28f84016f5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2021-06-19 17:44:59 -04:00
Andras Timar
0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Ashod Nakashian
9f7f6dca6a wsd: cleanup realpath call
The new utility is safer and more readable.

Change-Id: I3a86675378d458cb004e5534dbf2b401936d0e57
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98183
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-06 13:54:54 +02:00
Jan Holesovsky
4f5e262344 Revert "android: Various fixes to make the sending from the core to JS..."
Lets leave this optimization for later, this is incomplete, and does not
fix the problem which it was originally supposed to address.

This reverts commit bce922e8fd.

Change-Id: I5d2ee19058261c7612d36014181f509604c8acde
2019-02-20 00:38:16 +01:00
Jan Holesovsky
bce922e8fd android: Various fixes to make the sending from the core to JS working.
Change-Id: Idc22ccbae1effac9e2db5293703a768e033fd7e9
2019-02-19 10:56:58 +01:00
Michael Meeks
33ecef7791 cleanup and simplify.
Change-Id: If90f8ccef4f223ae783363e9fc3a3e9fed644c24
2018-11-02 16:19:54 +00:00
Michael Meeks
647150427e gtk: compile with older WebKit JS interface too.
Change-Id: I62ce96932b77ea8051cfb2862cb4f617d2804c1d
2018-11-01 21:23:12 +00:00
Tor Lillqvist
2d2e3cf531 Take path to document to edit on the command line
Sure, could add more and more options to specify what LibreOffice
installation to run against, etc, like gtktiledviewer. That is not a
priority though, this is just a very basic testbed for now.
2018-10-26 11:53:49 +03:00
Tor Lillqvist
81f56d6d78 SCNR: Avoid forward declarations, just move the functions before their use 2018-10-26 10:47:57 +03:00
Tor Lillqvist
9360beb97f hello-world.odt does not exist out of the box
Need to copy from hello.odt, like the Makefile.am does when you 'make
run'.
2018-10-25 22:30:11 +03:00
Tor Lillqvist
16a805e290 Fix some memory management foo 2018-10-25 21:28:13 +03:00
Tor Lillqvist
fc2023723e Attempt to fix the thread problems in the GTK+ testbed app
Use g_idle_add() to make the webkit_web_view_run_javascript() call run
on the GTK+ thread. Correspondingly, need to use a separate
short-lived thread to do the fakeSocketWrite() calls from
handle_lool_message(), so that the GTK+ main loop is ready to run the
added lambda. Or something like that.

Now it gets a bit further, doesn't crash, but just sudddenly exits
before showing the document even.
2018-10-17 23:30:26 +03:00
Tor Lillqvist
452a0a46c2 More work on the GTK+ testbed app
Add plumbing to send messages from the Online code to the JavaScript
code, and vice versa. Similar to what is done for iOS.

Sadly, it crashes. Multi-thread issues. Not surprisingly, it crashes
when I call webkit_web_view_run_javascript() in another thread than
the one where the GTK+ and other Webkit calls were done. I need to
come up with some clever way to do everything from the same thread.

(On iOS, I use dispatch_async(dispatch_get_main_queue(),...) to
schedule a block (i.e., a lambda expression) to be run in the main
thread.)
2018-10-17 22:48:14 +03:00
Tor Lillqvist
f122e92977 Build the GTK+ testbed app using autofoo
Rename the gtk/gtk.h file to gtk/gtk.hpp to not have it confused with
the actual GTK+ <gtk/gtk.h>.
2018-10-17 11:00:28 +03:00
Renamed from gtk/main.cpp (Browse further)