loleaflet/src/control/Control.Menubar.js |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 09821236ef237711bb38b46c47b3d123d2adc9bf
Author:     Tor Lillqvist <t...@collabora.com>
AuthorDate: Wed Mar 25 13:39:40 2020 +0200
Commit:     Tor Lillqvist <t...@collabora.com>
CommitDate: Wed Mar 25 13:19:02 2020 +0100

    Add two pseudo-assertions for code that IMHO will never be executed
    
    I suggest we introduce this convention for such assertions.
    Feel free to modify the message syntax. The idea is that if you notice
    some code block you think will never be executed, add a comment and a
    console.log with a message in this syntax. If somebody then later sees
    that logging appear after all, they can add/modify a comment describing
    what is actually going on.
    
    Change-Id: I76302e414d78912b6d20ba149c69d00d995613c6
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91048
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 5d24b7ebf..e2396faf5 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -895,6 +895,11 @@ L.Control.Menubar = L.Control.extend({
                                        if (this.checked) {
                                                self._map.fire('closesidebar');
                                                if (!L.Browser.mobile) {
+                                                       // Surely this code, if 
it really is related only to the hamburger menu,
+                                                       // will never be 
invoked on non-mobile browsers? I might be wrong though.
+                                                       // If you notice this 
logging, please modify this comment to indicate what is
+                                                       // going on.
+                                                       console.log('======> 
Assertion failed!? Not L.Browser.mobile? Control.Menubar.js #1');
                                                        $nav.css({height: 
'initial', bottom: '38px'});
                                                        
$menu.hide().slideDown(250, function() { $menu.css('display', ''); });
                                                        
$('#mobile-wizard-header').show();
@@ -906,6 +911,8 @@ L.Control.Menubar = L.Control.extend({
                                                        
$('#mobile-wizard-header').hide();
                                                }
                                        } else if (!L.Browser.mobile) {
+                                               // Ditto.
+                                               console.log('======> Assertion 
failed!? Not L.Browser.mobile? Control.Menubar.js #2');
                                                $menu.show().slideUp(250, 
function() { $menu.css('display', ''); });
                                                $nav.css({height:'', bottom: 
''});
                                        } else {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to