[webkit-qt] QML. Double click on WebView cause crash.

Alexandr Akulich akulichalexander at gmail.com
Fri Mar 15 04:55:26 PDT 2013


Hi all.
I have discovered a bug in WebView from current stable branch.
Double click on WebView lead to crash. (Repeated on few linux and windows
machines).
A test executed with some disabled option (that enabled by default), so
avoid ASSERT_NOT_REACHED().
Fix is fairly easy, but I don't know, what is the better way to update test
- just remove an option, or do something more.
I haven't report this bug yet and was surprised, why it is not reported
before me.

Steps to reproduce:
1) Double click on any WebView (QtWebKit 3.0).
2) Get assert.

Previous behavior (at least in Linux) is zoom in/zoom out. Under Windows is
always get crash.

 Current execution path, that cause error: (all files are placed in
Source/WebKit2/UIProcess)

1) API/qt/qquickwebview.cpp:76: Set bool s_flickableViewportEnabled to true.
2) API/qt/qquickwebview.cpp:180: Method createPrivateObject() check
s_flickableViewportEnabled. Since it is true, QQuickWebViewFlickablePrivate
been constructed.
3) API/qt/qquickwebview.cpp:884:
QQuickWebViewFlickablePrivate::handleMouseEvent(): Call
pageView->eventHandler()->handleInputEvent(event).
4) qt/QtWebPageEventHandler.cpp:457:
QtWebPageEventHandler::handleInputEvent: Crash at line 509.
ASSERT_NOT_REACHED().

Once it is test:
1) Project file (API/qt/tests/qmltests/DesktopBehavior.pro:11) define
DISABLE_FLICKABLE_VIEWPORT,
2) that been processed in API/qt/tests/qmltests/tst_qmltests.cpp:48 leads
to set s_flickableViewportEnabled to false,
3) so method QQuickWebViewPrivate::createPrivateObject() construct
QQuickWebViewLegacyPrivate.
4) Like stage 3 in usual execution, called
QQuickWebViewPrivate::handleMouseEvent(), but now event have been accept
and eventHandler()->handleInputEvent(event) never called (with DoubleClick).

Fix can be trivial - add to
QQuickWebViewFlickablePrivate::handleMouseEvent() same check as
in QQuickWebViewPrivate::handleMouseEvent() and eat DoubleClick event.
What to do with test?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20130315/0af4d012/attachment.html>


More information about the webkit-qt mailing list