loleaflet/html/loleaflet.html.m4 |    2 +-
 loleaflet/src/core/Socket.js     |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit b636098caeaadda550cf6495be24539e89a66bb0
Author:     Tor Lillqvist <[email protected]>
AuthorDate: Wed Sep 12 13:33:57 2018 +0300
Commit:     Tor Lillqvist <[email protected]>
CommitDate: Wed Sep 12 13:34:27 2018 +0300

    Some minor iOS (or mobile in general) app tweaks

diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index dc1ec0c1a..4322121d4 100644
--- a/loleaflet/html/loleaflet.html.m4
+++ b/loleaflet/html/loleaflet.html.m4
@@ -20,7 +20,7 @@ 
define([_foreachq],[ifelse([$#],[3],[],[define([$1],[$4])$2[]$0([$1],[$2],shift(
     if (msg.MessageId === 'Host_PostmessageReady') {
       if (window.ThisIsTheiOSApp) {
         // Just for debugging to see that we got it
-        window.webkit.messageHandlers.lool.postMessage('got 
Host_PostmessageReady!');
+        window.webkit.messageHandlers.debug.postMessage('got 
Host_PostmessageReady!');
       }
       window.WOPIPostmessageReady = true;
       window.removeEventListener('message', PostMessageReadyListener, false);
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 991626487..df33801d9 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -11,8 +11,9 @@ function FakeWebSocket() {
        this.bufferedAmount = 0;
        this.extensions = '';
        this.protocol = '';
-       this.readyState = 0;
+       this.readyState = 1;
        this.id = window.fakeWebSocketCounter++;
+       this.sendCounter = 0;
        console.log('>>>>>> Created FakeWebSocket#' + this.id);
        this.onclose = function() {
        };
@@ -29,7 +30,8 @@ FakeWebSocket.prototype.close = function() {
 }
 
 FakeWebSocket.prototype.send = function(data) {
-       console.log('>>>>>> Sending data on FakeWebSocket#' + this.id + ': "' + 
data + '"');
+       console.log('>>>>>> Sending data on FakeWebSocket#' + this.id + ' (' + 
this.sendCounter + '): "' + data + '"');
+       this.sendCounter++;
        window.webkit.messageHandlers.lool.postMessage(data, '*');
 }
 
@@ -61,6 +63,7 @@ L.Socket = L.Class.extend({
                }
                if (window.ThisIsTheiOSApp) {
                        this.socket = new FakeWebSocket();
+                       window.TheFakeWebSocket = this.socket;
                } else {
                        var wopiSrc = '';
                        if (map.options.wopiSrc != '') {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to