Jonathan Alley | 11 Sep 23:30 2014

Safe to ignore assert?

Hello everybody,

 

We are repeatedly running into an assert while clicking in a web page shown using QtWebKit, we currently using Qt 4.8.5. After changing the ASSERT macro to not call the CRASH macro to prevent our application from crashing while in debug mode there don’t appear to be any issues but is it safe to ignore this assert?

 

Assert on double click:

ASSERT(prev != *this);
WebCore::VisiblePosition::previous(WebCore::EditingBoundaryCrossingRule rule)  Line 87 + 0x46 bytes                C++

WebCore::positionAvoidingFirstPositionInTable(const WebCore::VisiblePosition & c)  Line 339 + 0xe bytes           C++

WebCore::startPositionForLine(const WebCore::VisiblePosition & c)  Line 384 + 0xd bytes            C++

WebCore::startOfLine(const WebCore::VisiblePosition & c)  Line 389 + 0xd bytes              C++

WebCore::inSameLine(const WebCore::VisiblePosition & a, const WebCore::VisiblePosition & b)  Line 465 + 0x1c bytes  C++

WebCore::VisiblePosition::init(const WebCore::Position & position, WebCore::EAffinity affinity)  Line 59 + 0x4c bytes     C++

WebCore::VisiblePosition::VisiblePosition(const WebCore::Position & pos, WebCore::EAffinity affinity)  Line 50 C++

WebCore::endPositionForLine(const WebCore::VisiblePosition & c)  Line 441 + 0xe bytes              C++

WebCore::endOfLine(const WebCore::VisiblePosition & c)  Line 446 + 0xd bytes                C++

WebCore::isEndOfLine(const WebCore::VisiblePosition & p)  Line 475 + 0x1c bytes           C++

WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity(WebCore::TextGranularity granularity)  Line 290 + 0x1c bytes            C++

WebCore::VisibleSelection::validate(WebCore::TextGranularity granularity)  Line 413     C++

WebCore::VisibleSelection::expandUsingGranularity(WebCore::TextGranularity granularity)  Line 191    C++

WebCore::EventHandler::selectClosestWordFromMouseEvent(const WebCore::MouseEventWithHitTestResults & result)  Line 286                C++

WebCore::EventHandler::handleMousePressEventDoubleClick(const WebCore::MouseEventWithHitTestResults & event)  Line 336                C++

WebCore::EventHandler::handleMousePressEvent(const WebCore::MouseEventWithHitTestResults & event)  Line 492 + 0xc bytes             C++

WebCore::EventHandler::handleMousePressEvent(const WebCore::PlatformMouseEvent & mouseEvent)  Line 1465 + 0xf bytes     C++

QWebPagePrivate::mouseDoubleClickEvent<QMouseEvent>(QMouseEvent * ev)  Line 737 + 0x13 bytes             C++

QWebPage::event(QEvent * ev)  Line 3058          C++

QWebView::mouseDoubleClickEvent(QMouseEvent * ev)  Line 1016      C++

 

Assert on clicking on text:

ASSERT(prev != *this);

WebCore::VisiblePosition::previous(WebCore::EditingBoundaryCrossingRule rule)  Line 87 + 0x46 bytes                C++

WebCore::positionAvoidingFirstPositionInTable(const WebCore::VisiblePosition & c)  Line 339 + 0xe bytes           C++

WebCore::startPositionForLine(const WebCore::VisiblePosition & c)  Line 384 + 0xd bytes            C++

WebCore::startOfLine(const WebCore::VisiblePosition & c)  Line 389 + 0xd bytes              C++

WebCore::inSameLine(const WebCore::VisiblePosition & a, const WebCore::VisiblePosition & b)  Line 465 + 0x1c bytes  C++

WebCore::VisiblePosition::init(const WebCore::Position & position, WebCore::EAffinity affinity)  Line 59 + 0x4c bytes     C++

WebCore::VisiblePosition::VisiblePosition(const WebCore::Position & pos, WebCore::EAffinity affinity)  Line 50 C++

WebCore::RenderObject::createVisiblePosition(int offset, WebCore::EAffinity affinity)  Line 2572 + 0x4d bytes  C++

WebCore::RenderText::positionForPoint(const WebCore::IntPoint & point)  Line 544 + 0x1c bytes            C++

WebCore::EventHandler::handleMousePressEventSingleClick(const WebCore::MouseEventWithHitTestResults & event)  Line 391 + 0x38 bytes     C++

WebCore::EventHandler::handleMousePressEvent(const WebCore::MouseEventWithHitTestResults & event)  Line 496 + 0xc bytes             C++

WebCore::EventHandler::handleMousePressEvent(const WebCore::PlatformMouseEvent & mouseEvent)  Line 1465 + 0xf bytes     C++

QWebPagePrivate::mousePressEvent<QMouseEvent>(QMouseEvent * ev)  Line 714 + 0x13 bytes          C++

QWebPage::event(QEvent * ev)  Line 3055          C++

QWebView::mousePressEvent(QMouseEvent * ev)  Line 1005  C++

 

Thanks you any help you can provide,

 

Jonathan

_______________________________________________
webkit-qt mailing list
webkit-qt <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt
Emanuel Koczwara | 11 Sep 05:11 2014
Picon

Need help with optional features

Hi,

   I'm building Qt 5.3 (from git) under windows 7 with msvc2010. I wan 
to enable some addidional features. The problem is: every time I modify 
features.pri (when I enable a feature) I get compilation error.

   I'm trying to solve this couple of days now and it's a little 
frustrating. First, I've enabled many of these features in command line 
(build-webkit perl script parameters) with hope that it will increase 
support for html5. Compilation failed, too long command at some point. 
Then I've found features.pri. So I've enabled many of them there. 
Compilation failed with an error. I've found that error, disabled 
responsible feature, build again. Another error. I've found that error, 
disabled responsible feature, build again. Another error. I've found 
that error, disabled responsible feature, build again... and i'm running 
win 7 on virtual machine, every compilation is about 1 hour (or more). 
At some point I realised that this is hopeless and I've changed my 
strategy. I've returned to default settings and enabled only one 
feature. Compilation failed. I've enabled other feature. Compilation 
failed. Well... Hm...

The question is: why are some features disabled? Are they incomplete? 
Are they only for webkit devs? End user shoudn't modify this file? I'm 
totally lost.

Thanks,
Emanuel
Nancy Feng (defeng | 10 Sep 23:00 2014
Picon

where does the updateEvent being posted

I am using qtwebkit on a embedded device, I am wondering where does the QtEvent "UpdateRequest" (77) are posted.

I have a test webpage which only contains a video tag(media source is valid, no auto play). After load the page, I do not see video starts to play which is expected. But I still see "UpdateRequest" are being handled and trigger repaint.

I have already hard coded "m_player->didLoadingProgress()" to be false, so it does not call RenderVideo::updateFromElement for re-layout. It puzzled me that where does the "UpdateRequest" come from? 

I am new to webkit, so please anyone could explain a little bit? Or point me out to any wiki or part of the code?

Thanks,
Nancy
_______________________________________________
webkit-qt mailing list
webkit-qt <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt
Massimo Callegari | 5 Sep 13:01 2014
Picon

Custom keycodes not accepted

Hi everyone,
I have a problem with QtWebKit 5.3.1 not forwarding custom keycodes to the Javascript layer. Basically the "onkeypress" event is not fired.

I am developing my own IR remote control driver inside the eglfs plugin. I submit the keycodes to the upper layers like this:

QWindowSystemInterface::handleKeyEvent(0, QEvent::KeyPress, keyCode, Qt::NoModifier);
QWindowSystemInterface::handleKeyEvent(0, QEvent::KeyRelease, keyCode, Qt::NoModifier);

As long as I send Qt keycodes (like Qt::Key_0, Qt::Key_Up, etc..) I receive the Javascript event. When I send custom keycodes like 61506, 61507, etc, they get marked as not accepted. I guess by the QWebView class.
In my previous system I was using QtWebKit 2.3.3 + Qt 4.8.6 + DirectFB and it was working fine with the same keycodes.

In my simple browser application I redefined the keyPressEvent method like this:

void MainWindow::keyPressEvent(QKeyEvent *ev)
{
    qDebug() << "key pressed:" << ev->key() << "accepted:" << ev->isAccepted();
    ev->accept();
    m_view->event(ev);
    if (ev->isAccepted())
        qDebug()  << "Event accepted";
    else
        qDebug()  << "Event NOT accepted";
    QWidget::keyPressEvent(ev);
}

m_view is a pointer to QWebView.

I receive all the keycodes and at the beginning of the function the events are still marked as accepted. 
But even if I try to force to accept them, when they enter the QWebView they are always not accepted, thus not forwarded to the Javascript layer.

Is there a particular reason for this or is there a way to workaround it ?

Thanks in advance,
Massimo

_______________________________________________
webkit-qt mailing list
webkit-qt <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt
Murali M | 13 Aug 10:44 2014
Picon

Need suggestion for Memory corruption in dlopen(platform.so) after jailing


On Wed, Aug 13, 2014 at 11:34 AM, Murali M <murali248641 <at> gmail.com> wrote:

Any body tried qt application under jailing circumstance. 

Need suggestions for below issue(I am using qt4.8 for TV platforms).

We are launching the qtApplication in a process. Now process is jailed(using chroot). 

Memory corruption occurred in the time of dlopen(platform.so) after jailing.


Example:

process main() { mount "proc, sys, dev in /var/tt(chroot directory)" chroot("/var/tt"); qtthread_create(); } qtthread_create() { create_thread_for_qt_app using pthread apis(qtMainThread); stack size is 256K; } qtMainThread() { Printing stack size for qtMainThread(current thread) its displayed currently(256K). QApplication class creation(QApplication app). Printing stack size for qtMainThread(current thread) its displayed wrongly(junk value). app.exec(); }


QApplication call trying load the platform.so using dlopen inside qt library. In that case stack size displayed wrongly.



_______________________________________________
webkit-qt mailing list
webkit-qt <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt
Murali M | 13 Aug 08:04 2014
Picon

Benjamin Poulain <benjamin <at> webkit.org>


Any body tried qt application under jailing circumstance. 

Need suggestions for below issue(I am using qt4.8 for TV platforms).

We are launching the qtApplication in a process. Now process is jailed(using chroot). 

Memory corruption occurred in the time of dlopen(platform.so) after jailing.


Example:

process main() { mount "proc, sys, dev in /var/tt(chroot directory)" chroot("/var/tt"); qtthread_create(); } qtthread_create() { create_thread_for_qt_app using pthread apis(qtMainThread); stack size is 256K; } qtMainThread() { Printing stack size for qtMainThread(current thread) its displayed currently(256K). QApplication class creation(QApplication app). Printing stack size for qtMainThread(current thread) its displayed wrongly(junk value). app.exec(); }


QApplication call trying load the platform.so using dlopen inside qt library. In that case stack size displayed wrongly.


_______________________________________________
webkit-qt mailing list
webkit-qt <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt
Max Stepin | 12 Aug 20:10 2014
Picon

APNG support?

Hello QtWebKit.

I'm looking for a WebKit port that would "adopt" my apng support code:
https://bugs.webkit.org/show_bug.cgi?id=17022

The code is under ENABLE(APNG) so to make it into WebKit,
at least one port would need to agree to use it.

Let me know what you think, thanks.


_______________________________________________
webkit-qt mailing list
webkit-qt <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt
Nilesh Kokane | 6 Aug 15:16 2014

qtwebkit_5.2.1 cross-compilation error


Hello ,

I'm attempting to cross-compile qt qtwebkit_5.2.1 to arm and with that i'm getting the errors as posted here http://pastebin.com/zLe6n5tD.I'm using wandboard-solo and trying to get qt on it.

Can you please have a look and provide me some suggestion on it i'll be thankfull

--
Thanks
Nilesh Kokane


“The contents of this e-mail message and any attachments are confidential and are intended solely for addressee. The information may also be legally privileged. This transmission is sent in trust, for the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail or phone and delete this message and its attachments, if any.”
_______________________________________________
webkit-qt mailing list
webkit-qt <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt
Christopher Manley | 22 Jul 03:09 2014
Picon

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> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt
Luca Carlon | 12 Jun 15:41 2014
Picon

Youtube player callbacks

Hello,
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:

<html>
  <head>
    <title>-1</title>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  </head>
  <body bgcolor="black" marginwidth="0" marginheight="0">
    <!-- The <iframe> (and video player) will replace this <div> tag. -->
    <div id="player"></div>
    <script>
        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 = "https://www.youtube.com/iframe_api";
        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";
          //navigator.qt.postMessage("onPlayerStateChange");
          if (event.data == YT.PlayerState.PLAYING)
            console.log("Playing state received.");
          else if (YT.PlayerState.ENDED == event.data)
            console.log("Ended state received.");
          else if (YT.PlayerState.PAUSED == event.data)
            console.log("Paused state received.");
          else if (YT.PlayerState.BUFFERING == event.data)
            console.log("Buffering state received.");
          else if (YT.PlayerState.CUED == event.data)
            console.log("Cued state received.");
          else if (event.data == -1)
            console.log("Unstarted state received.");
          else
            console.log("Unknown event.data " + event.data + ".");
        }

        function onPlayerError() {
          document.title = "Error occurred!"
          navigator.qt.postMessage(event.data);
        }
    </script>
  </body>
</html>

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?
Thanks.

Luca
_______________________________________________
webkit-qt mailing list
webkit-qt <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt
Massimo Callegari | 11 Jun 16:36 2014
Picon

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: http://www.craftymind.com/factory/guimark2/HTML5TextTest.html
On Qt4+DirectFB it does 0,48fps, while on Qt5+OGL it does 0,1fps.

2) Similar to the above, this test
http://www.craftymind.com/factory/guimark2/HTML5GamingTest.html
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 !
Massimo
_______________________________________________
webkit-qt mailing list
webkit-qt <at> lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-qt

Gmane