[Webkit-unassigned] [Bug 173768] [GTK] Some web pages disappear immediately after rendering

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 28 03:44:31 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=173768

--- Comment #9 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Carlos Alberto Lopez Perez from comment #8)
> The warnings are unrelated.
> 
> Definitively, the problem is triggered by the JS from modernizr.
> 
> Try:
> 
> 1) Render white
> HOME=$(mktemp -d) Tools/Scripts/run-minibrowser --gtk
> --enable-write-console-messages-to-stdout=true
> https://people.igalia.com/clopez/wkbug/173768/midori/m1.html
> 
> 
> 2) Render ok
> HOME=$(mktemp -d) Tools/Scripts/run-minibrowser --gtk
> --enable-write-console-messages-to-stdout=true
> https://people.igalia.com/clopez/wkbug/173768/midori/m2.html
> 
> 
> 
> And the only difference is:
> 
> $ diff -u <(curl -s
> https://people.igalia.com/clopez/wkbug/173768/midori/m1.html) <(curl -s
> https://people.igalia.com/clopez/wkbug/173768/midori/m2.html)
> --- /dev/fd/63	2017-06-26 15:04:55.167486031 +0200
> +++ /dev/fd/62	2017-06-26 15:04:55.175486109 +0200
> @@ -1682,10 +1682,10 @@
>  
>  	<!-- JSDelivr -->
>  	<!--[if lt IE 9]>
> -	
> <script>jQl.loadjQ('//cdn.jsdelivr.net/g/modernizr,selectivizr,prefixfree,
> jquery at 1.11.0,colorbox,jquery.autosize,jquery.equalize,jquery.downboy');</
> script>
> +	
> <script>jQl.loadjQ('//cdn.jsdelivr.net/g/selectivizr,prefixfree,jquery at 1.11.
> 0,colorbox,jquery.autosize,jquery.equalize,jquery.downboy');</script>
>  	<![endif]-->
>  	<!--[if IE 9]><!-->
> -	
> <script>jQl.loadjQ('//cdn.jsdelivr.net/g/modernizr,prefixfree,jquery,
> colorbox,jquery.autosize,jquery.equalize,jquery.downboy');</script>
> +	
> <script>jQl.loadjQ('//cdn.jsdelivr.net/g/prefixfree,jquery,colorbox,jquery.
> autosize,jquery.equalize,jquery.downboy');</script>
>  	<!--<![endif]-->
>  
>  	<!-- Scripts -->
> @@ -1711,6 +1711,6 @@
>  		});
>  	</script>
>  
> -<script
> src="http://cdn.jsdelivr.net/g/modernizr,prefixfree,jquery,colorbox,jquery.
> autosize,jquery.equalize,jquery.downboy"></script></head>
> +<script
> src="http://cdn.jsdelivr.net/g/prefixfree,jquery,colorbox,jquery.autosize,
> jquery.equalize,jquery.downboy"></script></head>
>  
>  </html>
> 
> 
> 
> The JS in question is this: http://cdn.jsdelivr.net/g/modernizr

I've debugged this a bit more, trying to isolate the part of the modernizr code that is causing this and I've found they there are the audio and video tests. The problem seem to be the use of canPlayType, but I have no idea why.

Modernizr.addTest("audio", function() {
        var A = createElement("audio"),
            e = !1;
        try {
            (e = !!A.canPlayType) && (e = new Boolean(e), e.ogg = A.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/, ""), e.mp3 = A.canPlayType('audio/mpeg; codecs="mp3"').replace(/^no$/, ""), e.opus = A.canPlayType('audio/ogg; codecs="opus"') || A.canPlayType('audio/webm; codecs="opus"').replace(/^no$/, ""), e.wav = A.canPlayType('audio/wav; codecs="1"').replace(/^no$/, ""), e.m4a = (A.canPlayType("audio/x-m4a;") || A.canPlayType("audio/aac;")).replace(/^no$/, ""))
        } catch (t) {}
        return e
    })

Modernizr.addTest("video", function() {
        var A = createElement("video"),
            e = !1;
        try {
            (e = !!A.canPlayType) && (e = new Boolean(e), e.ogg = A.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, ""), e.h264 = A.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, ""), e.webm = A.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, ""), e.vp9 = A.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, ""), e.hls = A.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, ""))
        } catch (t) {}
        return e
    })

Removing all calls to canPlayType fixes the problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170628/ccb4bdbb/attachment.html>


More information about the webkit-unassigned mailing list