common/SigUtil.cpp | 1 + debian/loolwsd.cron.d | 2 +- loleaflet/Makefile.am | 2 +- loleaflet/debug/document/loleaflet.html | 2 +- loleaflet/dist/loleaflet.html | 2 +- loleaflet/dist/toolbar/toolbar.js | 6 ++++++ loleaflet/src/layer/marker/Cursor.js | 6 ++++++ loolwsd.spec.in | 2 +- wsd/DocumentBroker.hpp | 4 ++-- wsd/FileServer.cpp | 18 +++++++++++++++--- 10 files changed, 35 insertions(+), 10 deletions(-)
New commits: commit 5748bcfaa8c729202cdb87be6711a0594696cb38 Author: Jan Holesovsky <ke...@collabora.com> Date: Wed May 30 20:03:21 2018 +0200 Cleanup all old files in the cache, not just png's. Change-Id: I61c7016d0e318742d733da72d97572215ba46a36 Reviewed-on: https://gerrit.libreoffice.org/55095 Reviewed-by: Andras Timar <andras.ti...@collabora.com> Tested-by: Andras Timar <andras.ti...@collabora.com> (cherry picked from commit 53596f4dbe8e6abd8bcb6976676a0b3897d3ccef) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/debian/loolwsd.cron.d b/debian/loolwsd.cron.d index 85a3afcae..761029b92 100644 --- a/debian/loolwsd.cron.d +++ b/debian/loolwsd.cron.d @@ -1 +1 @@ -0 0 */1 * * root find /var/cache/loolwsd -name "*.png" -a -atime +10 -exec rm {} \; +0 0 */1 * * root find /var/cache/loolwsd -type f -a -atime +10 -exec rm {} \; diff --git a/loolwsd.spec.in b/loolwsd.spec.in index f7355b170..fb813e5dc 100644 --- a/loolwsd.spec.in +++ b/loolwsd.spec.in @@ -87,7 +87,7 @@ install -D -m 644 sysconfig.loolwsd %{buildroot}/var/adm/fillup-templates %endif mkdir -p %{buildroot}/etc/cron.d echo "#Remove old tiles once every 10 days at midnight" > %{buildroot}/etc/cron.d/loolwsd.cron -echo "0 0 */1 * * root find /var/cache/loolwsd -name \"*.png\" -a -atime +10 -exec rm {} \;" >> %{buildroot}/etc/cron.d/loolwsd.cron +echo "0 0 */1 * * root find /var/cache/loolwsd -type f -a -atime +10 -exec rm {} \;" >> %{buildroot}/etc/cron.d/loolwsd.cron %files /usr/bin/loolwsd commit 36e252603e84949dd684ffd93eab188d8ac8f1d7 Author: Andras Timar <andras.ti...@collabora.com> Date: Wed May 30 13:46:23 2018 +0100 Use pattern rule instead of shell wildcard (cherry picked from commit 5308a8e6e4dc02356def53a9c1f988c6e7e9032c) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/Makefile.am b/loleaflet/Makefile.am index 97656b6d0..71c2f937f 100644 --- a/loleaflet/Makefile.am +++ b/loleaflet/Makefile.am @@ -28,7 +28,7 @@ node_modules: npm-shrinkwrap.json dist/$(JQUERY_UI_IMAGE_PATH)/%.png: $(JQUERY_UI_IMAGE_PATH)/%.png mkdir -p dist/$(JQUERY_UI_IMAGE_PATH) - cp -a $(JQUERY_UI_IMAGE_PATH)/* dist/$(JQUERY_UI_IMAGE_PATH)/ + cp -a $< $@ dist/l10n/%.json: po/%.po @util/po2json.py $< -o $@ commit e8259fd39e37250a520306f46bba03092785c980 Author: Andras Timar <andras.ti...@collabora.com> Date: Fri May 18 09:48:07 2018 +0200 serve files with old gith hash in their path, that comes from cached discovery.xml Change-Id: I157a410df0a90f9ab151b899e44566b95cbd9929 Reviewed-on: https://gerrit.libreoffice.org/54557 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> (cherry picked from commit 3cdb93b72c827472a10998d87f4816578c10db5a) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp index 78ae12711..25b86422d 100644 --- a/wsd/FileServer.cpp +++ b/wsd/FileServer.cpp @@ -32,6 +32,7 @@ #include <Poco/Net/HTTPResponse.h> #include <Poco/Net/NameValueCollection.h> #include <Poco/Net/NetException.h> +#include <Poco/RegularExpression.h> #include <Poco/Runnable.h> #include <Poco/StreamCopier.h> #include <Poco/StringTokenizer.h> @@ -162,6 +163,13 @@ void FileServerRequestHandler::handleRequest(const HTTPRequest& request, Poco::M LOG_TRC("Fileserver request: " << requestUri.toString()); requestUri.normalize(); // avoid .'s and ..'s + std::string path(requestUri.getPath()); + if (path.find("loleaflet/" LOOLWSD_VERSION_HASH "/") == std::string::npos) + { + LOG_WRN("client - server version mismatch, disabling browser cache."); + noCache = true; + } + std::vector<std::string> requestSegments; requestUri.getPathSegments(requestSegments); const std::string relPath = getRequestPathname(request); @@ -421,9 +429,13 @@ std::string FileServerRequestHandler::getRequestPathname(const HTTPRequest& requ requestUri.normalize(); std::string path(requestUri.getPath()); - - // Convert version back to a real file name. - Poco::replaceInPlace(path, std::string("/loleaflet/" LOOLWSD_VERSION_HASH "/"), std::string("/loleaflet/dist/")); + Poco::RegularExpression gitHashRe("/([0-9a-f]+)/"); + std::string gitHash; + if (gitHashRe.extract(path, gitHash)) + { + // Convert version back to a real file name. + Poco::replaceInPlace(path, std::string("/loleaflet" + gitHash), std::string("/loleaflet/dist/")); + } return path; } commit 7bd76adb65a889b4bc2d864a3c9d9897dbd8f330 Author: Andras Timar <andras.ti...@collabora.com> Date: Fri May 25 14:31:34 2018 +0200 l10n of color picker widget Change-Id: Ibbb9556b2ef3de3fd61b2f83e0ec45edc23d779e Reviewed-on: https://gerrit.libreoffice.org/54804 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> (cherry picked from commit 5a29248000167d5e8995214d38b547f1202218eb) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index ba5aac56a..3db961c26 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -294,6 +294,9 @@ function onClick(id, item, subItem) { // absolutely no idea why, but without the timeout, the popup is // closed as soon as it is opend setTimeout(function () { + $('#fontColorPicker').colorpicker({ + strings: _('Theme Colors') + ',' + _('Standard Colors') + ',' + _('Web Colors') + ',' + _('Theme Colors') + ',' + _('Back to Palette') + ',' + _('History') + ',' + _('No history yet.') + }); $('#fontColorPicker').colorpicker('showPalette'); $('.ui-widget-content').addClass('loleaflet-font'); }, 0); @@ -302,6 +305,9 @@ function onClick(id, item, subItem) { // absolutely no idea why, but without the timeout, the popup is // closed as soon as it is opend setTimeout(function () { + $('#backColorPicker').colorpicker({ + strings: _('Theme Colors') + ',' + _('Standard Colors') + ',' + _('Web Colors') + ',' + _('Theme Colors') + ',' + _('Back to Palette') + ',' + _('History') + ',' + _('No history yet.') + }); $('#backColorPicker').colorpicker('showPalette'); $('.ui-widget-content').addClass('loleaflet-font'); }, 0); commit 5995ec3cb30b2f343d38a1670325b0c290799572 Author: Andras Timar <andras.ti...@collabora.com> Date: Wed May 23 15:53:12 2018 +0200 Help translations should take precedence (stray ~ chars were detected in German help) Change-Id: I21a71743b4cc39edee7391a9b57191f7ae2c67f8 Reviewed-on: https://gerrit.libreoffice.org/54710 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> (cherry picked from commit 1047a0f13ec5689cded4b0661992e242569607ca) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/debug/document/loleaflet.html b/loleaflet/debug/document/loleaflet.html index e15dd8225..4880f8fa9 100644 --- a/loleaflet/debug/document/loleaflet.html +++ b/loleaflet/debug/document/loleaflet.html @@ -28,8 +28,8 @@ <link rel="stylesheet" href="/loleaflet/%VERSION%/toolbar/evol.colorpicker.min.css"> <link rel="localizations" href="/loleaflet/%VERSION%/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/> <link rel="localizations" href="/loleaflet/%VERSION%/l10n/locore-localizations.json" type="application/vnd.oftn.l10n+json" /> -<link rel="localizations" href="/loleaflet/%VERSION%/l10n/uno-localizations.json" type="application/vnd.oftn.l10n+json" /> <link rel="localizations" href="/loleaflet/%VERSION%/l10n/help-localizations.json" type="application/vnd.oftn.l10n+json"/> +<link rel="localizations" href="/loleaflet/%VERSION%/l10n/uno-localizations.json" type="application/vnd.oftn.l10n+json" /> <style type="text/css"></style></head> <body> <script src="/loleaflet/%VERSION%/jquery/2.1.0/jquery.min.js"></script> diff --git a/loleaflet/dist/loleaflet.html b/loleaflet/dist/loleaflet.html index 42505b50d..3511fafc2 100644 --- a/loleaflet/dist/loleaflet.html +++ b/loleaflet/dist/loleaflet.html @@ -21,8 +21,8 @@ <link rel="stylesheet" href="/loleaflet/%VERSION%/branding.css"> <!-- add your logo here --> <link rel="localizations" href="/loleaflet/%VERSION%/l10n/localizations.json" type="application/vnd.oftn.l10n+json"/> <link rel="localizations" href="/loleaflet/%VERSION%/l10n/locore-localizations.json" type="application/vnd.oftn.l10n+json" /> -<link rel="localizations" href="/loleaflet/%VERSION%/l10n/uno-localizations.json" type="application/vnd.oftn.l10n+json" /> <link rel="localizations" href="/loleaflet/%VERSION%/l10n/help-localizations.json" type="application/vnd.oftn.l10n+json"/> +<link rel="localizations" href="/loleaflet/%VERSION%/l10n/uno-localizations.json" type="application/vnd.oftn.l10n+json" /> </head> <body style="user-select: none;"> commit eb358e8db31befb5cff6a2a3391cafefda0d0289 Author: Tamás Zolnai <tamas.zol...@collabora.com> Date: Tue May 22 19:09:56 2018 +0200 lok: Restart blinking animation when moving the cursor It provides a better user experienc that the user see the cursor at the new positin (not in invisible state). Change-Id: Ifa4b9c65b13901fec0c606422a7bd2a292d85608 Reviewed-on: https://gerrit.libreoffice.org/54679 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> (cherry picked from commit 15f42c493b97a58d903a50b476d7a63bf3be61ad) Reviewed-on: https://gerrit.libreoffice.org/54694 (cherry picked from commit 86db1912df690f56fcf89d04b5cf5905b96355d5) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/src/layer/marker/Cursor.js b/loleaflet/src/layer/marker/Cursor.js index 792a13485..8be48906f 100644 --- a/loleaflet/src/layer/marker/Cursor.js +++ b/loleaflet/src/layer/marker/Cursor.js @@ -105,6 +105,12 @@ L.Cursor = L.Layer.extend({ _setPos: function (pos) { L.DomUtil.setPosition(this._container, pos); this._container.style.zIndex = this.options.zIndex; + // Restart blinking animation + if (this.options.blink) { + L.DomUtil.removeClass(this._cursor, 'blinking-cursor'); + void this._cursor.offsetWidth; + L.DomUtil.addClass(this._cursor, 'blinking-cursor'); + } }, _setSize: function () { commit 1b67930245b4603c42e1ee21012f595117acf4fe Author: Jan Holesovsky <ke...@collabora.com> Date: Thu May 17 20:47:37 2018 +0200 Before we kill the child, check it exists, ie. kill(pid, 0) == 0. Also warn when anything was left out. Without this, we leave abandoned children around. Change-Id: I293a530ffceeb7f6bdc0cc775335c782945de6e7 (cherry picked from commit 6ba88372b9cee8e2838e70d8342dbfc5dc29bfc2) Signed-off-by: Andras Timar <andras.ti...@collabora.com> diff --git a/common/SigUtil.cpp b/common/SigUtil.cpp index 48899f378..76e7b44f6 100644 --- a/common/SigUtil.cpp +++ b/common/SigUtil.cpp @@ -284,6 +284,7 @@ namespace SigUtil sigaction(SIGUSR1, &action, nullptr); } + /// Kill the given pid with SIGTERM. Returns true when the pid does not exist any more. bool killChild(const int pid) { LOG_DBG("Killing PID: " << pid); diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp index 5d8a955a3..6864760fb 100644 --- a/wsd/DocumentBroker.hpp +++ b/wsd/DocumentBroker.hpp @@ -134,10 +134,10 @@ public: } // Kill or abandon the child. - if (_pid != -1 && rude && kill(_pid, 0) != 0 && errno != ESRCH) + if (rude && _pid != -1 && kill(_pid, 0) == 0) { LOG_INF("Killing child [" << _pid << "]."); - if (SigUtil::killChild(_pid)) + if (!SigUtil::killChild(_pid)) { LOG_ERR("Cannot terminate lokit [" << _pid << "]. Abandoning."); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits