[webkit-qt] QWebInspector can't pause

Andrew Webster apwebster at gmail.com
Fri Oct 28 13:09:25 PDT 2011

On Mon, Oct 17, 2011 at 10:12 AM, Andrew Webster <apwebster at gmail.com> wrote:
> I've built the latest from qtwebkit-2.2-devel using Qt v4.8.0-rc1
> under Ubuntu.  When I try to pause JavaScript (e.g. www.google.com
> using QtTestBrowser) using the script tab on QWebInspector, it changes
> to 'pausing' but never makes it to 'paused'.  The JavaScript on the
> page I'm debugging does pause, but it's almost like the JavaScript in
> the inspector window also pauses because inspector features that use
> JavaScript don't work.

Indeed this is the problem.  When WebKit pauses, it pauses all of the
pages in the same group.  In QtWebKit, all of the pages (including the
inspector page) get assigned the group "Default Group" and thus the
inspector page pauses too.  If this inspector gets put into it's own
group, similar to what chromium does, it solves the problem:

Index: Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
--- Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp       (revision x)
+++ Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp       (working copy)
@@ -63,6 +63,7 @@
         : QWebPage(parent)
         connect(mainFrame(), SIGNAL(javaScriptWindowObjectCleared()),
+        QWebPagePrivate::priv(this)->page->setGroupName(String());

     QWebPage* createWindow(QWebPage::WebWindowType)


More information about the webkit-qt mailing list