Christopher Manley | 22 Jul 03:09 2014

ContentEditable CPU use

Hey everyone - 

Is there any way to reduce the CPU spike that happens when typing in a content editable div?

I'm running into cases where it spikes enough to cause even moderate speed typing to get interrupted.  On my fairly new Macbook I see the CPU use get up to 20 - 25% when I start typing in any simple content editable.  On machines under load, that can be enough to mess up the user experience.

I'm seeing this with our custom app, but also the Qt Demo Browser, using 5.3.1.

Any ideas to mitigate this would be great.

webkit-qt mailing list
webkit-qt <at>
Luca Carlon | 12 Jun 15:41 2014

Youtube player callbacks

I'm trying to show a Youtube player inside a QML scene. I therefore replicated the available example in Qt and I'm loading this html code into a QML WebView:

    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  <body bgcolor="black" marginwidth="0" marginheight="0">
    <!-- The <iframe> (and video player) will replace this <div> tag. -->
    <div id="player"></div>
        function getVideoId() {
          return window.location.href.slice(window.location.href.indexOf('?') + 1);

        // This code loads the IFrame Player API code asynchronously.
        var tag = document.createElement('script');
        tag.src = "";
        var firstScriptTag = document.getElementsByTagName('script')[0];
        firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

        // This function creates an <iframe> (and YouTube player)
        // after the API code downloads.
        var player;
        function onYouTubeIframeAPIReady() {
          player = new YT.Player('player', {
            playerVars: { 'html5': 1, 'iv_load_policy': 3 },
            frameborder: '0',
            height: '100%',
            width: '100%',
            videoId: "GgDDXXeYJeI",
            events: {
              'onReady': onPlayerReady,
              'onStateChange': onPlayerStateChange,
              'onError': onPlayerError

        // The API will call this function when the video player is ready.
        function onPlayerReady(event) {
          document.title = "onPlayerReady";
          console.log("onPlayerReady callback.");
          navigator.qt.postMessage("onPlayerReady callback.");

        // The API calls this function when the player's state changes.
        function onPlayerStateChange(event) {
          document.title = "onPlayerStateChange";
          if ( == YT.PlayerState.PLAYING)
            console.log("Playing state received.");
          else if (YT.PlayerState.ENDED ==
            console.log("Ended state received.");
          else if (YT.PlayerState.PAUSED ==
            console.log("Paused state received.");
          else if (YT.PlayerState.BUFFERING ==
            console.log("Buffering state received.");
          else if (YT.PlayerState.CUED ==
            console.log("Cued state received.");
          else if ( == -1)
            console.log("Unstarted state received.");
            console.log("Unknown " + + ".");

        function onPlayerError() {
          document.title = "Error occurred!"

What seems to happen is that no callback is invoked at all. No onPlayerReady, no onPlayerStateChange and no onPlayerError. I tried both to post a message and set the title. If I load the same html into Chromium or Firefox I get all my callbacks.
Any idea why or what can I do to add the player and get callbacks?

I also tried to use the getPlayerState() method of the player from QML, but that seemed to hang.

Any advice?

webkit-qt mailing list
webkit-qt <at>
Massimo Callegari | 11 Jun 16:36 2014

QtWebKit 5.3.0 performances and footprint

Hello everybody,
I've had quite good results with QtWebKit 2.3.3 + Qt 4.8.5 + DirectFB on a MIPS platform. (2000 DMIPS)
Now I've decided to make the big step and give Qt 5.3.0 a try.

Same platform but this time I go directly on OpenGL ES 2.0 instead of using DirectFB.
After quite a pain with the ICU library, I've been able to successfully run some QtWebKit examples and everything is up and running !
The results are not bad at all. If you are interested, I can share those I collected from either the Qt4 and the Qt5 system.

Now I've got a few questions, mostly concerning the overall footprint, as it's around 30% bigger than the Qt4 system.

############ Footprint

1) on an embedded platform, print support is useless to me. Unfortunately, it seems there is no "configure" way to disable it on Qt5, so the consequence is that QtWebKit includes the print support too. Is there any way to disable them both ? This could save me around 1MB !

2) QtWebKit's qmake process reports that both Webkit1 and Webkit2 are built into the final library. Are they both really required ?
I've read on Allan's presentation made in November in San Franscisco that Webkit2 is related to QML development. I am keen to go that way, so I'd prefer to have a QtWebKit library with just the WebKit2 support. Is this possible ?

3) If #2 is possible, is there any QML browser example that I can take a look at ? The QtWebKit examples package doesn't include any. The only QML examples are for Flickr and YouTube.

############ Performances

1) it seems that font rendering is much slower on QtWebKit 5 but I can't be 100% sure if this depends on Qt or OpenGL. Can anyone explain the low level bits that take care of this part ?
The reference test I used is this:
On Qt4+DirectFB it does 0,48fps, while on Qt5+OGL it does 0,1fps.

2) Similar to the above, this test
does 6,05fps on Qt4+DFB and 2,04fps on Qt5+OGL. Is there any explanation for this ?

3) I've ran all the benchmarks with the "browser" example, which is QtWidget-based. I'm wondering if a QML/SceneGraph based browser could boost the rendering up and give much better results. Anyone has had experiences/results on this ?

Sorry for the long email. I hop someone (Allan ? :) ) can pick this up and enlighten me on some aspects.

Thanks in advance !
webkit-qt mailing list
webkit-qt <at>
Florentin BADEA | 19 May 14:50 2014

QtWebkit 2.3.3 crash when document.all is compared to null in javascript


I am using qtwebkit 2.3.3 built from git against qt 4.8.5 (Windows 7 and Visual Studio 2008). I get a crash with the release version (works in debug) using the previewer example from Qt and loading a simple webpage like this:

    <script language="javascript" type="text/javascript">
        var isDocAllNull = document.all == null;
    Test page with document.all compared to null.

The problem does not appear in the older Qt 4.8.5.
I am able to reproduce this error in Qt 5.1.1 (also using the Previewer example).
The problem is fixed in Qt 5.2.1.

I would need a patch for qtwebkit 2.3.3 if anyone can help. Some suggestions on how to debug this (considering that the error does not occur in debug mode) would also be very helpful.

webkit-qt mailing list
webkit-qt <at>
Stirling Westrup | 9 May 18:34 2014

Integrating QT WebKit into a GStreamer Element.

Not really sure if this question should be posted in this forum or the GStreamer one. I may re-post it there.

In any case, I am writing a GStreamer element to take a URL and use QWebView to render a page to a QImage stored in a GStreamer buffer, 24 times a second. The resulting stream of images being suitable for displaying on a projection TV, capturing in a video file, etc...

I have a preliminary version of this written and somewhat working, but I ran into an issue with the fact that QWebView wants to run in the environment of a QApplication, but I have the environment of a GStreamer plugin.

Now both QT and GStreamer use glib's context's and loops for main program control, but I never found a way to have QWebView be happy running under a bare GStreamer. Instead I wrote a singleton QApplication wrapper that will start an QApp, feeding it bogus argc and argv, provided none has already been started. That way numerous instances of the same plugin can theoretically share a QApp.

This scheme seems to work fine if I run the element as part of a GStreamer pipeline, but if I try to run it as part of a pipeline compiled in a GStreamer C program, I get a critical context error like this:

 gdb --args ./vaal --gst-fatal-warnings  -X -n -g 16X9:1X1:0=:5
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/reza/workspace/userful-videowall/src/vaal...done.
(gdb) run
Starting program: /home/reza/workspace/userful-videowall/src/vaal --gst-fatal-warnings -X -n -g 16X9:1X1:0=:5
[Thread debugging using libthread_db enabled]
/home/reza/workspace/userful-videowall/src/vaal v0.8.5 is using GStreamer 1.2.4
[New Thread 0x7ffff3da9700 (LWP 712)]
[New Thread 0x7ffff33a8700 (LWP 713)]
Detaching after fork from child process 714.
[New Thread 0x7ffff29a7700 (LWP 715)]
[New Thread 0x7ffff1fa6700 (LWP 716)]
[New Thread 0x7fffe3fff700 (LWP 717)]
[New Thread 0x7ffff15a5700 (LWP 718)]
[New Thread 0x7fffd781a700 (LWP 719)]
[Thread 0x7fffd781a700 (LWP 719) exited]

(vaal:709): GLib-CRITICAL **: g_main_context_push_thread_default: assertion `acquired_context' failed

#0  0x00007ffff5c92d76 in g_logv () from /usr/lib64/
#1  0x00007ffff5c92f33 in g_log () from /usr/lib64/
#2  0x00007fffcda484a6 in QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(_GMainContext*) () from /usr/lib64/
#3  0x00007fffbdef170e in ?? () from /usr/lib64/qt5/plugins/platforms/
#4  0x00007fffbdef1790 in ?? () from /usr/lib64/qt5/plugins/platforms/
#5  0x00007fffbdef1660 in ?? () from /usr/lib64/qt5/plugins/platforms/
#6  0x00007fffbdeb98b6 in ?? () from /usr/lib64/qt5/plugins/platforms/
#7  0x00007fffbdecab6c in ?? () from /usr/lib64/qt5/plugins/platforms/
#8  0x00007fffd491324e in QPlatformIntegrationFactory::create(QString const&, QStringList const&, QString const&) () from /usr/lib64/
#9  0x00007fffd491e1e7 in QGuiApplicationPrivate::createPlatformIntegration() () from /usr/lib64/
#10 0x00007fffd491fa1d in QGuiApplicationPrivate::createEventDispatcher() () from /usr/lib64/
#11 0x00007fffcda02963 in QCoreApplication::init() () from /usr/lib64/
#12 0x00007fffcda02a95 in QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) () from /usr/lib64/
#13 0x00007fffd491f8e9 in QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) () from /usr/lib64/
#14 0x00007fffd4fc7652 in QApplication::QApplication(int&, char**, int) () from /usr/lib64/
#15 0x00007fffd6c15214 in gst_qapp_wrap_init () at gstqappwrap.cpp:99
#16 gst_qapp_wrap_new () at gstqappwrap.cpp:107
#17 gst_qapp_wrap_ref () at gstqappwrap.cpp:121
#18 0x00007fffd6c15717 in gst_qtweb_src_ipc_init (qtw=0x84a040) at qtwebsrc.cpp:1354
#19 gst_qtweb_src_init (qtw=0x84a040) at qtwebsrc.cpp:1418
#20 0x00007ffff5f93147 in g_type_create_instance () from /usr/lib64/
#21 0x00007ffff5f7c4d9 in ?? () from /usr/lib64/
#22 0x00007ffff5f7b9d1 in g_object_newv () from /usr/lib64/
#23 0x00007ffff5f7c17d in g_object_new_valist () from /usr/lib64/
#24 0x00007ffff5f7c491 in g_object_new () from /usr/lib64/
#25 0x00007ffff74095ff in gst_element_factory_create (factory=0x7b1a80, name=0x4200bb "websrc") at gstelementfactory.c:375
#26 0x0000000000407459 in request_elements (factory=0x62f4d0, request=0x7fffffffe250, num=2, err=0x7fffffffe408) at vaal.c:597
#27 0x0000000000407ccd in vaal_http_reader_new (vaal=0x62ec00, uri=0x63b270, err=0x7fffffffe408) at vaal.c:2766
#28 0x000000000040c8d0 in vaal_reader_new (vaal=0x62ec00, err=0x7fffffffe408) at vaal.c:2860
#29 vaal_source_config (vaal=0x62ec00, err=0x7fffffffe408) at vaal.c:2927
#30 vaal_run (vaal=0x62ec00, err=0x7fffffffe408) at vaal.c:3370
#31 0x000000000040d3b3 in main (argc=<value optimized out>, argv=<value optimized out>) at vaal.c:3541

I know this isn't really enough information to debug the issue, but I have now exhausted what little QT knowledge I started with, and am hoping for any pointers, clues, or ideas that folks might have for building a more robust solution.
webkit-qt mailing list
webkit-qt <at>
Frank Fischer | roomeon | 6 May 18:37 2014

QWebPage unsupported content does not work


I'm just updated from Qt 4.8.5 to Qt 5.2.1 and unfortunately forwarding of unsupported content in QWebPage
does not work anymore. I've set forwardUnsupportedContent to true and I'm getting a reply with
Content-Type="my_action". The content of the reply is xml based but I changed the Content-Type header by
the server that delivers the reply. In 4.8.5 this always caused a call of the unsupportedContent signal
but now the content of the WebPage gets fully grey and the Inspector gives me the XML-Content I wanted to
handle by my Slot connected to unsupportedContent. Is it a bug or have I missed something?

Best regards,

Manish Gurnaney | 6 Mar 17:52 2014

Re: Unable to install Qt5.0

Hi Arijit,
         I have set following paths in the .bashrc file
export QTDIR=/usr/share/qt4
export PATH=$QTDIR/bin:$PATH
export QMAKEPATH=/home/OpenSource/webkit/Tools/qmake

         Apart from that when check the qmake version it says 
1) qmake -version
   QMake version 2.01a
   Using Qt version 4.8.1 in /usr/lib/x86_64-linux-gnu

2) which qmake

I am using Ubuntu 12.04 LTS 64 Bit.
Please let me know if I am missing some thing.
Manish R Gurnaney

On Thu, Mar 6, 2014 at 5:25 AM, arijit chattopadhyay <arijitvt <at>> wrote:
Did you set your QTDIR in your bashrc? (I assume you are using Linux machine)

Graduate Research Assistant
Computer Engineering Department
Virginia Tech

On Wed, Mar 5, 2014 at 1:23 PM, Manish Gurnaney <manishgurnaney <at>> wrote:
Hi All 
       I am trying to build  Webkit Qt port. When I run the build comman it gives me this error 
 ./Tools/Scripts/build-webkit --qt
Calling 'qmake /home/manish/OpenSource/webkit/ CONFIG-=production_build' in /home/manish/OpenSource/webkit/WebKitBuild/Release

Project ERROR: Building WebKit with Qt versions older than 5.0 is not supported.

Failed to set up build environment using qmake!

To resolve this I am tried to install But it gives Segmentation fault.

Can you please help me to resolve this issue.
Manish R gurnaney

webkit-qt mailing list
webkit-qt <at>

webkit-qt mailing list
webkit-qt <at>
Manish Gurnaney | 5 Mar 19:23 2014

Unable to install Qt5.0

Hi All 
       I am trying to build  Webkit Qt port. When I run the build comman it gives me this error 
 ./Tools/Scripts/build-webkit --qt
Calling 'qmake /home/manish/OpenSource/webkit/ CONFIG-=production_build' in /home/manish/OpenSource/webkit/WebKitBuild/Release

Project ERROR: Building WebKit with Qt versions older than 5.0 is not supported.

Failed to set up build environment using qmake!

To resolve this I am tried to install But it gives Segmentation fault.

Can you please help me to resolve this issue.
Manish R gurnaney
webkit-qt mailing list
webkit-qt <at>
Richard Gerd Kuesters | 25 Feb 21:37 2014

sqlite database as local storage

hello all! :)

i was reading some of webkit resources, and one of them is to provide local database storage, including sqlite3.

ok, i'm developing a custom application with webkit, and i would like to expose my apps database to it, so i can access it directly using javascript (instead of writing miles of cpp code).

is it possible?


kind regards,

webkit-qt mailing list
webkit-qt <at>
Luca Ottaviano | 15 Jan 17:40 2014

Missing features in QML WebView

Hi all,
I'm missing some browser features from QML WebView in Qt 5.x (QtWebKit 
3.0). What I'm looking for is a way to render combo boxes and a way to 
signal that a link must be opened in a new window.

 From what I can tell, there's no way to accomplish this task in QML 
only even when using experimental features, but maybe I'm overlooking 

In case it's necessary to write some C++ code, could somebody point me 
to some classes where to hook the above features?

Luca Ottaviano - lottaviano <at>
Tel.: +39 055 3986627 - ext.: 218
My blog -
Develer S.r.l. -
Ádám Kallai | 13 Jan 14:56 2014

QtWebKit waterfall's URL is changed

Hi Everyone,

QtWebKit waterfall's address is changed.
You can see:

webkit-qt mailing list
webkit-qt <at>