Commit graph

24642 commits

Author SHA1 Message Date
Szymon Kłos
b63c464fbe SlideShow: allow to download slides not visible in previews bar
add tag to the command so we can detect that the request is for
slideshow, so we can allow to download

in other case if slide is not visible in the left sidebar as
thumbnail - then request is not sent

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7a719b45932e8785293b77a187dd2cee81c704ce
2024-07-17 20:13:38 +02:00
Szymon Kłos
fccfa4b6b3 SlideShow: use high resolution slides
- we use getPreview tof etch high resolution images
  what takes time
- flow is converted into async version with callbacks
  called when we receive tiles, so we are sure we have
  the data already

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I93d25abdd33a3e5a6849238f538b3f83fcfeae77
2024-07-17 20:13:38 +02:00
Szymon Kłos
eeda3f9bdd SlideShow: introduce SlideCompositor
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I15a0681ec78b292eb684c2c2c392529fc399dc6f
2024-07-17 20:13:38 +02:00
Szymon Kłos
f6a474ea03 SlideShow: do transition only when we have slide content
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I131acee71fade034759097048116cadf76d4a319
2024-07-17 20:13:38 +02:00
Szymon Kłos
8f90c9d6a2 SlideShow: add missing hook removal
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I5c2ee56cd43762f655f049c9e0c90a6328b9e407
2024-07-17 20:13:38 +02:00
Szymon Kłos
1af694dbd6 SlideShow: type slide info objects
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib1bd234fbae1f1370a188b3be74340c8d8e1cbab
2024-07-17 20:13:38 +02:00
Szymon Kłos
5ca350cde7 SlideShow: apply prettier rules
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I545d8e89ad6bbd4ba492067a776669f63833cef3
2024-07-17 20:13:38 +02:00
Szymon Kłos
b9140a94bd SlideShow: extract all slides hiden notification code
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I65a0ed6a798a440be270912e859a2f161c6864b7
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
6cce6db13e Transition: Use correctly namespace and call PerformTransition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: If1aeea62714ee8b417b70e57c280095977c928c9
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
c45a5fb406 Transition: Add Split transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: Iaf884265a2ae7d90e4bed032222c73e0a6ef8b0e
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
a4571a1e8e Transition: Add Push transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I68fe10793e29d823a27f12a6bf22f4cdd3756e70
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
9c51273a84 Transition: Add Simple Dissolve transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I808c15d6b940965a68471c5ec21c892f382a0e25
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
bc5505dd50 Transition: Add Cover transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I4371a077415f5db66bd508d89d59856d927f4064
2024-07-17 20:13:38 +02:00
Szymon Kłos
468fdbac86 SlideShow: use correctly the namespace
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id4209e890f3a8eeee9466e2f46c6a6ca173607c4
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
429bad3c54 Transition: Add Cut transition and add missing SlideShow namespace for transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I59cea7096f1b76fe0f23596082ac4fe7f1f31ab7
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
0f5111b46a Transition: Add Venetian transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: Ib1e72185b170c3f78b377e4a0f9b345ceb128d64
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
7815a61988 Transition: Add Wedge transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I6fa0c053976fb8dcfe67095aaa584ae5ca1e977e
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
659781ff71 transition: Add Box transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: Ice876d13b0c4d2c3315ac2900011b4eaff559ed1
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
73dbedb1ab transition: Add Oval transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I4256fdf96383bf1ee9f7efb2fbc423d929fa8ea3
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
7c647d6672 transition: Add Diamond transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I719ce3fe4c1615e88df680a2d7abedb039e13312
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
0117866349 transition: Add Circle transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: Ib63ba32be40248d4f97ce8f3a601ddeebac0c5ee
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
fe0958844a transition: Add Plus transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I3c3d6b68a4487d2f7b7d5f7c767802e8ed94e792
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
51bf623e05 transition: Add Checkers transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: Ia1e88336309974606d0213a8e9c302995a4b1590
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
5190548acd transition: Add Bars transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: Iaade3d8ed5ca577c2527ce69bbe2c73f025db5f2
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
c72f43e9f1 transition: Add Uncover transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I022faa3b84b46c18be0fa7b388500d1c04fe2a95
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
d7359a0971 transition: add wheel transition with variants
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: Ic72da9383f30f395d07021cd860acb44f2494e13
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
96b7af490b Refactor code for integrate multiple transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I536c1454ed0c27e67d4ff9e4d368e1a6f09cd23a
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
a0890604c8 Add Wipe Transition with four direction variants
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I3c2fa516d94ce3990d800c25bd95286fc1666445
2024-07-17 20:13:38 +02:00
Szymon Kłos
57f83e3636 SlideShow: try to cache slides
- unfortunately requesting big previews is slow
- it still uses part previews from sidebar

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I72305a754091105f512fd53d54c1aaf6893323bf
2024-07-17 20:13:38 +02:00
Szymon Kłos
95c2a812bc SlideShow: switching the slides
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I69e97d429e116d4d41da396d8dda51d659e58945
2024-07-17 20:13:38 +02:00
Szymon Kłos
74867719a1 SlideShow: extract transition handler
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If25434889dc773546b5e2e5363106cfb8464d086
2024-07-17 20:13:38 +02:00
Szymon Kłos
eb671baef6 SlideShow: use presentation info
- first turn on fullscreen (has to be on user interaction)
- then start presentation when presentationinfo and content arrives
- share some code, remove unused code

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7a3f7daad31c590e653e62cfd12bef112064abe2
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
4e008cae9e Replace first two slide preview with hard code image path
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: Iafb297f6699b5c3e3f9b3b76d21c3619dcf16f6a
2024-07-17 20:13:38 +02:00
Szymon Kłos
a2e83037bb Unify SlideShow namespace usage
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia20c3fee0159238badabcbb8948825077abfb20c
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
a8cdf1985a Prepare Presentation mode canvas for transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I1335c5191ae3c3d2df8e5b956a5268f7289b86b3
2024-07-17 20:13:38 +02:00
Tomaž Vajngerl
14683f93db Introduce SlideshowPresenter to show the slide shows
SlideshowPresenter is a class for presenting individual slide
bitmaps and transitioning between the slide bitmaps.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ie4a23574deeb1207ce63ccd152fe7be1d9ca84a1
2024-07-17 20:13:38 +02:00
Javiya Vivekkumar Dineshbhai
e474454b78 Add 2d Fade transition
Signed-off-by: Javiya Vivekkumar Dineshbhai <vivek.javiya@collabora.com>
Change-Id: I4745b6e8d747e68cc8e0264a534ba9bf87d90df8
2024-07-17 20:13:38 +02:00
Szymon Kłos
cf7f0b4dd4 Convert SlideShowPresenter to TS
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic54a92e499b6171bed79a2d6cdab7cbe0e4aff3c
2024-07-17 20:13:38 +02:00
Tomaž Vajngerl
10e73c48c0 Introduce SlideshowPresenter to show the slide shows
SlideshowPresenter is a class for presenting individual slide
bitmaps and transitioning between the slide bitmaps.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ie4a23574deeb1207ce63ccd152fe7be1d9ca84a1
2024-07-17 20:13:38 +02:00
Caolán McNamara
be940ae030 run cypress tests with mount namespace defaults
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I72749f46090f90f73835eabfc02dab9e1771b229
2024-07-17 16:49:30 +02:00
Caolán McNamara
5fbc4bbbdd use a smaller subset of flags for remounting readonly
a) In the linux namespace mount case an additional MS_NOATIME, etc. will result in
EPERM on remounting something hosted in a toplevel [rel]atime mount. man 2 mount
has 'An attempt was made to modify (MS_REMOUNT) the MS_RDONLY, MS_NOSUID, or
MS_NOEXEC flag, or one of the "atime" flags (MS_NOATIME, MS_NODIRATIME, MS_RELATIME)
of an existing mount, but the mount is locked'.

b) lxc has default apparmor rules of
https://github.com/lxc/lxc/blob/main/config/apparmor/abstractions/container-base
where the closest match is:  "mount options=(ro,remount,bind,nodev,nosuid)"
so additional 'MS_SILENT' or 'MS_REC' flags similarly also cause the remount to
be denied

So if we use a more recognized set of options we work out of the box in
the default lxc configuration.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5f8de2de998ae1a85fefc1c9537b79b2b3bdefec
2024-07-17 15:40:30 +02:00
Josh
9719250e73 fix(COOLWSD): Fix a typo remove_font_config->remote
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
Change-Id: Ib2c5bc13ded052aa3e76b0dcb280b32d7febedb5
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
2024-07-17 15:07:34 +02:00
Caolán McNamara
e5bfc8529e this._marker.closePopup not a function
this can be reproduced by inserting a table in writer, and then clicking
and dragging one of the "marker" indicators above the columns

wsd-308187-308314 2024-07-17 06:59:38.909586 +0000 [ websrv_poll ] ERR  jserror {
  "userAgent": "mozilla/5.0 (x11; linux x86_64; rv:109.0) gecko/20100101 firefox/115.0",
  "vendor": "",
  "message": "TypeError: this._marker.closePopup is not a function",
  "source": "https://.../browser/.../bundle.js",
  "line": 21863,
  "column": 88
}
this._marker.closePopup is not a function
_onDragStart@https://.../browser/.../bundle.js:21863:88

possibly since:

commit 9932ad7516
AuthorDate: Tue Jul 9 18:41:52 2024 +0300

    Remove unused files, variables and functions.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I34b21713b980beba0e1123a9738c870334c10354
2024-07-17 12:47:15 +02:00
Caolán McNamara
72de0e666c undefined docLayer seen on _onWheelScroll
wsd-308160-312471 2024-07-17 08:14:44.302140 +0000 [ docbroker_031 ] ERR  ToClient-7e2: jserror {
  "userAgent": "mozilla/5.0 (x11; linux x86_64; rv:127.0) gecko/20100101 firefox/127.0",
  "vendor": "",
  "message": "TypeError: docLayer is undefined",
  "source": ".../browser/.../bundle.js",
  "line": 20766,
  "column": 37
}
docLayer is undefined
L.Map.Scroll<._onWheelScroll<@.../browser/.../bundle.js:20766:37

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibaa7aef4051977e708b7dad5396ac0564b06a5af
2024-07-17 10:43:14 +01:00
Caolán McNamara
b65ded3f6b Allow Namespace use even if BindMounting failed
For Namespaces the parent uses e.g.

jails/195178-46f603be/tmp/cool-82ChWNp1XiISVSpV/

to pass files to what is normally the child's (hidden) bind mount of that as

jails/195178-46f603be/82ChWNp1XiISVSpV/tmp

If BindMounting fails and we fallback to linking, then symlink
jails/195178-46f603be/tmp/cool-82ChWNp1XiISVSpV/ to the fallback
jails/195178-46f603be/82ChWNp1XiISVSpV/tmp so the parent can still
use the path expected for Namespaces.

So we can still get the goodness of namespaces wrt capabilities even
if we have the ills of bind-mounting fail.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I9a6f9e8db8f6edced18fe20367afc4d599a29ed2
2024-07-17 11:19:11 +02:00
Gökay Şatır
0fd5802ed7 Introduce docevents.ts for firing / listening to events.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I856bd4666f0a00fbc822b67a18e3aca52095b252
2024-07-17 11:09:29 +02:00
Gökay Şatır
e5392d861a Move the resizeDetector and use document-container for the event handling.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I6990480da8ba3a058e4e5d32407bf38d341e8ee4
2024-07-17 11:09:29 +02:00
Miklos Vajna
d04d6bd392 wsd: avoid nested startActivity()
Avoids this assertion failure:

    #7 0x7f9fbef8fcf1 in __assert_fail (/lib64/libc.so.6+0x42cf1) (BuildId: cfb059a57e69ac95d5dadab831626b3bd48a4309)
    #8 0x55d44ed78891 in DocumentBroker::startActivity(DocumentBroker::DocumentState::Activity) /home/vmiklos/git/collaboraonline/online-fuzz/./wsd/DocumentBroker.hpp:1550:13
    #9 0x55d44ee0884f in DocumentBroker::startSwitchingToOnline() /home/vmiklos/git/collaboraonline/online-fuzz/wsd/DocumentBroker.cpp:4654:10
    #10 0x55d44f05760a in ClientSession::_handleInput(char const*, int) /home/vmiklos/git/collaboraonline/online-fuzz/wsd/ClientSession.cpp:1168:20

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Iedc515b90c0e4f43dc14f0d998ba5c756fddd10d
2024-07-17 09:46:50 +02:00
Szymon Kłos
321c41cd51 ServerAudit: add post message status checker
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic455e3fe3cd731d73056693f8523342bed70027d
2024-07-17 09:35:37 +02:00
Szymon Kłos
595fb45132 ServerAudit: add browser side checks
can be used for quick check if post message api is
correctly initialized in the current session

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3b64ce738362cd1be936fe3e26a9ad381e01fdb2
2024-07-17 09:35:37 +02:00